Function at 0x405760
Capabilities:
Parse pe header
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
cmp dword [ebp + 8], 0
je 0x40595c
mov eax, dword [ebp + 8]
movzx ecx, word [eax]
cmp ecx, 0x5a4d
jne 0x40595c
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x3c]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
jne 0x40595c
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x7c]
mov dword [ebp - 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x78]
mov dword [ebp - 0x28], edx
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x4057bf
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
jmp 0x4057cf
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.004056b0
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x2c]
mov dword [ebp - 0xc], ecx
movzx edx, byte [ebp + 0x10]
test edx, edx
je 0x4057eb
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x1c]
mov dword [ebp - 0x30], ecx
jmp 0x4057fe
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.004056b0
mov dword [ebp - 0x30], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], edx
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x40581a
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x24]
mov dword [ebp - 0x34], edx
jmp 0x40582d
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0x24]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004056b0
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x34]
mov dword [ebp - 0x24], eax
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x405849
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x20]
mov dword [ebp - 0x38], eax
jmp 0x40585c
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx + 0x20]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.004056b0
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x38]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x18], 0
mov byte [ebp - 5], 1
mov dword [ebp - 0x10], 0
jmp 0x405882
mov edx, dword [ebp - 0x10]
add edx, 1
mov dword [ebp - 0x10], edx
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
cmp ecx, dword [eax + 0x18]
jae 0x40595c
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + edx*2]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + ecx*4]
cmp eax, dword [ebp - 0x28]
jb 0x4058c2
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
cmp dword [edx + eax*4], ecx
jb 0x405957
movzx eax, byte [ebp - 5]
test eax, eax
je 0x4058f5
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
jne 0x4058f1
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax + edx*4]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004056b0
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, dword [edx + ecx*4]
mov dword [ebp - 0x18], eax
mov byte [ebp - 5], 0
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax*4]
add edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00406eca
add esp, 8
test eax, eax
jne 0x405957
movzx ecx, byte [ebp + 0x10]
test ecx, ecx
je 0x405932
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
movzx ecx, word [eax + edx*2]
mov edx, dword [ebp - 0x1c]
mov eax, dword [edx + ecx*4]
mov dword [ebp - 0x3c], eax
jmp 0x40594f
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x24]
movzx eax, word [edx + ecx*2]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx + eax*4]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.004056b0
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
add eax, dword [ebp - 0x3c]
jmp 0x40595e
jmp 0x405879
xor eax, eax
mov esp, ebp
pop ebp
ret 0xc