Function at 0x401210
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40239d
mov eax, dword fs:[0]
push eax
sub esp, 0x298
mov eax, dword [0x404004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x4012a9
lea eax, [ebp - 0x24c]
mov dword [ebp - 0x24c], 0x22c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x4012a9
mov edi, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__wcsicmp]
mov ebx, dword [sym.imp.KERNEL32.dll_Process32NextW]
nop dword [eax + eax]
lea eax, [ebp - 0x228]
push str.FiveM_GTAProcess.exe
push eax
call edi
add esp, 8
test eax, eax
je 0x4014c7
lea eax, [ebp - 0x24c]
push eax
push esi
call ebx
test eax, eax
jne 0x401280
xor ebx, ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebx
call fcn.00401160
push ebx
push 0
push 0x1fffff
mov edi, eax
call dword [sym.imp.KERNEL32.dll_OpenProcess]
xorps xmm0, xmm0
mov dword [ebp - 0x14], 0
movq qword [ebp - 0x1c], xmm0
lea ecx, [ebp - 0x1c]
push 0xc
mov dword [ebp - 0x268], eax
add edi, 0x2652868
mov dword [ebp - 0x2a4], 0xa0
mov dword [ebp - 0x2a0], 0
mov dword [ebp - 0x29c], 0
mov dword [ebp - 0x298], 8
mov dword [ebp - 0x294], 0
mov dword [ebp - 0x290], 0x18
mov dword [ebp - 0x28c], 0xa8
mov dword [ebp - 0x288], 0x50
mov dword [ebp - 0x284], 0x10
mov dword [ebp - 0x280], 0x20
mov dword [ebp - 0x27c], 0x50
mov dword [ebp - 0x278], 0x560
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call fcn.004015b0
mov esi, dword [ebp - 0x1c]
lea eax, [ebp - 0x2a4]
push 0x30
push eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esi, 0x30
add esp, 0xc
mov dword [ebp - 0x254], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 4], 0
xor ebx, ebx
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ebp - 0x250], ecx
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x264], ebx
mov dword [ebp - 0x274], ebx
mov dword [ebp - 0x270], eax
mov dword [ebp - 0x260], ebx
mov dword [ebp - 0x26c], ebx
mov dword [ebp - 0x25c], ecx
mov dword [ebp - 0x258], eax
cmp dword [ebp - 0x250], esi
je 0x401439
mov ebx, dword [ebp - 0x250]
lea ecx, [ebp - 0x274]
sub esi, ebx
sar esi, 2
push esi
call fcn.004015b0
mov eax, dword [ebp - 0x254]
sub eax, ebx
push eax
push ebx
mov ebx, dword [ebp - 0x274]
push ebx
mov dword [ebp - 0x264], ebx
call sub.VCRUNTIME140.dll_memmove
lea eax, [ebx + esi*4]
mov dword [ebp - 0x25c], ebx
mov ecx, ebx
add esp, 0xc
mov ebx, dword [ebp - 0x26c]
mov edx, eax
mov dword [ebp - 0x258], ecx
mov dword [ebp - 0x260], ebx
sub edx, ecx
mov dword [ebp - 0x250], edi
sar edx, 2
xor esi, esi
test edx, edx
je 0x401498
sub eax, dword [ebp - 0x258]
sar eax, 2
mov dword [ebp - 0x254], eax
mov ebx, eax
nop dword [eax + eax]
push 0
push 4
lea eax, [ebp - 0x250]
push eax
push edi
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
mov eax, dword [ebp - 0x25c]
mov edi, dword [eax + esi*4]
inc esi
add edi, dword [ebp - 0x250]
mov dword [ebp - 0x250], edi
cmp esi, ebx
jb 0x401460
mov ebx, dword [ebp - 0x260]
mov ecx, dword [ebp - 0x264]
test ecx, ecx
je 0x4014dc
sub ebx, ecx
mov eax, ecx
and ebx, 0xfffffffc
cmp ebx, 0x1000
jb 0x4014d2
mov ecx, dword [ecx - 4]
add ebx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4014d2
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
mov ebx, dword [ebp - 0x244]
jmp 0x4012a9
push ebx
push ecx
call fcn.00401675
add esp, 8
push 0
push 4
lea eax, [ebp - 0x20]
mov dword [ebp - 0x20], 0x3eaf1aa0
push eax
push edi
push dword [ebp - 0x268]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov edx, dword [ebp - 0x1c]
test edx, edx
je 0x401531
mov ecx, dword [ebp - 0x14]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffc
cmp ecx, 0x1000
jb 0x401527
mov edx, dword [edx - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x401527
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.00401675
add esp, 8
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00401637
mov esp, ebp
pop ebp
ret