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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x51345b
sub esp, 0x5c
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
lea edx, [0x60b2a9]
mov dword [esp + 8], edx
mov dword [esp + 0xc], 1
call fcn.004b54a0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], eax
test eax, eax
jl 0x513424
lea ecx, [eax + 1]
mov edx, dword [esp + 0x64]
cmp ecx, edx
ja 0x513454
sub edx, ecx
mov ebx, edx
neg edx
sar edx, 0x1f
and ecx, edx
mov edx, dword [esp + 0x60]
add ecx, edx
mov dword [esp], ecx
mov dword [esp + 4], ebx
call fcn.00513470
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 8]
test ecx, ecx
jne 0x513400
mov eax, dword [esp + 0x2c]
test eax, eax
jl 0x5133dc
mov ecx, dword [esp + 0x64]
cmp eax, ecx
ja 0x51344d
mov dword [esp + 0x58], ebx
mov dword [esp + 0x38], edx
mov ecx, dword [esp + 0x60]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.00514c20
movzx eax, byte [esp + 8]
test al, al
je 0x51336b
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov ecx, dword [esp + 0x2c]
mov dword [esp + 4], ecx
lea edx, [0x60b2a3]
mov dword [esp + 8], edx
mov dword [esp + 0xc], 1
call fcn.004b5390
movzx eax, byte [esp + 0x10]
test al, al
je 0x51328e
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
lea eax, [0x60b2a3]
mov dword [esp + 8], eax
mov dword [esp + 0xc], 1
mov byte [esp + 0x10], 1
call fcn.005124e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x50], edx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x30], ebx
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], 5
call fcn.00511900
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test edx, edx
jne 0x51326a
mov dword [esp + 0x44], eax
mov dword [esp + 0x28], ecx
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov dword [esp + 8], 5
call fcn.00511900
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test edx, edx
jne 0x513246
mov dword [esp + 0x4c], eax
mov dword [esp + 0x34], ecx
lea eax, [0x5e7400]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
mov dword [esp + 0x3c], eax
mov ecx, dword [esp + 0x28]
mov dword [eax + 4], ecx
mov ecx, dword [0x749b10]
test ecx, ecx
jne 0x513230
mov ecx, dword [esp + 0x44]
mov dword [eax], ecx
mov ecx, dword [esp + 0x34]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x749b10]
lea edx, [eax + 8]
test ecx, ecx
jne 0x51321a
mov ecx, dword [esp + 0x4c]
mov dword [eax + 8], ecx
mov byte [eax + 0x10], 1
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
add esp, 0x5c
ret
mov dword [esp], edx
mov eax, dword [esp + 0x4c]
mov dword [esp + 4], eax
call fcn.0040e560
mov eax, dword [esp + 0x3c]
jmp 0x5131ee
mov dword [esp], eax
mov ecx, dword [esp + 0x44]
mov dword [esp + 4], ecx
call fcn.0040e560
mov eax, dword [esp + 0x3c]
jmp 0x5131d3
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ebx
add esp, 0x5c
ret
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ebx
add esp, 0x5c
ret
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 4], eax
mov dword [esp + 8], 5
call fcn.00511900
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
test edx, edx
jne 0x513347
mov dword [esp + 0x48], eax
mov dword [esp + 0x24], ecx
lea eax, [0x5e7400]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
mov dword [esp + 0x40], eax
mov ecx, dword [esp + 0x24]
mov dword [eax + 4], ecx
mov ecx, dword [0x749b10]
test ecx, ecx
jne 0x513331
mov ecx, dword [esp + 0x48]
mov dword [eax], ecx
mov dword [eax + 0xc], 0
mov ecx, dword [0x749b10]
lea edx, [eax + 8]
test ecx, ecx
jne 0x51331b
mov dword [eax + 8], 0
mov byte [eax + 0x10], 0
jmp 0x5131f2
mov dword [esp], edx
mov dword [esp + 4], 0
call fcn.0040e560
mov eax, dword [esp + 0x40]
jmp 0x513312
mov dword [esp], eax
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], ecx
call fcn.0040e560
mov eax, dword [esp + 0x40]
jmp 0x5132f7
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], edx
mov dword [esp + 0x78], ebx
add esp, 0x5c
ret
lea eax, [0x5d9920]
mov dword [esp], eax
call fcn.0040dcf0
mov eax, dword [esp + 4]
mov dword [eax + 4], 0x19
mov ecx, dword [0x749b10]
test ecx, ecx
jne 0x5133c0
lea ecx, [0x611874]
mov dword [eax], ecx
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
lea ecx, [0x63cfc0]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
add esp, 0x5c
ret
mov dword [esp + 0x54], eax
mov dword [esp], eax
lea ecx, [0x611874]
mov dword [esp + 4], ecx
call fcn.0040e560
mov eax, dword [esp + 0x54]
jmp 0x513396
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], 0
mov dword [esp + 0x78], 0
add esp, 0x5c
ret
mov dword [esp + 0x68], 0
mov dword [esp + 0x6c], 0
mov dword [esp + 0x70], 0
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], eax
add esp, 0x5c
ret
mov eax, dword [esp + 0x60]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
call fcn.00513470
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 8]
jmp 0x51307b
call fcn.00425870
ud2
call fcn.00425870
ud2
call fcn.0044a470
jmp fcn.00512ff0