diff --git a/resources/demo.gif b/resources/demo.gif deleted file mode 100644 index 2350732..0000000 Binary files a/resources/demo.gif and /dev/null differ diff --git a/src/hacks.asm b/src/hacks.asm index 217a037..f4db0d3 100644 --- a/src/hacks.asm +++ b/src/hacks.asm @@ -1,6 +1,14 @@ -; ----------------------------------------------------------------------------- -; Definitions -; ----------------------------------------------------------------------------- +; --------------------------------------------------------------------------- ; +; Exported Functions ; +; --------------------------------------------------------------------------- ; + +global _hack_god_mode +global _hack_ghost_mode +global _hack_disable_alarms + +; --------------------------------------------------------------------------- ; +; Definitions ; +; --------------------------------------------------------------------------- ; TYPE_PLAYER EQU 0x110E8B50 OFFSET_HEALTH EQU 0x003F07C8 @@ -8,29 +16,25 @@ OFFSET_VISIBILITY EQU 0x0027F12C OFFSET_NOISE EQU 0x00417E5D OFFSET_ALARMS EQU 0x0009BC61 -; ----------------------------------------------------------------------------- -; External Variables -; ----------------------------------------------------------------------------- - -extern _g_module_base_addr - -; ----------------------------------------------------------------------------- -; External Functions -; ----------------------------------------------------------------------------- +; --------------------------------------------------------------------------- ; +; Imported Functions ; +; --------------------------------------------------------------------------- ; extern _VirtualProtect@16 extern _memory_patch extern _memory_detour -; ----------------------------------------------------------------------------- -; Executable Code -; ----------------------------------------------------------------------------- -section .text -global _hack_god_mode -global _hack_ghost_mode -global _hack_disable_alarms +; --------------------------------------------------------------------------- ; +; Imported Variables ; +; --------------------------------------------------------------------------- ; +extern _g_module_base_addr + +; --------------------------------------------------------------------------- ; +; Executable Code ; +; --------------------------------------------------------------------------- ; +section .text health_original: sub eax, edx mov dword [ebx], eax @@ -53,6 +57,8 @@ skip_player: visibility_original: mov eax, dword [esi + 0x1518] +; mov eax, 0x1 +; nop noise_original: cmp edi, eax diff --git a/src/health_detour.asm b/src/health_detour.asm new file mode 100644 index 0000000..867160d --- /dev/null +++ b/src/health_detour.asm @@ -0,0 +1,17 @@ +section .text + +global _health_detour + +_health_detour: + cmp dword [edi], 0x110E8B50 + je $ + 0x08 + xor eax, eax + mov eax, eax + mov dword [ebx], eax + mov ebx, eax + mov eax, dword [esp + 0x14] + pop esi + mov dword [eax], ebx + pop ebx + pop ecx + ret 0x8