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

Disassembly:
mov ecx, dword [0x84873c]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
lea eax, [esp - 0xa0]
cmp eax, dword [ecx + 8]
jbe 0x5205db
sub esp, 0x120
lea edi, [esp + 0xf0]
lea esi, [esp + 0x124]
call fcn.0046ad64
movzx ecx, byte [esp + 0x104]
test cl, cl
jbe 0x520594
lea edi, [esp + 0xd8]
lea esi, [esp + 0x124]
call fcn.0046ad64
lea edi, [esp + 0x90]
lea esi, [esp + 0x124]
call fcn.0046ad64
movzx ecx, byte [esp + 0xa4]
dec ecx
mov dword [esp + 0x38], ecx
lea edi, [esp + 0x108]
xor eax, eax
call fcn.0046a88a
lea edi, [esp]
lea esi, [esp + 0xd8]
call fcn.0046ad6e
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x14], ecx
call fcn.004d1700
lea edi, [esp + 0x108]
lea esi, [esp + 0x18]
call fcn.0046ad64
lea edi, [esp + 0x124]
lea esi, [esp + 0x108]
call fcn.0046ad64
lea edi, [esp + 0xc0]
lea esi, [esp + 0x108]
call fcn.0046ad64
lea edi, [esp + 0x7c]
lea esi, [esp + 0xc0]
call fcn.0046ad6e
lea ecx, [0x65c2e0]
mov dword [esp], ecx
call fcn.0040c880
mov ecx, dword [esp + 4]
mov dword [esp + 0x4c], ecx
lea edi, [esp]
lea esi, [esp + 0x7c]
call fcn.0046ad6e
call fcn.004d1c70
mov ecx, dword [esp + 0x4c]
mov edx, dword [ecx + 8]
mov ebx, dword [ecx + 0xc]
mov ebp, dword [ecx + 4]
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x1c]
mov dword [esp], ebp
mov dword [esp + 4], edx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
call fcn.004f4380
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x4c]
mov dword [ebp + 8], ecx
mov dword [ebp + 0xc], edx
mov ecx, dword [0x8489b0]
test ecx, ecx
je 0x5203b0
call fcn.0046a610
mov dword [edi], ebx
mov eax, dword [ebp + 4]
mov dword [edi + 4], eax
mov dword [ebp + 4], ebx
mov byte [ebp], 0
lea edi, [esp + 0x68]
lea esi, [esp + 0x7c]
call fcn.0046ad6e
mov eax, dword [esp + 0x78]
cmp dword [0x82194c], eax
jne 0x5203d4
xor eax, eax
jmp 0x5203e8
cmp dword [0x821950], eax
jne 0x5203e3
mov eax, 0x20
jmp 0x5203e8
mov eax, pe_nt_image_headers32
lea edi, [esp + 0xa8]
lea esi, [esp + 0x124]
call fcn.0046ad64
movzx ecx, byte [esp + 0xbc]
sub eax, ecx
mov dword [esp + 0x44], eax
nop
xor ecx, ecx
test cl, cl
je 0x520436
lea eax, [0x648d20]
mov dword [esp], eax
call fcn.0040c880
mov eax, dword [esp + 4]
mov dword [eax], 1
mov dword [eax + 4], 1
mov ecx, 2
jmp 0x520453
lea eax, [0x648ce0]
mov dword [esp], eax
call fcn.0040c880
mov eax, dword [esp + 4]
mov dword [eax], 1
mov ecx, 1
mov dword [esp + 0x40], ecx
mov dword [esp + 0x50], eax
lea edx, [0x65c2e0]
mov dword [esp], edx
call fcn.0040c880
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x40]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov edx, dword [0x8489b0]
test edx, edx
jne 0x520487
mov edx, dword [esp + 0x50]
jmp 0x520492
call fcn.0046a600
mov edx, dword [esp + 0x50]
mov dword [edi], edx
mov dword [esp + 0x48], eax
mov dword [eax + 4], edx
mov ebx, dword [esp + 0x44]
inc ebx
nop
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], ebx
call fcn.004f0d20
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x48]
mov dword [ebx + 8], eax
mov dword [ebx + 0xc], ecx
mov eax, dword [0x8489b0]
test eax, eax
je 0x5204ec
call fcn.0046a610
mov dword [edi], edx
mov eax, dword [ebx + 4]
mov dword [edi + 4], eax
mov dword [ebx + 4], edx
lea edi, [esp + 0x54]
lea esi, [esp + 0x7c]
call fcn.0046ad6e
mov eax, dword [esp + 0x64]
cmp dword [0x82194c], eax
jne 0x52050c
xor eax, eax
jmp 0x520520
cmp dword [0x821950], eax
jne 0x52051b
mov eax, 0x20
jmp 0x520520
mov eax, pe_nt_image_headers32
mov dword [esp + 0x3c], eax
lea ecx, [0x6611a0]
mov dword [esp], ecx
call fcn.0040c880
mov eax, dword [0x8489b0]
mov ecx, dword [esp + 4]
test eax, eax
jne 0x52054a
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x48]
jmp 0x52055c
call fcn.0046a610
mov eax, dword [esp + 0x4c]
mov dword [edi], eax
mov edx, dword [esp + 0x48]
mov dword [edi + 4], edx
mov dword [ecx], eax
mov dword [ecx + 4], edx
mov eax, dword [esp + 0x3c]
cmp eax, 0x80
sete al
mov byte [ecx + 8], al
mov dword [esp + 0x13c], ecx
mov dword [esp + 0x140], 0
mov dword [esp + 0x144], 0
add esp, 0x120
ret
lea eax, [0x655bc0]
mov dword [esp], eax
call fcn.0040c880
mov eax, dword [esp + 4]
mov dword [eax + 4], 0xe
lea ecx, [0x683a28]
mov dword [eax], ecx
mov dword [esp + 0x13c], 0
lea ecx, [0x6db5d4]
mov dword [esp + 0x140], ecx
mov dword [esp + 0x144], eax
add esp, 0x120
ret
call fcn.00469200
jmp fcn.00520240