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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x5166de
sub esp, 0x70
lea eax, [0x5d4780]
mov dword [esp], eax
mov dword [esp + 4], 0
call fcn.00404700
mov eax, dword [esp + 8]
mov dword [esp + 0x3c], eax
mov dword [esp], 0x14
lea ecx, [0x626ff4]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x80]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], eax
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x14], ebx
mov ebp, dword [esp + 0x78]
mov dword [esp + 0x18], ebp
call fcn.0043c0d0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov eax, dword [esp + 0x74]
mov ecx, dword [eax + 0x14]
mov edx, dword [esp + 0x78]
mov dword [esp], edx
call ecx
mov eax, dword [esp + 4]
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x68], ecx
lea ecx, [esp + 0x54]
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x60], eax
lea eax, [esp + 0x60]
mov dword [esp], eax
lea eax, [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], 2
mov byte [esp + 0x14], 1
call fcn.00441d30
mov eax, dword [esp + 0x18]
test eax, eax
je 0x516607
cmp eax, 1
jne 0x5166dd
mov eax, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x54]
test eax, eax
jne 0x5164d3
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
add esp, 0x70
ret
mov dword [esp + 0x50], ecx
mov dword [esp + 0x2c], eax
mov dword [esp + 0x28], edx
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
mov ecx, dword [esp + 0x80]
mov dword [esp + 4], ecx
call fcn.005150d0
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x5165e6
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x10]
mov edx, dword [esp + 0x50]
mov dword [esp], edx
call ecx
mov eax, dword [esp + 4]
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x24], ecx
lea edx, [0x5f9e60]
mov dword [esp], edx
call fcn.0040b8d0
mov edi, dword [esp + 4]
mov eax, dword [esp + 0x24]
mov dword [edi + 4], eax
mov eax, dword [0x7a0970]
test eax, eax
jne 0x5165d8
mov ecx, dword [esp + 0x4c]
mov dword [edi], ecx
mov ecx, dword [esp + 0x80]
mov dword [edi + 0xc], ecx
mov ecx, dword [0x7a0970]
test ecx, ecx
jne 0x5165c2
mov eax, dword [esp + 0x7c]
mov dword [edi + 8], eax
mov eax, dword [0x783164]
mov ecx, dword [esp + 0x2c]
cmp dword [0x783160], ecx
je 0x516591
mov edx, dword [esp + 0x28]
lea eax, [0x65ea14]
mov ecx, edi
jmp 0x5164ba
mov dword [esp + 0x48], edi
mov dword [esp], ecx
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.004037c0
movzx eax, byte [esp + 0xc]
test al, al
je 0x5165bc
mov edi, dword [esp + 0x48]
mov byte [edi + 0x1a], 1
jmp 0x516580
mov edi, dword [esp + 0x48]
jmp 0x516580
lea ecx, [edi + 8]
mov eax, edi
mov edi, ecx
mov edx, eax
mov eax, dword [esp + 0x7c]
call fcn.0045de10
mov edi, edx
jmp 0x51656e
mov eax, dword [esp + 0x4c]
call fcn.0045de10
jmp 0x516553
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], 0
mov dword [esp + 0x8c], 0
add esp, 0x70
ret
mov eax, dword [esp + 0x74]
mov eax, dword [eax + 0x18]
mov ecx, dword [esp + 0x78]
mov dword [esp], ecx
call eax
mov eax, dword [esp + 4]
mov dword [esp + 0x20], eax
mov ecx, dword [esp + 8]
mov dword [esp + 0x38], ecx
mov edx, dword [esp + 4]
mov ebx, dword [0x782f14]
mov ebp, dword [esp + 8]
cmp dword [0x782f10], edx
je 0x516699
mov ebx, dword [0x77d2f4]
cmp dword [0x77d2f0], edx
je 0x516668
mov dword [esp + 0x84], 0
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], ecx
add esp, 0x70
ret
mov dword [esp], edx
mov dword [esp + 4], ebp
mov dword [esp + 8], ebx
call fcn.004037c0
movzx eax, byte [esp + 0xc]
test al, al
je 0x51668f
mov eax, dword [0x77d340]
mov ecx, dword [0x77d344]
jmp 0x51664b
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
jmp 0x51664b
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], ebp
mov dword [esp], edx
mov dword [esp + 4], ebp
mov dword [esp + 8], ebx
call fcn.004037c0
movzx eax, byte [esp + 0xc]
test al, al
je 0x5166c8
mov eax, dword [0x783130]
mov ecx, dword [0x783134]
jmp 0x51664b
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
mov ebp, dword [esp + 0x40]
jmp 0x51663d
nop
call fcn.0045c8b0
jmp fcn.00516390