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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 4]
cmp eax, dword [ecx + 8]
jbe 0x517921
sub esp, 0x84
mov ecx, dword [esp + 0x90]
cmp ecx, 1
jb 0x51791a
lea edx, [ecx - 1]
mov dword [esp + 0x38], edx
mov ebx, edx
neg edx
sar edx, 0x1f
and edx, 1
mov dword [esp + 0x54], edx
mov ebp, dword [esp + 0x8c]
lea esi, [ebp + edx]
mov dword [esp + 0x60], esi
mov eax, ebx
mov ebx, dword [esp + 0x88]
mov edi, dword [ebx + 0x10]
lea esi, [ebx + 0x10]
test edi, edi
je 0x5178e3
mov dword [esp + 0x80], esi
mov dword [esp + 0x6c], edi
mov esi, dword [0x79e7b0]
mov edx, dword [edi + 0x10]
test esi, esi
jne 0x5178a3
mov dword [ebx + 0x10], edx
mov edx, eax
xor eax, eax
call fcn.004485c1
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x68], eax
mov byte [eax], 4
movzx ecx, word [ebx]
mov word [eax + 2], cx
lea ecx, [eax + 0x20]
test byte [ecx], al
mov dword [eax + 0x18], 0
mov dword [eax + 0x1c], 2
mov esi, dword [0x79e7b0]
lea edi, [eax + 0x14]
mov dword [esp + 0x7c], edi
test esi, esi
jne 0x51786e
mov dword [eax + 0x14], ecx
mov ecx, dword [esp + 0x90]
cmp ecx, 1
je 0x51785e
mov esi, dword [esp + 0x54]
movzx esi, byte [ebp + esi]
xchg esi, eax
cmp al, 0x5e
xchg esi, eax
jne 0x51784e
lea edx, [ecx - 2]
mov esi, edx
neg edx
sar edx, 0x1f
and edx, 1
mov ecx, dword [esp + 0x60]
add ecx, edx
movzx edx, word [ebx]
test dx, 4
jne 0x51712a
mov edx, dword [eax + 0x1c]
mov ebp, dword [eax + 0x18]
mov edi, dword [eax + 0x14]
lea ebx, [ebp + 2]
cmp ebx, edx
jg 0x5177cf
lea edx, [ebp + 2]
mov dword [eax + 0x18], edx
mov dword [edi + ebp*4], 0xa
mov dword [edi + ebp*4 + 4], 0xa
mov edx, 0xffffffff
mov dword [esp + 0x3c], edx
mov ebx, dword [eax + 0x1c]
mov ebp, dword [eax + 0x18]
mov edi, dword [eax + 0x14]
mov dword [esp + 0x58], eax
mov eax, 1
mov byte [esp + 0x37], al
mov eax, dword [esp + 0x58]
jmp 0x51716b
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x3c]
xor eax, eax
mov byte [esp + 0x37], al
mov eax, dword [esp + 0x68]
mov edx, esi
mov esi, edi
mov edi, edx
mov edx, dword [esp + 0x3c]
test esi, esi
jne 0x5176b3
mov dword [esp + 0x40], esi
mov dword [esp + 0x64], ecx
je 0x5176a7
movzx edx, byte [ecx]
cmp dl, 0x2d
jne 0x51769b
mov edx, dword [esp + 0x88]
movzx eax, word [edx]
test ax, 0x40
jne 0x5171aa
movzx eax, byte [esp + 0x37]
test al, al
je 0x5175b0
mov dword [esp + 0x78], edi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x48], ebp
cmp esi, 2
jle 0x5171d0
movzx eax, byte [ecx]
cmp al, 0x5b
jne 0x5171d0
movzx eax, byte [ecx + 1]
cmp al, 0x3a
je 0x517516
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebx
call fcn.00516800
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x1c]
mov esi, dword [esp + 0x18]
mov edi, dword [esp + 0x28]
test edx, edx
jne 0x5174eb
test esi, esi
jne 0x51714f
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x78]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0x48]
mov dword [esp + 0x10], ebp
mov esi, dword [esp + 0x4c]
mov dword [esp + 0x14], esi
call fcn.00516240
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x28]
test ecx, ecx
je 0x517276
mov edi, ebp
mov ebp, eax
mov esi, ecx
mov ecx, ebx
mov ebx, edx
jmp 0x51714f
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov ecx, dword [esp + 0x64]
mov dword [esp + 4], ecx
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov ebx, dword [esp + 0x8c]
mov dword [esp + 0xc], ebx
mov ebp, dword [esp + 0x90]
mov dword [esp + 0x10], ebp
call fcn.005160e0
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x18]
test ecx, ecx
jne 0x5174c0
cmp edx, 2
jl 0x5172e5
movzx eax, byte [ebp]
cmp al, 0x2d
jne 0x5172e5
movzx eax, byte [ebp + 1]
lea ecx, [ebp + 1]
cmp al, 0x5d
jne 0x517375
mov eax, ebx
mov dword [esp + 0x60], ebp
mov dword [esp + 0x38], edx
mov ecx, dword [esp + 0x88]
movzx esi, word [ecx]
test si, 1
jne 0x517343
mov ecx, dword [esp + 0x78]
mov dword [esp], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
call fcn.00517b00
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
mov edi, dword [esp + 0x38]
mov ebp, ecx
mov esi, edx
mov ebx, eax
mov ecx, dword [esp + 0x60]
jmp 0x51714f
mov ecx, dword [esp + 0x78]
mov dword [esp], ecx
mov ecx, dword [esp + 0x48]
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x4c]
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ebx
call fcn.00517c20
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
jmp 0x517330
mov dword [esp + 0x44], ebx
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov dword [esp + 4], ecx
lea ecx, [edx - 1]
mov dword [esp + 8], ecx
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0xc], ecx
mov edx, dword [esp + 0x90]
mov dword [esp + 0x10], edx
call fcn.005160e0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
mov ebp, dword [esp + 0x18]
test edx, edx
jne 0x517495
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jl 0x5173d8
mov edx, ebx
mov ebx, eax
mov eax, ecx
jmp 0x5172e7
mov eax, dword [esp + 0x40]
mov ecx, eax
sub eax, ebx
cmp eax, ecx
ja 0x51790c
mov dword [esp + 0x40], eax
lea eax, [0x5d7000]
mov dword [esp], eax
call fcn.0040d050
mov eax, dword [esp + 4]
mov dword [esp + 0x74], eax
mov dword [eax + 4], 0x1d
mov ecx, dword [0x79e7b0]
test ecx, ecx
jne 0x51747d
lea ecx, [0x602b36]
mov dword [eax], ecx
mov ecx, dword [esp + 0x40]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x79e7b0]
lea edx, [eax + 8]
test ecx, ecx
jne 0x517467
mov ecx, dword [esp + 0x64]
mov dword [eax + 8], ecx
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
lea ecx, [0x699b80]
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], eax
add esp, 0x84
ret
mov dword [esp], edx
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
call fcn.0040d8c0
mov eax, dword [esp + 0x74]
jmp 0x517436
mov dword [esp], eax
lea ecx, [0x602b36]
mov dword [esp + 4], ecx
call fcn.0040d8c0
mov eax, dword [esp + 0x74]
jmp 0x51741b
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], ecx
add esp, 0x84
ret
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], eax
add esp, 0x84
ret
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], edx
mov dword [esp + 0xa0], eax
add esp, 0x84
ret
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], ebx
call fcn.00516390
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
mov ebp, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x18]
test ecx, ecx
jne 0x517585
test edi, edi
je 0x517565
mov ecx, ebx
mov ebx, ebp
mov ebp, esi
mov esi, edi
mov edi, edx
jmp 0x51714f
mov ecx, dword [esp + 0x64]
mov edx, dword [esp + 0x88]
mov ebx, dword [esp + 0x4c]
mov ebp, dword [esp + 0x48]
mov esi, dword [esp + 0x40]
mov edi, dword [esp + 0x78]
jmp 0x5171d0
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], eax
add esp, 0x84
ret
cmp esi, 1
je 0x5175c2
movzx eax, byte [ecx + 1]
cmp al, 0x5d
je 0x5171aa
lea eax, [esi - 1]
mov edx, eax
neg eax
sar eax, 0x1f
and eax, 1
add eax, ecx
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0044ea90
mov eax, dword [esp + 0xc]
inc eax
mov ecx, dword [esp + 0x40]
cmp eax, ecx
ja 0x517913
mov dword [esp + 0x54], eax
lea eax, [0x5d7000]
mov dword [esp], eax
call fcn.0040d050
mov eax, dword [esp + 4]
mov dword [esp + 0x74], eax
mov dword [eax + 4], 0x1d
mov ecx, dword [0x79e7b0]
test ecx, ecx
jne 0x517683
lea ecx, [0x602b36]
mov dword [eax], ecx
mov ecx, dword [esp + 0x54]
mov dword [eax + 0xc], ecx
mov ecx, dword [0x79e7b0]
lea edx, [eax + 8]
test ecx, ecx
jne 0x51766d
mov ecx, dword [esp + 0x64]
mov dword [eax + 8], ecx
mov dword [esp + 0x94], 0
mov dword [esp + 0x98], 0
lea ecx, [0x699b80]
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], eax
add esp, 0x84
ret
mov dword [esp], edx
mov eax, dword [esp + 0x64]
mov dword [esp + 4], eax
call fcn.0040d8c0
mov eax, dword [esp + 0x74]
jmp 0x51763c
mov dword [esp], eax
lea ecx, [0x602b36]
mov dword [esp + 4], ecx
call fcn.0040d8c0
mov eax, dword [esp + 0x74]
jmp 0x517621
mov edx, dword [esp + 0x88]
jmp 0x5171aa
mov edx, dword [esp + 0x88]
jmp 0x5171aa
movzx edx, byte [ecx]
cmp dl, 0x5d
je 0x5176c6
test esi, esi
mov edx, dword [esp + 0x3c]
jmp 0x517173
movzx edx, byte [esp + 0x37]
test dl, dl
je 0x5176da
test esi, esi
mov edx, dword [esp + 0x3c]
jmp 0x517173
mov dword [eax + 0x18], ebp
mov dword [eax + 0x1c], ebx
lea edx, [esi - 1]
mov dword [esp + 0x38], edx
neg edx
sar edx, 0x1f
and edx, 1
add ecx, edx
mov dword [esp + 0x60], ecx
mov edx, dword [0x79e7b0]
test edx, edx
jne 0x5177ba
mov dword [eax + 0x14], edi
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
call fcn.00517930
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
mov edx, dword [esp + 4]
mov ebx, dword [esp + 0x3c]
test ebx, ebx
jl 0x517799
mov ebx, dword [esp + 0x68]
mov dword [ebx + 0x18], ecx
mov dword [ebx + 0x1c], eax
mov eax, dword [0x79e7b0]
test eax, eax
jne 0x517783
mov dword [ebx + 0x14], edx
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov dword [esp + 4], ebx
call fcn.005102b0
mov eax, dword [esp + 0x60]
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 0x98], eax
mov dword [esp + 0x9c], 0
mov dword [esp + 0xa0], 0
add esp, 0x84
ret
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040d8c0
mov ebx, dword [esp + 0x68]
jmp 0x51773d
mov dword [esp], edx
mov dword [esp + 4], ecx
mov dword [esp + 8], eax
call fcn.00518490
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x14]
jmp 0x517726
mov eax, dword [esp + 0x7c]
mov dword [esp], eax
mov dword [esp + 4], edi
call fcn.0040d8c0
jmp 0x517706
mov dword [esp + 0x54], esi
mov dword [esp + 0x78], ecx
lea eax, [0x5cd160]
mov dword [esp], eax
mov dword [esp + 4], edi
mov dword [esp + 8], ebp
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], ebx
call fcn.004350a0
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x68]
mov dword [ebx + 0x1c], edx
mov edx, dword [0x79e7b0]
test edx, edx
jne 0x517828
mov dword [ebx + 0x14], eax
mov esi, dword [esp + 0x54]
mov ebp, ecx
mov edi, eax
mov eax, ebx
mov ecx, dword [esp + 0x78]
jmp 0x517115
mov dword [esp + 0x70], eax
mov dword [esp + 0x50], ecx
mov ecx, dword [esp + 0x7c]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040d8c0
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x50]
mov ebx, dword [esp + 0x68]
jmp 0x517815
mov esi, edx
mov ecx, dword [esp + 0x60]
mov edx, 1
jmp 0x51712f
mov esi, edx
mov ecx, dword [esp + 0x60]
mov edx, 1
jmp 0x51712f
mov dword [esp], edi
mov dword [esp + 4], ecx
call fcn.0040d8c0
mov ecx, dword [esp + 0x90]
cmp ecx, 1
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
mov edi, dword [esp + 0x7c]
jmp 0x5170ca
mov eax, dword [esp + 0x80]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040d8c0
lea eax, [0x5e5b60]
mov dword [esp], eax
mov eax, dword [esp + 0x6c]
mov dword [esp + 4], eax
call fcn.0040ddd0
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
jmp 0x517083
lea eax, [0x5e5b60]
mov dword [esp], eax
call fcn.0040d050
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x38]
mov ebx, dword [esp + 0x88]
mov ebp, dword [esp + 0x8c]
jmp 0x517087
call fcn.004243c0
ud2
call fcn.004243c0
ud2
call fcn.004243c0
ud2
call fcn.00446b60
jmp fcn.00516ff0