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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc0
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x18], eax
xor eax, eax
push ebp
push 0x52f73a
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0
je 0x52f717
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
push 0x40
mov eax, dword [ebp - 0xc]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f717
mov eax, dword [ebp - 0xc]
cmp word [eax], 0x5a4d
jne 0x52f717
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x3c]
add eax, dword [ebp - 0xc]
mov dword [ebp - 8], eax
push 0xf8
mov eax, dword [ebp - 8]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f717
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
jne 0x52f717
mov eax, dword [ebp - 8]
add eax, 0x78
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x52f717
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
je 0x52f717
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
add eax, dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
push 0x28
mov eax, dword [ebp - 0x14]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f717
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x20]
mov eax, dword [ebp - 0xc]
add edx, eax
mov dword [ebp - 0x1c], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x24]
add edx, eax
mov dword [ebp - 0x24], edx
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x1c]
add edx, eax
mov dword [ebp - 0x20], edx
mov eax, dword [ebp + 0xc]
cmp eax, 0xffff
jle 0x52f616
or edi, 0xffffffff
mov eax, dword [ebp - 0x14]
mov ebx, dword [eax + 0x18]
dec ebx
test ebx, ebx
jl 0x52f61e
inc ebx
xor esi, esi
mov eax, esi
shl eax, 2
add eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
push 4
mov eax, dword [ebp - 0x2c]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f610
lea eax, [ebp - 0x18]
mov edx, dword [ebp - 0x2c]
mov edx, dword [edx]
add edx, dword [ebp - 0xc]
call fcn.00405288
lea eax, [ebp - 0x34]
mov edx, dword [ebp + 0xc]
call fcn.00405288
mov edx, dword [ebp - 0x34]
mov eax, dword [ebp - 0x18]
call fcn.004054b8
jne 0x52f610
mov eax, esi
add eax, eax
add eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], eax
push 2
mov eax, dword [ebp - 0x30]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f610
mov eax, dword [ebp - 0x30]
movzx edi, word [eax]
inc esi
dec ebx
jne 0x52f5af
jmp 0x52f61e
mov edx, dword [ebp - 0x14]
mov edi, eax
sub edi, dword [edx + 0x10]
test edi, edi
jl 0x52f717
mov eax, dword [ebp - 0x14]
cmp edi, dword [eax + 0x14]
jg 0x52f717
mov eax, edi
shl eax, 2
add eax, dword [ebp - 0x20]
mov dword [ebp - 0x28], eax
push 4
mov eax, dword [ebp - 0x28]
push eax
call sub.kernel32.dll_IsBadReadPtr
test eax, eax
jne 0x52f717
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov edx, dword [ebp - 0x28]
mov ebx, dword [edx]
cmp eax, ebx
ja 0x52f668
mov edx, dword [ebp - 0x10]
add eax, dword [edx + 4]
cmp ebx, eax
jbe 0x52f67b
test ebx, ebx
je 0x52f717
add ebx, dword [ebp - 0xc]
mov dword [ebp - 4], ebx
jmp 0x52f717
lea eax, [ebp - 0x18]
mov edx, ebx
add edx, dword [ebp + 8]
call fcn.00405288
mov edx, dword [ebp - 0x18]
mov eax, 0x52f758
call fcn.004056b0
mov ebx, eax
test ebx, ebx
jbe 0x52f717
lea eax, [ebp - 0x38]
push eax
mov edi, ebx
dec edi
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.004055cc
mov eax, dword [ebp - 0x38]
call fcn.0040556c
push eax
call sub.kernel32.dll_GetModuleHandleA_2
mov esi, eax
test esi, esi
jne 0x52f6e8
lea eax, [ebp - 0x3c]
push eax
mov ecx, edi
mov edx, 1
mov eax, dword [ebp - 0x18]
call fcn.004055cc
mov eax, dword [ebp - 0x3c]
call fcn.0040556c
push eax
call sub.kernel32.dll_LoadLibraryA
mov esi, eax
test esi, esi
je 0x52f717
lea eax, [ebp - 0x40]
push eax
mov eax, dword [ebp - 0x18]
call fcn.0040536c
mov ecx, eax
lea edx, [ebx + 1]
mov eax, dword [ebp - 0x18]
call fcn.004055cc
mov eax, dword [ebp - 0x40]
call fcn.0040556c
push eax
push esi
call sub.kernel32.dll_GetProcAddress_1
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x52f741
lea eax, [ebp - 0x40]
mov edx, 4
call fcn.004050b4
lea eax, [ebp - 0x18]
call fcn.00405090
ret