Function at 0x404140
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0x170
mov eax, 0x446b8e
call fcn.0040f6fe
mov dword [ebp - 0x16c], ecx
mov eax, dword [ecx + 0x3c]
mov edi, dword [eax + ecx + 0x80]
add edi, ecx
xor ebx, ebx
jmp 0x40456a
mov esi, dword [edi + 0xc]
add esi, ecx
cmp byte [0x464938], 0
je 0x404181
push str._________________________________________________________________________n
call fcn.004033fa
pop ecx
mov dword [ebp - 0x11c], ebx
lea ecx, [ebp - 0x12c]
mov dword [ebp - 0x118], ebx
push esi
mov dword [ebp - 0x11c], ebx
mov dword [ebp - 0x118], 0xf
mov byte [ebp - 0x12c], bl
call fcn.004027a2
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x12c]
mov eax, dword [0x464950]
push ecx
cmp dword [0x464954], eax
je 0x4041d6
mov ecx, eax
call fcn.0040261d
add dword [0x464950], 0x18
jmp 0x4041e1
push eax
mov ecx, 0x46494c
call fcn.00404b3b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x12c]
call fcn.0040277c
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
test ebx, ebx
jne 0x404295
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x404295
push str.__dll_not_exists__n
call fcn.004033fa
pop ecx
mov dword [ebp - 0x134], ebx
lea ecx, [ebp - 0x144]
mov dword [ebp - 0x130], ebx
push esi
mov dword [ebp - 0x134], ebx
mov dword [ebp - 0x130], 0xf
mov byte [ebp - 0x144], bl
call fcn.004027a2
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x144]
mov eax, dword [0x46495c]
push ecx
cmp dword [0x464960], eax
je 0x404276
mov ecx, eax
call fcn.0040261d
add dword [0x46495c], 0x18
jmp 0x404281
push eax
mov ecx, 0x464958
call fcn.00404b3b
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x144]
call fcn.0040277c
jmp 0x404561
push 0x104
xor esi, esi
lea eax, [ebp - 0x114]
push esi
push eax
call fcn.0042a960
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov dword [ebp - 0x15c], esi
mov dword [ebp - 0x158], esi
call fcn.00404a20
mov dword [ebp - 0x15c], eax
mov dword [ebp - 4], 4
mov eax, dword [ebx + 0x3c]
and dword [ebp - 0x154], 0
mov eax, dword [eax + ebx + 0x78]
mov ecx, dword [eax + ebx + 0x20]
mov edx, dword [eax + ebx + 0x24]
add ecx, ebx
mov esi, dword [eax + ebx + 0x18]
add edx, ebx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x150], esi
mov dword [ebp - 0x148], edx
test esi, esi
je 0x4043cc
mov edi, dword [ebp - 0x154]
mov eax, dword [ecx + edi*4]
lea ecx, [ebp - 0x15c]
add eax, ebx
mov dword [ebp - 0x160], eax
movzx eax, word [edx + edi*2]
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x170]
push eax
call fcn.00404666
mov esi, dword [ebp - 0x170]
cmp esi, dword [ebp - 0x15c]
je 0x404366
mov edx, dword [ebp - 0x148]
movzx eax, word [edx + edi*2]
cmp eax, dword [esi + 0x10]
jae 0x4043aa
lea eax, [ebp - 0x14c]
push ecx
mov dword [ebp - 0x154], eax
lea eax, [ebp - 0x154]
push eax
push ecx
lea ecx, [ebp - 0x15c]
call fcn.00404d51
push eax
add eax, 0x10
lea ecx, [ebp - 0x15c]
push eax
push esi
lea eax, [ebp - 0x174]
push eax
call fcn.00404da0
mov esi, dword [ebp - 0x174]
mov edx, dword [ebp - 0x148]
mov eax, dword [ebp - 0x160]
inc edi
mov ecx, dword [ebp - 0x168]
mov dword [esi + 0x14], eax
cmp edi, dword [ebp - 0x150]
jb 0x40431b
mov edi, dword [ebp - 0x164]
mov ecx, dword [edi]
mov esi, dword [ebp - 0x16c]
add ecx, esi
mov eax, dword [edi + 0x10]
and dword [ebp - 0x160], 0
add eax, esi
mov dword [ebp - 0x17c], eax
mov eax, dword [ecx]
mov dword [ebp - 0x168], ecx
test eax, eax
je 0x404550
and dword [ebp - 0x154], 0
mov edi, ecx
mov dword [ebp - 0x14c], ecx
test eax, eax
jns 0x4044c5
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x148], eax
test eax, eax
je 0x4044b4
cmp byte [0x464938], 0
je 0x404510
mov ecx, dword [ebp - 0x14c]
mov eax, dword [ecx]
lea ecx, [ebp - 0x15c]
and eax, 0xffff
mov dword [ebp - 0x150], eax
dec eax
mov dword [ebp - 0x14c], eax
lea eax, [ebp - 0x14c]
push eax
lea eax, [ebp - 0x178]
push eax
call fcn.00404666
mov eax, dword [ebp - 0x178]
cmp eax, dword [ebp - 0x15c]
je 0x404481
mov ecx, dword [ebp - 0x14c]
cmp ecx, dword [eax + 0x10]
jae 0x404487
mov eax, dword [ebp - 0x15c]
cmp eax, dword [ebp - 0x15c]
jne 0x40449c
push dword [ebp - 0x150]
push str._t__48d_n
jmp 0x404503
push dword [eax + 0x14]
push dword [ebp - 0x150]
push str._t__4d:__s_n
call fcn.004033fa
add esp, 0xc
jmp 0x40450a
mov ecx, dword [ebp - 0x14c]
movzx eax, word [ecx]
push eax
push str._t__48d__n
jmp 0x404503
add eax, 2
add eax, esi
push eax
push ebx
mov dword [ebp - 0x150], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x148], eax
test eax, eax
je 0x4044f8
cmp byte [0x464938], 0
je 0x404510
push dword [ebp - 0x150]
push str._t__48s_n
jmp 0x404503
push dword [ebp - 0x150]
push str._t__48s__n
call fcn.004033fa
pop ecx
pop ecx
mov eax, dword [ebp - 0x148]
mov edx, dword [ebp - 0x154]
mov ecx, dword [ebp - 0x17c]
mov dword [edx + ecx], eax
mov eax, dword [ebp - 0x160]
inc eax
mov edx, eax
mov dword [ebp - 0x160], eax
shl edx, 2
mov dword [ebp - 0x154], edx
lea ecx, [edx + edi]
mov eax, dword [ecx]
mov dword [ebp - 0x14c], ecx
test eax, eax
jne 0x404409
mov edi, dword [ebp - 0x164]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x15c]
call fcn.004045d3
xor ebx, ebx
mov ecx, dword [ebp - 0x16c]
add edi, 0x14
mov dword [ebp - 0x164], edi
cmp dword [edi], ebx
jne 0x404168
xor eax, eax
inc eax
call fcn.0040f6a8
ret