Function at 0x401240
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
mov eax, dword [0x406008]
xor eax, esp
mov dword [esp + 0x360], eax
push ebx
push esi
push edi
push 0
push 2
mov dword [esp + 0x1c], ecx
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov ebx, eax
mov dword [esp + 0x10], ebx
cmp ebx, 0xffffffff
jne 0x40129d
mov ecx, dword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
mov edx, str.Failed_to_create_snapshot_of_processes._n
call fcn.00401e70
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x360]
xor ecx, esp
call fcn.00402886
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x22c
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x4013e8
nop dword [eax]
push 0
push 0
push 0x104
lea eax, [esp + 0x26c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x68]
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea ecx, [esp + 0x260]
mov dword [esp + 0x18], 0
mov dword [esp + 0x28], 0
lea edx, [ecx + 1]
mov dword [esp + 0x2c], 0xf
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401304
sub ecx, edx
lea eax, [esp + 0x260]
push ecx
push eax
lea ecx, [esp + 0x20]
call fcn.00401be0
mov ecx, dword [esp + 0x14]
lea esi, [esp + 0x18]
mov ebx, dword [esp + 0x2c]
mov eax, ecx
mov edi, dword [esp + 0x18]
cmp ebx, 0x10
cmovae esi, edi
cmp dword [ecx + 0x14], 0x10
jb 0x40133f
mov eax, dword [ecx]
mov edx, dword [ecx + 0x10]
cmp edx, dword [esp + 0x28]
jne 0x4013a0
sub edx, 4
jb 0x401361
nop dword [eax]
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x401366
add eax, 4
add esi, 4
sub edx, 4
jae 0x401350
cmp edx, 0xfffffffc
je 0x40139a
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x401393
cmp edx, 0xfffffffd
je 0x40139a
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x401393
cmp edx, 0xfffffffe
je 0x40139a
mov cl, byte [eax + 2]
cmp cl, byte [esi + 2]
jne 0x401393
cmp edx, 0xffffffff
je 0x40139a
mov al, byte [eax + 3]
cmp al, byte [esi + 3]
je 0x40139a
sbb eax, eax
or eax, 1
jmp 0x40139c
xor eax, eax
test eax, eax
je 0x401406
cmp ebx, 0x10
jb 0x4013d0
lea ecx, [ebx + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x4013c6
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401457
push ecx
push edi
call fcn.004028c4
add esp, 8
mov ebx, dword [esp + 0x10]
lea eax, [esp + 0x30]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x4012c0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x360]
xor ecx, esp
call fcn.00402886
mov esp, ebp
pop ebp
ret
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [esp + 0x38]
cmp ebx, 0x10
jb 0x401440
lea ecx, [ebx + 1]
mov eax, edi
cmp ecx, 0x1000
jb 0x401436
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401457
push ecx
push edi
call fcn.004028c4
add esp, 8
mov ecx, dword [esp + 0x36c]
mov eax, esi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00402886
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3