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

Disassembly:
sub esp, 0x6c
mov eax, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x28], eax
mov eax, dword [0x2a3e044]
mov dword [esp + 0x5c], eax
xor eax, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 4]
mov dword [esp + 0x4c], eax
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x48]
mov eax, dword [eax]
add eax, 0x78
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x50]
mov eax, dword [eax + 4]
test eax, eax
jne 0x403968
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x50]
mov edx, dword [eax]
mov eax, dword [esp + 0x4c]
add eax, edx
mov dword [esp + 0x54], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x40398e
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x4039a9
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x28]
shr eax, 0x10
test ax, ax
jne 0x4039fd
mov eax, dword [esp + 0x28]
movzx edx, ax
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x10]
cmp edx, eax
jae 0x4039e2
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x28]
movzx edx, ax
mov eax, dword [esp + 0x54]
mov ecx, dword [eax + 0x10]
mov eax, edx
sub eax, ecx
mov dword [esp + 0x34], eax
jmp 0x403b71
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x18]
test eax, eax
jne 0x403a23
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x30]
test eax, eax
jne 0x403b0d
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x20]
mov eax, dword [esp + 0x4c]
add eax, edx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x24]
mov eax, dword [esp + 0x4c]
add eax, edx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x18]
shl eax, 3
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov dword [esp + 0x44], eax
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x44]
mov dword [eax + 0x30], edx
cmp dword [esp + 0x44], 0
jne 0x403a97
mov dword [esp], 0xe
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov dword [esp + 0x38], 0
jmp 0x403ad6
mov eax, dword [esp + 0x3c]
mov edx, dword [eax]
mov eax, dword [esp + 0x4c]
add edx, eax
mov eax, dword [esp + 0x44]
mov dword [eax], edx
mov eax, dword [esp + 0x40]
movzx edx, word [eax]
mov eax, dword [esp + 0x44]
mov word [eax + 4], dx
add dword [esp + 0x38], 1
add dword [esp + 0x3c], 4
add dword [esp + 0x40], 2
add dword [esp + 0x44], 8
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x18]
cmp dword [esp + 0x38], eax
jb 0x403aa1
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x18]
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x30]
mov dword [esp + 0xc], 0x4049ac
mov dword [esp + 8], 8
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_qsort
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x18]
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 0x30]
mov dword [esp + 0x10], 0x404a08
mov dword [esp + 0xc], 8
mov dword [esp + 8], edx
mov dword [esp + 4], eax
lea eax, [esp + 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_bsearch
mov dword [esp + 0x58], eax
cmp dword [esp + 0x58], 0
jne 0x403b62
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x58]
movzx eax, word [eax + 4]
movzx eax, ax
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax + 0x14]
cmp dword [esp + 0x34], eax
jbe 0x403b96
mov dword [esp], 0x7f
mov eax, dword [sym.imp.KERNEL32.dll_SetLastError]
call eax
sub esp, 4
mov eax, 0
jmp 0x403bb4
mov eax, dword [esp + 0x54]
mov edx, dword [eax + 0x1c]
mov eax, dword [esp + 0x34]
shl eax, 2
add edx, eax
mov eax, dword [esp + 0x4c]
add eax, edx
mov edx, dword [eax]
mov eax, dword [esp + 0x4c]
add eax, edx
mov ecx, dword [esp + 0x5c]
sub ecx, dword [0x2a3e044]
je 0x403bc5
call fcn.004016b0
add esp, 0x6c
ret