| View previous topic :: View next topic |
| Author |
Message |
vergilganesh Expert Cheater
Reputation: 0
Joined: 01 Jul 2013 Posts: 134 Location: India
|
Posted: Tue Aug 06, 2013 8:01 am Post subject: Problem in moving max health to current health |
|
|
The game is prototype in this the max health is seperated in two addresses.
| Code: |
mov eax,[esi+14]
add eax,[esi+10]
mov [esi+0c],eax
originalcode:
movss [esi+0c],xmm0
|
But this code doesnt add health. player dies instantly.(health reduced to 200 and nxt hit he dies)
| Description: |
|
| Filesize: |
9.78 KB |
| Viewed: |
4183 Time(s) |

|
|
|
| Back to top |
|
 |
mgr.inz.Player I post too much
Reputation: 222
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Aug 06, 2013 5:16 pm Post subject: |
|
|
You are using wrong instructions.
1000.0 = 447A0000 (as hex integer) = 1148846080 (as decimal unsigned integer)
2700.0 = 4528C000 (as hex integer) = 1160298496 (as decimal unsigned integer)
1148846080 + 1160298496 = 2309144576 = 89A2C000 (as hex integer) = -3.918063731E-33
Your code is overwriting health value with very small value, value which is below zero and very close to zero.
You should use floating-point instructions:
| Code: | fld [esi+14]
fadd [esi+10]
fstp [esi+0c]
jmp returnhere
originalcode:
movss [esi+0c],xmm0
jmp returnhere |
_________________
|
|
| Back to top |
|
 |
_Veggy Cheater
Reputation: 2
Joined: 30 Apr 2013 Posts: 34 Location: BReWErS rox your dox
|
Posted: Wed Aug 07, 2013 1:33 am Post subject: |
|
|
You could simply use:
mov eax, [MaxHealth]
mov [CurrentHealth], eax
Considering your code:
mov eax,[esi+<..>] //Max health?
mov [esi+0c],eax
Which game is this for?
Here is a snippet from my trainer source for Devil May Cry 3.
cmp byte ptr [HealthFlag],01h
jne OriginalHealth
push eax
mov eax, [ebp+2a20h]
mov [ebp+2a4ch],eax
pop eax
OriginalHealth:
push 59b7afh
ret
nop
nop
|
|
| Back to top |
|
 |
vergilganesh Expert Cheater
Reputation: 0
Joined: 01 Jul 2013 Posts: 134 Location: India
|
Posted: Wed Aug 07, 2013 7:30 am Post subject: |
|
|
The code given by mgr.inz.player is worked for me. The game is prototype. Maximum health is seperated in 3 instructions.
max health = [esi+10]+[esi+14]+[esi+1F8] (2700+1000+200). I already hacked devil may cry 3. This is the code for god mode cheat.
| Code: |
[ENABLE]
alloc(health,64)
label(returnhere)
label(originalcode)
label(god)
label(exit)
health:
cmp byte ptr [eax+3c],1
je god
originalcode:
fsub dword ptr [esp+24]
god:
fstp dword ptr [eax+04]
exit:
jmp returnhere
"dmc3se.exe"+467A5:
jmp newmem
nop
nop
returnhere:
[DISABLE]
dealloc(newmem)
"dmc3se.exe"+467A5:
fsub dword ptr [esp+24]
fstp dword ptr [eax+04]
//Alt: db D8 64 24 24 D9 58 04
|
|
|
| Back to top |
|
 |
|