Function at 0x100405b0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006ea28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x1268
call fcn.1004d330
push 0x100942bc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x24], eax
mov eax, dword [str.psapi.dll]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x10040605
mov ecx, dword [str.psapi.dll]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x20], 0
push 0x100942d8
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x10040644
push str.EnumProcessModules
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x18], eax
push 0x10094300
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x1004066e
push str.GetModuleInformation
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
push 0x10094330
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x10040698
push str.GetModuleFileNameExW
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x1c], 0
je 0x100406aa
cmp dword [ebp - 0x18], 0
je 0x100406aa
cmp dword [ebp - 0x20], 0
jne 0x100406c3
push str._n_nPSAPI_error_n_n
mov edx, dword [0x100beb90]
push edx
call fcn.1000fa10
add esp, 8
jmp 0x10040871
push str.Loaded_Modules_List_n
mov eax, dword [0x100beb90]
push eax
call fcn.1000e6e0
add esp, 8
push 0x10094388
mov ecx, dword [0x100beb90]
push ecx
call fcn.1000e6e0
add esp, 8
push str.BaseAddr____Size_________Module_n
mov edx, dword [0x100beb90]
push edx
call fcn.1000e6e0
add esp, 8
push str._________________________________n
mov eax, dword [0x100beb90]
push eax
call fcn.1000e6e0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x34]
push ecx
push 0x1000
lea edx, [ebp - 0x1274]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x10040856
mov dword [ebp - 0x10], 0
jmp 0x1004074b
mov ecx, dword [ebp - 0x10]
add ecx, 1
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp - 0x34]
shr edx, 2
cmp dword [ebp - 0x10], edx
jae 0x10040854
push 0x30
lea eax, [ebp - 0x6c]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + ecx*4 - 0x1274]
push edx
mov eax, dword [ebp - 0x28]
push eax
call dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x38], eax
push 0x208
lea ecx, [ebp - 0x274]
push ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + edx*4 - 0x1274]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
call dword [ebp - 0x20]
mov dword [ebp - 0x30], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x2c], 0
je 0x10040813
cmp dword [ebp - 0x30], 0
je 0x10040813
lea edx, [ebp - 0x274]
push edx
lea eax, [ebp - 0x54]
push eax
call fcn.10011780
add esp, 8
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x54]
call fcn.10010070
push eax
mov ecx, 0xc
imul edx, ecx, 0
mov eax, dword [ebp + edx - 0x68]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp + ecx*4 - 0x1274]
push edx
push str.0x_p__0x_08X____s_n
mov eax, dword [0x100beb90]
push eax
call fcn.1000e6e0
add esp, 0x14
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x54]
call fcn.1000fe60
jmp 0x1004084f
cmp dword [ebp - 0x2c], 0
jne 0x10040831
mov ecx, dword [ebp - 0x38]
push ecx
push str.GetModuleInformation__._Win32_Error:_0x_08X_n
mov edx, dword [0x100beb90]
push edx
call fcn.1000fa10
add esp, 0xc
cmp dword [ebp - 0x30], 0
jne 0x1004084f
mov eax, dword [ebp - 0x3c]
push eax
push str.GetModuleFileNameExW__._Win32_Error:_0x_08X_n
mov ecx, dword [0x100beb90]
push ecx
call fcn.1000fa10
add esp, 0xc
jmp 0x10040742
jmp 0x10040871
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.EnumProcessModules___Win32_Error:_0x_08X_n
mov edx, dword [0x100beb90]
push edx
call fcn.1000fa10
add esp, 0xc
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret