.data
counter dd ?
cheat_flag db FALSE
.code
cheat proc
mov eax,dword ptr ds:[counter]
test eax,eax
jnz @F
cmp ebx, 4Ch ;L
jnz reset_counter
mov counter, 1
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 1
jnz short @F
cmp ebx, 46h ;F
jnz L
mov counter, 2
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 2
jnz short @F
cmp ebx, 0bdh ; -
jnz F
mov counter, 3
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 3
jnz short @F
cmp ebx, 45h ;E
jnz DASH
mov counter, 4
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 4
jnz @F
cmp ebx, 4Dh ;M
jnz E
mov counter, 5
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 5
jnz short @F
cmp ebx, 50h ;P
jnz M
mov counter, 6
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 6
jnz short @F
cmp ebx, 49h ;I
jnz P
mov counter, 7
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 7
jnz short @F
cmp ebx, 52h ;R
jnz I
mov counter, 8
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 8
jnz short @F
cmp ebx, 45h ;E
jnz R
mov counter, 9
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 9
jnz short @F
cmp ebx, 0beh ;.
jnz E_2
mov counter, 10
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 10
jnz short @F
cmp ebx, 44h ;D
jnz DOT
mov counter, 11
jmp return
; ---------------------------------------------------------------------------
@@:
cmp eax, 11
jnz short reset_counter
cmp ebx, 45h ;E
jnz D
call toggle_cheat
jmp return
; ---------------------------------------------------------------------------
L:
cmp ebx, 4Ch ; L
jmp short teh_jz
; ---------------------------------------------------------------------------
F:
cmp ebx, 46h ; F
jmp short teh_jz
; ---------------------------------------------------------------------------
DASH:
cmp ebx, 0bdh ; -
jmp short teh_jz
; ---------------------------------------------------------------------------
E:
cmp ebx, 45h ;E
jmp short teh_jz
; ---------------------------------------------------------------------------
M:
cmp ebx, 4Dh ;M
jmp short teh_jz
; ---------------------------------------------------------------------------
P:
cmp ebx, 50h ;P
jmp short teh_jz
; ---------------------------------------------------------------------------
I:
cmp ebx, 49h ;I
jmp short teh_jz
; ---------------------------------------------------------------------------
R:
cmp ebx, 52h ;R
jmp short teh_jz
; ---------------------------------------------------------------------------
E_2:
cmp ebx, 45h ;E
jmp short teh_jz
; ---------------------------------------------------------------------------
DOT:
cmp ebx, 0beh ;.
jmp short teh_jz
; ---------------------------------------------------------------------------
D:
cmp ebx, 44h ;D
teh_jz:
jz short return
reset_counter:
mov counter, 0
return:
MOV EAX,DWORD PTR DS:[458578h] ;line overwritten
ret
cheat endp
toggle_cheat proc
.IF cheat_flag == FALSE
mov cheat_flag, TRUE
.ELSE
mov cheat_flag,FALSE
.ENDIF
ret
toggle_cheat endp