Function at 0x405eb9
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d8
and byte [ebp - 0x1b4], 0
push ebx
push esi
push edi
push 0x41
xor eax, eax
pop ecx
lea edi, [ebp - 0x1b3]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0xac]
mov dword [ebp - 0xac], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x4060f9
cmp dword [ebp - 0x9c], 2
jne 0x406040
push str.PSAPI.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x14], edi
je 0x4060f9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.EnumProcessModules
push edi
call esi
push str.GetModuleFileNameExA
push edi
mov dword [ebp - 4], eax
call esi
cmp dword [ebp - 4], 0
mov dword [ebp - 0x18], eax
je 0x405fb8
test eax, eax
je 0x405fb8
push dword [ebp + 8]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [ebp - 0xc], eax
je 0x40602d
and dword [ebp - 8], 0
mov edi, dword [sym.imp.KERNEL32.dll_HeapFree]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov ebx, 0x400
cmp dword [ebp - 8], 0
je 0x405f85
push dword [ebp - 8]
push 0
call esi
push eax
call edi
add ebx, ebx
push ebx
push 0
call esi
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
mov dword [ebp - 8], eax
je 0x405faf
lea ecx, [ebp - 0x10]
push ecx
push ebx
push eax
push dword [ebp - 0xc]
call dword [ebp - 4]
test eax, eax
je 0x405fbc
cmp dword [ebp - 0x10], ebx
jb 0x405fc8
jmp 0x405f73
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
jmp 0x406030
push dword [ebp - 8]
push 0
call esi
push eax
call edi
jmp 0x405faf
shr dword [ebp - 0x10], 2
mov dword [ebp - 4], 0
je 0x40601a
mov ebx, dword [ebp - 8]
lea eax, [ebp - 0x1b4]
push 0x104
push eax
push dword [ebx]
push dword [ebp - 0xc]
call dword [ebp - 0x18]
test eax, eax
jne 0x405ff6
and byte [ebp - 0x1b4], al
push dword [ebp + 0x10]
lea eax, [ebp - 0x1b4]
push eax
push dword [ebx]
push dword [ebp + 8]
call dword [ebp + 0xc]
test eax, eax
je 0x40601a
inc dword [ebp - 4]
add ebx, 4
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0x10]
jb 0x405fd8
push dword [ebp - 8]
push 0
call esi
push eax
call edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop esi
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
jmp 0x4060fb
cmp dword [ebp - 0x9c], 1
jne 0x4060f9
push str.Kernel32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
mov dword [ebp - 0x14], edi
je 0x4060f9
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.CreateToolhelp32Snapshot
push edi
call esi
push str.Module32First
push edi
mov ebx, eax
call esi
push str.Module32Next
push edi
mov dword [ebp - 4], eax
call esi
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x406030
cmp dword [ebp - 4], esi
je 0x406030
cmp ebx, esi
je 0x406030
push dword [ebp + 8]
push 8
call ebx
mov ebx, eax
cmp ebx, 0xffffffff
je 0x405fb8
lea eax, [ebp - 0x3d8]
mov esi, 0x224
push eax
push ebx
mov dword [ebp - 0x3d8], esi
call dword [ebp - 4]
test eax, eax
je 0x40602d
push dword [ebp + 0x10]
lea eax, [ebp - 0x2b8]
push eax
push dword [ebp - 0x3bc]
push dword [ebp + 8]
call dword [ebp + 0xc]
test eax, eax
je 0x4060f5
lea eax, [ebp - 0x3d8]
mov dword [ebp - 0x3d8], esi
push eax
push ebx
call edi
jmp 0x4060c1
xor eax, eax
jmp 0x4060c1
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret