Page 1 of 1

My script crashing game - Sniper Fury. Why?

Posted: Thu Jan 04, 2018 7:04 pm
by marek1957
Hello,
I made a script for god mode and one-hit kill for Sniper Fury v2.9.0n game. My script was working perfectly but now is crashing game when I shoot someone. Why? Can someone tell me what is the problem with my script?


My script:

Code: Select all

[ENABLE]
//code from here to '[DISABLE]' will be used to enable the cheat
alloc(newmem,2048)
label(returnhere)
label(originalcode)
label(exit)

newmem: //this is allocated memory, you have read,write,execute access
//place your code here

originalcode:
push ebx
mov ebx,04BA0000[-172093.59]
call ebx
pop ebx
nop
nop
nop
nop

exit:
jmp returnhere

"FutureWar_W8.Windows.exe"+1AF5F6:
jmp newmem
nop
nop
nop
returnhere:


 
 
[DISABLE]
//code from here till the end of the code will be used to disable the cheat
dealloc(newmem)
"FutureWar_W8.Windows.exe"+1AF5F6:
movapd xmm1,xmm0
subsd xmm1,[esi]
movsd [ebp-0C],xmm1
//Alt: db 66 0F 28 C8 F2 0F 5C 0E

Re: My script crashing game - Sniper Fury. Why?

Posted: Thu Jan 04, 2018 8:01 pm
by Blayde
marek1957 wrote:
Thu Jan 04, 2018 7:04 pm
Hello,
I made a script for god mode and one-hit kill for Sniper Fury v2.9.0n game. My script was working perfectly but now is crashing game when I shoot someone. Why? Can someone tell me what is the problem with my script?
I don't own this game and how/what to tell you, but...this is "one hit game kill" script.

Re: My script crashing game - Sniper Fury. Why?

Posted: Thu Jan 04, 2018 9:04 pm
by TimFun13
So this line:

Code: Select all

mov ebx,04BA0000[-172093.59]
Is being assembled in my Cheat Engine like this:

Code: Select all

8B 1D C35FFDFF
or

Code: Select all

mov ebx,[FFFD5FC3]
So you are moving the value stored at the address of hex "FFFD5FC3" to the EBX registry and calling that.
And since hex "FFFD5FC3" (4 byte) == decimal "-172093", it looks like Cheat Engine is ignoring the first numbers and using the second set in the brackets. Hell didn't thick this would even assemble.

But I'm not sure what you are trying to do, and what the brackets are for in this case. But if you are just trying to call 04BA0000
then then you can replace:

Code: Select all

push ebx
mov ebx,04BA0000[-172093.59]
call ebx
pop ebx
With:

Code: Select all

call 04BA0000
The only other thing I can say is you are using static addresses for the injection and these will often change with updates.

Re: My script crashing game - Sniper Fury. Why?

Posted: Thu Jan 04, 2018 11:17 pm
by Blayde
Data Movement Instructions
mov — Move (Opcodes: 88, 89, 8A, 8B, 8C, 8E, ...)

The mov instruction copies the data item referred to by its second operand (i.e. register contents, memory contents, or a constant value) into the location referred to by its first operand (i.e. a register or memory). While register-to-register moves are possible, direct memory-to-memory moves are not. In cases where memory transfers are desired, the source memory contents must first be loaded into a register, then can be stored to the destination memory address.

Syntax
mov <reg>,<reg>
mov <reg>,<mem>
mov <mem>,<reg>
mov <reg>,<const>
mov <mem>,<const>

Examples
mov eax, ebx — copy the value in ebx into eax
mov byte ptr [var], 5 — store the value 5 into the byte at location var

--------------------------------------
You have three operands.
mov ebx,04BA0000[-172093.59]
So.....impossible.

Re: My script crashing game - Sniper Fury. Why?

Posted: Fri Feb 09, 2018 3:15 pm
by movss
maybe it jmp int3

Re: My script crashing game - Sniper Fury. Why?

Posted: Fri Feb 09, 2018 3:29 pm
by SunBeam
And this is posted here, in a Lua section, cuz...