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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x511aa8
sub esp, 0x60
mov ecx, dword [esp + 0x6c]
cmp ecx, 1
je 0x511a93
mov edx, dword [esp + 0x64]
mov edi, dword [edx + 0x10]
lea ebx, [edx + 0x10]
mov dword [esp + 0x5c], ebx
test edi, edi
je 0x511a74
mov dword [esp + 0x44], edi
mov ebp, dword [0x79e7b0]
mov esi, dword [edi + 0x10]
test ebp, ebp
jne 0x511a45
mov dword [edx + 0x10], esi
xor eax, eax
call fcn.004485c1
mov eax, dword [esp + 0x44]
mov dword [esp + 0x3c], eax
movzx ecx, byte [esp + 0x74]
mov byte [eax], cl
lea ebp, [eax + 0x10]
test byte [ebp], al
mov dword [eax + 8], 0
mov dword [eax + 0xc], 1
mov esi, dword [0x79e7b0]
lea edi, [eax + 4]
mov dword [esp + 0x58], edi
test esi, esi
jne 0x511a1f
mov dword [eax + 4], ebp
xor ebp, ebp
jmp 0x51172c
inc ebp
movzx ecx, byte [esp + 0x74]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x6c]
cmp ebp, esi
jge 0x51195a
mov dword [esp + 0x34], ebp
mov ebx, dword [esp + 0x68]
mov edi, dword [ebx + ebp*4]
mov dword [esp + 0x40], edi
movzx edx, byte [edi]
cmp dl, cl
je 0x511802
mov edx, dword [eax + 4]
mov ecx, dword [eax + 8]
mov ebx, dword [eax + 0xc]
lea esi, [ecx + 1]
cmp esi, ebx
jg 0x511790
lea ebx, [ecx + 1]
mov dword [eax + 8], ebx
lea ebx, [edx + ecx*4]
mov esi, dword [0x79e7b0]
test esi, esi
jne 0x51177a
mov dword [edx + ecx*4], edi
jmp 0x51171a
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.0040d8c0
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x34]
jmp 0x51171a
lea eax, [0x5e1f40]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
call fcn.004350a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x3c]
mov dword [ebx + 0xc], edx
mov edx, dword [0x79e7b0]
test edx, edx
jne 0x5117dc
mov dword [ebx + 4], eax
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x40]
mov edx, eax
mov eax, ebx
jmp 0x511762
mov dword [esp + 0x54], eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040d8c0
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
jmp 0x5117ce
mov edx, dword [eax + 8]
mov ecx, dword [edi + 8]
lea ebx, [edx + ecx]
mov dword [esp + 0x2c], ebx
mov esi, dword [eax + 0xc]
mov ebp, dword [eax + 4]
mov eax, dword [edi + 0xc]
mov edi, dword [edi + 4]
cmp ebx, esi
ja 0x51190b
cmp ebx, esi
ja 0x511aa1
cmp edx, ebx
ja 0x511aa1
mov dword [esp + 0x28], esi
mov dword [esp + 0x50], ebp
sub esi, edx
mov dword [esp + 0x24], esi
xchg esi, ebx
neg ebx
xchg esi, ebx
shl edx, 2
sar esi, 0x1f
and edx, esi
add edx, ebp
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x24]
mov dword [esp + 0xc], edx
lea edx, [0x5e1f40]
mov dword [esp], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
call fcn.0040dc20
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
mov eax, dword [0x79e7b0]
test eax, eax
jne 0x5118f1
mov eax, dword [esp + 0x50]
mov dword [ecx + 4], eax
mov eax, dword [0x79e7b0]
mov edx, dword [esp + 0x40]
lea ebx, [edx + 0x10]
mov ebp, dword [esp + 0x64]
mov esi, dword [ebp + 0x10]
test eax, eax
jne 0x5118c7
mov dword [edx + 0x10], esi
mov dword [ebp + 0x10], edx
mov eax, ecx
mov ebp, dword [esp + 0x34]
jmp 0x51171a
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.0040d8c0
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
call fcn.0040d8c0
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x64]
jmp 0x5118bc
mov eax, dword [esp + 0x58]
mov dword [esp], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
call fcn.0040d8c0
mov ecx, dword [esp + 0x3c]
jmp 0x51189e
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x20], edx
lea eax, [0x5e1f40]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.004350a0
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x4c]
jmp 0x511823
cmp cl, 0x13
je 0x511967
mov dword [esp + 0x78], eax
add esp, 0x60
ret
mov ecx, dword [eax + 4]
mov ebx, dword [eax + 8]
mov ebp, dword [eax + 0xc]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
mov dword [esp], edx
call fcn.00511ac0
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x3c]
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], eax
mov eax, dword [0x79e7b0]
test eax, eax
jne 0x511a01
mov dword [ebx + 4], edx
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x5119fa
mov eax, dword [edx]
mov ecx, dword [0x79e7b0]
lea edx, [ebx + 0x10]
mov ebp, dword [esp + 0x64]
mov esi, dword [ebp + 0x10]
test ecx, ecx
jne 0x5119cd
mov dword [ebx + 0x10], esi
mov dword [ebp + 0x10], ebx
jmp 0x51195f
mov dword [esp + 0x38], eax
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.0040d8c0
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
call fcn.0040d8c0
mov eax, dword [esp + 0x38]
jmp 0x51195f
mov eax, ebx
jmp 0x51195f
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x58]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040d8c0
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
jmp 0x5119a7
mov dword [esp], edi
mov dword [esp + 4], ebp
call fcn.0040d8c0
mov eax, dword [esp + 0x3c]
movzx ecx, byte [esp + 0x74]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
jmp 0x511716
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.0040d8c0
lea eax, [0x5e5b60]
mov dword [esp], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
call fcn.0040ddd0
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
jmp 0x5116db
lea eax, [0x5e5b60]
mov dword [esp], eax
call fcn.0040d050
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
jmp 0x5116df
mov eax, dword [esp + 0x68]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
add esp, 0x60
ret
call fcn.004243c0
ud2
call fcn.00446b60
jmp fcn.00511680