Подписывайтесь на наш Telegram и не пропускайте важные новости! Перейти

Исходник AssaultCube cheat (x86 Assembly)

Участник
Участник
Статус
Оффлайн
Регистрация
8 Янв 2020
Сообщения
428
Реакции
234
Простой чит для ассаулт куба на ассемблере, сделан за время стояния афк для производства одного иридия в IndustrialCraft2.
Может кому-то будет полезно для изучения.

Демонстрация

Для сборки потребуется NASM и линковщик визуал студии.
Команды для сборки:
nasm -f win32 assaulthack.asm -o ah.obj
link /subsystem:windows /dll /entry:DllMain ah.obj /out:assaulthack.dll kernel32.lib

Код:
Expand Collapse Copy
; kernel32.dll exports,
; std(cal)l is pretty dumb, yeah
extern _CreateThread@24
extern _AllocConsole@0

global _DllMain@12

section .data
    ; vars there, idc
    local_player dd 0x0058AC00

section .text
_Cheat:
    push ebp
    mov ebp, esp
    call _AllocConsole@0 ; allocate console to see if thread initialized
    ; do infinite loop there
LoopStart:
    mov eax, [local_player] ; read local player pointer address
    mov eax, [eax] ; read actual local player pointer
    mov dword [eax+0xEC], 9999 ; infinite health
    mov dword [eax+0xF0], 9999 ; infinite armor
    ; no recoil
    mov dword [eax+0x40], 0 ; since we are just setting it to zero dont bother with sse or fpu
    ; get current weapon
    mov eax, dword [eax+0x364]
    ; infinite ammo
    mov ecx, dword [eax+0x10] ; get reserve ammo count ptr
    mov dword [ecx], 9999 ; better way - get magsize from guninfo and set it as ammo count instead of 9999
    ; rapid fire and no reload
    mov ecx, dword [eax+0x18] ; get gunwait (next attack delay) ptr
    mov dword [ecx], 0 ; set it to zero
    jmp LoopStart
ReturnCheat:
    mov esp, ebp
    pop ebp
    ret 4 ; clear stack from one dword argument

_DllMain@12:
    push ebp
    mov ebp, esp
    mov eax, dword [ebp+0xC] ; dwReason
    cmp eax, 1 ; check for DLL_PROCESS_ATTACH reason
    je ThreadCreation
    mov eax, 0 ; FALSE
ReturnDllMain:
    mov esp, ebp
        pop ebp
    ret 12
ThreadCreation:
    push 0
    push 0
    push 0
    push _Cheat
    push 0
    push 0
    call _CreateThread@24 ; create cheat thread
    add esp, 24 ; clear stack from 6 dword arguments
    mov eax, 1 ; TRUE
    jmp ReturnDllMain
 
Последнее редактирование:
Назад
Сверху Снизу