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

Disassembly:
sub esp, 0x1b0
push ebx
push esi
mov esi, dword [esp + 0x1c0]
push 4
lea eax, [esp + 0x10]
mov ebx, ecx
push eax
mov ecx, esi
call fcn.0058dd50
test al, al
jne 0x52136e
pop esi
pop ebx
add esp, 0x1b0
ret 8
mov eax, dword [esp + 0xc]
push ebp
xor ebp, ebp
test eax, eax
push edi
jle 0x52141a
mov edi, edi
push pe_nt_image_headers32
lea ecx, [esp + 0xc4]
push ecx
mov ecx, esi
call fcn.0058dd50
test al, al
je 0x52142c
lea ecx, [ebx + 0x4c]
call fcn.00444700
mov edi, eax
mov eax, dword [esp + 0x1c4]
lea edx, [esp + 0xc0]
push edx
push eax
mov ecx, edi
call fcn.0059c760
test al, al
je 0x52142c
mov ecx, edi
call fcn.0059c060
mov eax, dword [ebx + 0x24]
mov ecx, dword [eax + 8]
test ecx, ecx
lea esi, [ebx + 0x14]
jne 0x5213e1
push 0xc
call fcn.005b9e72
add esp, 4
jmp 0x5213e4
mov dword [esi + 0x10], ecx
mov dword [eax], edi
mov ecx, dword [esi + 4]
mov dword [eax + 8], esi
mov dword [eax + 4], ecx
mov edx, dword [esi + 4]
mov dword [edx + 8], eax
mov edi, dword [esi + 0x18]
inc edi
mov dword [esi + 4], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 0x18], edi
mov edx, dword [ebx + 0xc]
mov esi, dword [esp + 0x1c8]
inc edx
inc ebp
cmp ebp, eax
mov dword [ebx + 0xc], edx
jl 0x521380
push 4
lea eax, [esp + 0x14]
push eax
mov ecx, esi
call fcn.0058dd50
test al, al
jne 0x52143b
pop edi
pop ebp
pop esi
xor al, al
pop ebx
add esp, 0x1b0
ret 8
mov eax, dword [esp + 0x10]
test eax, eax
mov dword [esp + 0x18], 0
jle 0x521713
nop
push 4
lea ecx, [esp + 0x38]
push ecx
mov ecx, esi
call fcn.0058dd50
push 0xc
lea edx, [esp + 0x20]
push edx
mov ecx, esi
call fcn.0058dd50
push 0xc
lea eax, [esp + 0x2c]
push eax
mov ecx, esi
call fcn.0058dd50
push 0xc
lea ecx, [esp + 0x3c]
push ecx
mov ecx, esi
call fcn.0058dd50
mov ebp, dword [esp + 0x34]
cmp ebp, 0xffffffff
je 0x5216fe
cmp ebp, dword [ebx + 0xc]
jge 0x5216fe
mov ecx, dword [ebx + 0x1c]
lea eax, [ebx + 0x14]
xor edx, edx
cmp ecx, eax
mov dword [eax + 0xc], ecx
je 0x5216fe
mov edi, dword [ecx]
test edi, edi
je 0x5216fe
jmp 0x5214c0
cmp edx, ebp
je 0x5214e1
mov ecx, dword [eax + 0xc]
mov ecx, dword [ecx + 8]
cmp ecx, eax
mov dword [eax + 0xc], ecx
je 0x5214d5
mov edi, dword [ecx]
jmp 0x5214d7
xor edi, edi
inc edx
test edi, edi
jne 0x5214c0
jmp 0x5216fe
test edi, edi
je 0x5216fe
lea ecx, [ebx + 0x5c]
call fcn.00520870
mov edx, dword [esp + 0x1c]
mov esi, eax
mov dword [esi + 4], edx
mov eax, dword [esp + 0x20]
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x24]
mov dword [esi + 0xc], ecx
mov edx, dword [esp + 0x28]
mov dword [esi + 0x10], edx
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x14], eax
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x18], ecx
mov edx, dword [esp + 0x38]
mov dword [esi + 0x1c], edx
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x20], eax
mov ecx, dword [esp + 0x40]
mov dword [esi + 0x24], ecx
push edi
mov ecx, esi
call fcn.00596350
mov edx, dword [edi + 0x118]
mov dword [esp + 0x50], edx
fld dword [edi + 0x11c]
fst dword [esp + 0x54]
lea ecx, [esp + 0x38]
fld dword [edi + 0x120]
push ecx
fst dword [esp + 0x5c]
lea edx, [esp + 0x60]
fld dword [edi + 0x108]
push edx
fst dword [esp + 0x58]
lea ecx, [esp + 0x70]
fstp dword [esp + 0x4c]
fxch st(1)
fstp dword [esp + 0x50]
fstp dword [esp + 0x54]
mov eax, dword [edi + 0x128]
fld dword [esp + 0x30]
mov dword [esp + 0x50], eax
fadd dword [esp + 0x24]
lea eax, [esp + 0x24]
push eax
mov dword [esp + 0x80], 0
fstp dword [esp + 0x68]
mov dword [esp + 0x7c], 0
fld dword [esp + 0x38]
mov dword [esp + 0x78], 0
fadd dword [esp + 0x2c]
mov dword [esp + 0x90], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x84], 0
fstp dword [esp + 0x6c]
mov dword [esp + 0xa0], 0
fld dword [esp + 0x3c]
mov dword [esp + 0x98], 0
fadd dword [esp + 0x30]
mov dword [esp + 0x94], 0
mov dword [esp + 0xac], 0
mov dword [esp + 0xa8], 0
fstp dword [esp + 0x70]
mov dword [esp + 0xa4], 0
mov dword [esp + 0xb0], 0x3f800000
mov dword [esp + 0x9c], 0x3f800000
mov dword [esp + 0x88], 0x3f800000
mov dword [esp + 0x74], 0x3f800000
call fcn.00520100
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0xac]
push edx
lea ecx, [esp + 0x58]
call fcn.00590390
mov ecx, dword [eax]
mov dword [esi + 0xa4], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xa8], edx
mov eax, dword [eax + 8]
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0xb8]
push edx
lea ecx, [esp + 0x4c]
mov dword [esi + 0xac], eax
call fcn.00590390
mov ecx, dword [eax]
mov dword [esi + 0xb0], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0xb4], edx
mov eax, dword [eax + 8]
mov dword [esi + 0xb8], eax
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax + 8]
test ecx, ecx
lea edi, [ebx + 0x30]
jne 0x5216d6
push 0xc
call fcn.005b9e72
add esp, 4
jmp 0x5216d9
mov dword [edi + 0x10], ecx
mov dword [eax], esi
mov ecx, dword [edi + 4]
mov esi, dword [esp + 0x1c8]
mov dword [eax + 4], ecx
mov dword [eax + 8], edi
mov edx, dword [edi + 4]
mov dword [edx + 8], eax
mov ecx, dword [edi + 0x18]
inc ecx
mov dword [edi + 4], eax
mov dword [edi + 0x18], ecx
inc dword [ebx + 0x10]
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x10]
inc eax
cmp eax, ecx
mov dword [esp + 0x18], eax
jl 0x521450
pop edi
pop ebp
pop esi
mov al, 1
pop ebx
add esp, 0x1b0
ret 8