Function at 0x401170
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate processes
Execute shellcode via indirect call
Inject thread
Read file on windows
Spawn thread to rwx shellcode
Terminate process
Terminate process by name

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x154
mov eax, dword [0x404004]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push esi
push edi
push 0x403148
push str.stealth.dll
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
je 0x40143b
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
push 2
push 0
push edi
call esi
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_ftell]
push 0
push 0
push edi
mov ebx, eax
call esi
push ebx
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 0x20
mov dword [esp + 0x10], eax
test eax, eax
je 0x40143b
push edi
push ebx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 0x14
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x4012d1
xor ebx, ebx
mov dword [esp + 0x30], 0x128
push 0x124
lea eax, [esp + 0x38]
mov dword [esp + 0x18], ebx
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [esp + 0x30]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4012b2
mov edi, dword [sym.imp.KERNEL32.dll_Process32Next]
lea eax, [esp + 0x30]
push eax
push esi
call edi
test eax, eax
je 0x4012b2
nop word [eax + eax]
mov eax, str.gta_sa.exe
lea ecx, [esp + 0x54]
nop dword [eax]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x401280
test dl, dl
je 0x40127c
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x401280
add ecx, 2
add eax, 2
test dl, dl
jne 0x401260
xor eax, eax
jmp 0x401285
sbb eax, eax
or eax, 1
test eax, eax
je 0x40129e
lea eax, [esp + 0x30]
push eax
push esi
call edi
test eax, eax
jne 0x401250
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4012bd
push dword [esp + 0x38]
push 0
push 0x2a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
mov dword [esp + 0x14], eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x4012eb
push 0x40
push str.Failed
push str.GTA:SA_is_not_running_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.00401444
mov esp, ebp
pop ebp
ret
mov edi, dword [esp + 0x10]
push 0x40
push 0x3000
mov esi, dword [edi + 0x3c]
add esi, edi
mov dword [esp + 0x24], esi
push dword [esi + 0x50]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push dword [esi + 0x54]
mov dword [esp + 0x20], eax
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor eax, eax
xor edi, edi
cmp ax, word [esi + 6]
jae 0x40135b
add esi, 0x10c
nop dword [eax]
mov eax, dword [esi]
add eax, dword [esp + 0x10]
push 0
push dword [esi - 4]
push eax
mov eax, dword [esi - 8]
add eax, dword [esp + 0x24]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [esp + 0x1c]
lea esi, [esi + 0x28]
inc edi
movzx eax, word [eax + 6]
cmp edi, eax
jl 0x401330
push dword [esp + 0x10]
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
mov edi, fcn.00401160
sub edi, section..text
push 0x20
push 0x3000
lea eax, [edi + 0x10]
push eax
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
mov eax, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RtlZeroMemory
push str.ntdll
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call esi
push 0
push 0x10
mov dword [esp + 0x34], eax
lea eax, [esp + 0x28]
push eax
push ebx
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
push edi
mov edi, dword [esp + 0x1c]
lea esi, [ebx + 0x10]
push section..text
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0xffffffffffffffff
push 0
push 0
push ebx
push esi
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push 0x40
push str.Injected
push str.Stealth_has_been_injected_into_the_game_successfully_
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [esp + 0x15c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401444
mov esp, ebp
pop ebp
ret
push 1
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3