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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x518f6a
sub esp, 0x68
mov eax, dword [esp + 0x70]
test eax, eax
je 0x518b75
cmp eax, 1
je 0x518b5a
lea ecx, [eax - 1]
mov edx, dword [esp + 0x7c]
mov ebx, edx
imul edx, ecx
mov ebp, dword [esp + 0x6c]
xor esi, esi
jmp 0x518ba5
mov eax, dword [esp + 0x6c]
mov ecx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], eax
add esp, 0x68
ret
mov dword [esp + 0x80], 0
mov dword [esp + 0x84], 0
add esp, 0x68
ret
lea edi, [esi + 1]
mov dword [esp + 0x28], edi
lea edi, [ebp + esi*8]
mov edi, dword [edi + 4]
add edx, edi
mov edi, dword [esp + 0x28]
mov esi, edi
cmp eax, esi
jg 0x518b8f
mov dword [esp + 0x58], 0
mov dword [esp + 0x5c], 0
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 0
nop
lea eax, [esp + 0x58]
mov dword [esp + 0x58], eax
test edx, edx
jl 0x518f51
mov dword [esp + 0x40], ecx
mov esi, dword [esp + 0x60]
mov edi, dword [esp + 0x64]
mov dword [esp + 0x3c], edi
sub edi, esi
cmp edx, edi
jle 0x518c6b
mov dword [esp + 0x2c], esi
lea eax, [0x63efa0]
mov dword [esp], eax
mov dword [esp + 4], esi
mov ecx, dword [esp + 0x3c]
lea ecx, [edx + ecx*2]
mov dword [esp + 0x30], ecx
mov dword [esp + 8], ecx
call fcn.00447490
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x60]
mov ebx, dword [esp + 0x2c]
cmp edx, ebx
jl 0x518c2b
mov edx, ebx
cmp ecx, eax
je 0x518c4b
mov dword [esp + 0x54], eax
mov dword [esp], eax
mov dword [esp + 4], ecx
mov dword [esp + 8], edx
call fcn.0045f7b0
mov eax, dword [esp + 0x54]
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x60], ebx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x64], ecx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
mov ecx, dword [esp + 0x40]
mov ebx, dword [esp + 0x7c]
mov ebp, dword [esp + 0x6c]
mov edx, dword [ebp + 4]
mov esi, dword [ebp]
nop
mov edi, dword [esp + 0x58]
test edi, edi
je 0x518c83
cmp edi, eax
je 0x518c87
jmp 0x518f39
mov dword [esp + 0x58], eax
mov edi, dword [esp + 0x60]
lea ebx, [edx + edi]
mov eax, dword [esp + 0x64]
mov ecx, dword [esp + 0x5c]
cmp eax, ebx
jae 0x518cdc
mov dword [esp + 0x3c], edi
mov dword [esp + 0x24], edx
mov dword [esp + 0x48], esi
mov dword [esp], ecx
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
lea eax, [0x63efa0]
mov dword [esp + 0x10], eax
call fcn.00447550
mov ecx, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x50], ecx
lea ebp, [ecx + edi]
mov dword [esp], ebp
mov dword [esp + 4], esi
mov dword [esp + 8], edx
call fcn.0045f7b0
mov eax, dword [esp + 0x38]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x74]
dec eax
neg eax
sar eax, 0x1f
and eax, 8
mov ecx, dword [esp + 0x6c]
add eax, ecx
mov dword [esp + 0x4c], eax
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x78]
xor ebp, ebp
jmp 0x518d99
mov dword [esp + 0x38], ebp
mov dword [esp + 0x34], ebx
mov dword [esp + 0x50], esi
add eax, esi
mov dword [esp], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.0045f7b0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x3c]
lea ebp, [eax + 1]
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
mov ebx, dword [esp + 0x4c]
mov eax, ebx
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x78]
cmp ebp, ecx
jge 0x518ed9
lea esi, [eax + ebp*8]
mov edi, dword [esi + 4]
mov esi, dword [esi]
nop
nop
mov eax, dword [esp + 0x58]
test eax, eax
je 0x518dc9
lea ecx, [esp + 0x58]
cmp eax, ecx
jne 0x518f21
lea eax, [esp + 0x58]
mov ecx, dword [esp + 0x40]
jmp 0x518dd1
lea eax, [esp + 0x58]
mov dword [esp + 0x58], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x3c], ebp
mov ecx, dword [esp + 0x60]
lea ebp, [edx + ecx]
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x5c]
cmp esi, ebp
jae 0x518e2a
mov dword [esp + 0x38], ecx
mov dword [esp], edi
mov dword [esp + 4], ebp
mov dword [esp + 8], esi
mov dword [esp + 0xc], edx
lea eax, [0x63efa0]
mov dword [esp + 0x10], eax
call fcn.00447550
mov edi, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x7c]
mov ebx, dword [esp + 0x78]
mov dword [esp + 0x38], esi
mov dword [esp + 0x34], ebp
mov dword [esp + 0x50], edi
lea eax, [edi + ecx]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov dword [esp + 8], edx
call fcn.0045f7b0
mov eax, dword [esp + 0x34]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x5c], eax
nop
mov eax, dword [esp + 0x58]
test eax, eax
je 0x518e77
lea ecx, [esp + 0x58]
cmp eax, ecx
je 0x518e83
jmp 0x518f09
lea eax, [esp + 0x58]
mov dword [esp + 0x58], eax
lea ecx, [esp + 0x58]
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x20]
lea ebx, [edx + eax]
mov ebp, dword [esp + 0x64]
mov esi, dword [esp + 0x5c]
cmp ebp, ebx
jae 0x518d3a
mov dword [esp + 0x38], eax
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edx
lea eax, [0x63efa0]
mov dword [esp + 0x10], eax
call fcn.00447550
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x20]
jmp 0x518d3a
mov eax, dword [esp + 0x5c]
mov ecx, eax
neg eax
mov edx, dword [esp + 0x60]
cmp edx, eax
ja 0x518efb
mov dword [esp + 0x80], ecx
mov dword [esp + 0x84], edx
add esp, 0x68
ret
test ecx, ecx
je 0x518f04
call fcn.004580c0
call fcn.00458100
lea eax, [0x63eda0]
mov dword [esp], eax
lea eax, [0x6d2a58]
mov dword [esp + 4], eax
call fcn.00433470
lea eax, [0x63eda0]
mov dword [esp], eax
lea eax, [0x6d2a58]
mov dword [esp + 4], eax
call fcn.00433470
lea eax, [0x63eda0]
mov dword [esp], eax
lea eax, [0x6d2a58]
mov dword [esp + 4], eax
call fcn.00433470
lea eax, [0x63eda0]
mov dword [esp], eax
lea eax, [0x6d2a60]
mov dword [esp + 4], eax
call fcn.00433470
nop
call fcn.0045dbb0
jmp fcn.00518b20