Function at 0x4050f1
Capabilities:
Enumerate process modules

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413426
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x544
push esi
push edi
mov dword [ebp - 0x550], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x430], 0
mov ecx, 0x103
xor eax, eax
lea edi, [ebp - 0x42c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
push eax
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x405164
jmp 0x40537c
lea ecx, [ebp - 0x1c]
push ecx
push 0x410
lea edx, [ebp - 0x430]
push edx
mov eax, dword [ebp - 0x14]
push eax
call sub.PSAPI.DLL_EnumProcessModules
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40518b
jmp 0x40537c
mov ecx, dword [ebp - 0x1c]
shr ecx, 2
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
cmp eax, dword [ebp - 0x20]
jb 0x40536a
cmp dword [ebp + 0xc], 0
je 0x40536a
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x434], ecx
mov dword [ebp - 0x438], 0
mov dword [ebp - 0x438], 0
jmp 0x4051da
mov edx, dword [ebp - 0x438]
add edx, 1
mov dword [ebp - 0x438], edx
mov eax, dword [ebp - 0x438]
cmp eax, dword [ebp - 0x20]
jae 0x405368
mov ecx, dword [ebp - 0x438]
imul ecx, ecx, 0x128
mov edx, dword [ebp - 0x434]
mov eax, dword [ebp - 0x438]
mov eax, dword [ebp + eax*4 - 0x430]
mov dword [edx + ecx], eax
push 0x104
lea ecx, [ebp - 0x53c]
push ecx
mov edx, dword [ebp - 0x438]
mov eax, dword [ebp + edx*4 - 0x430]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call sub.PSAPI.DLL_GetModuleFileNameExA
test eax, eax
je 0x405363
push 0x103
lea edx, [ebp - 0x53c]
push edx
mov eax, dword [ebp - 0x438]
imul eax, eax, 0x128
mov ecx, dword [ebp - 0x434]
lea edx, [ecx + eax + 0x24]
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov eax, dword [ebp - 0x438]
imul eax, eax, 0x128
mov ecx, dword [ebp - 0x434]
mov byte [ecx + eax + 0x127], 0
push 0x104
mov edx, dword [ebp - 0x438]
imul edx, edx, 0x128
mov eax, dword [ebp - 0x434]
lea ecx, [eax + edx + 0x24]
push ecx
mov ecx, dword [ebp - 0x550]
call fcn.00405666
mov edx, dword [ebp - 0x438]
imul edx, edx, 0x128
mov eax, dword [ebp - 0x434]
lea ecx, [eax + edx + 0x24]
push ecx
lea ecx, [ebp - 0x54c]
call fcn.00403c50
mov dword [ebp - 4], 0
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov eax, dword [edx]
push eax
push 0x416b34
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_last_of_char_const___unsigned_int_const]
cmp eax, 0xffffffff
je 0x405351
push 0x1f
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
mov esi, eax
mov ecx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
mov edx, dword [ecx]
push edx
push 0x416b38
lea ecx, [ebp - 0x54c]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::find_last_of_char_const___unsigned_int_const]
lea eax, [esi + eax + 1]
push eax
mov ecx, dword [ebp - 0x438]
imul ecx, ecx, 0x128
mov edx, dword [ebp - 0x434]
lea eax, [edx + ecx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov ecx, dword [ebp - 0x438]
imul ecx, ecx, 0x128
mov edx, dword [ebp - 0x434]
mov byte [edx + ecx + 0x23], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54c]
call fcn.00403c80
jmp 0x4051cb
jmp 0x405372
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
xor edx, edx
test edx, edx
jne 0x40512c
cmp dword [ebp - 0x14], 0
je 0x40538c
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0
jne 0x4053a9
cmp dword [ebp + 0x14], 0
je 0x4053a3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp + 0x14]
mov dword [ecx], eax
xor edx, edx
test edx, edx
jne 0x405392
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0x10