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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
lea eax, [esp - 0x10]
cmp eax, dword [ecx + 8]
jbe 0x5169ca
sub esp, 0x90
xor ebx, ebx
mov dword [esp + 0xb4], ebx
mov dword [esp + 0xb8], ebx
mov dword [esp + 0xbc], ebx
mov dword [esp + 0xc0], ebx
mov ebx, dword [esp + 0xb0]
xor ebp, ebp
cmp ebx, ebp
jne 0x516159
mov ebx, 0x76a978
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], 0x26
mov dword [esp], 0x70b040
lea ebx, [esp + 0x88]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
call fcn.004178c0
lea ebx, [esp + 0xc]
cld
mov ecx, dword [ebx]
mov dword [esp], ecx
mov ecx, dword [ebx + 4]
mov dword [esp + 4], ecx
call fcn.00436f30
ud2
mov ecx, dword [esp + 0x98]
dec ecx
mov edi, dword [esp + 0x94]
mov esi, 0xc
cmp ecx, 0
jge 0x5161b7
mov ebp, ecx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov dword [esp + 0x4c], ebp
mov ebx, dword [esp + 0x4c]
dec ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov edx, ebx
mov eax, ebx
cmp esi, 0xffffffff
je 0x5169c1
cdq
idiv esi
mov ebp, eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ebx, ebp
inc ebx
sub edi, ebx
mov dword [esp + 0x4c], ecx
imul ebx, esi
add ebx, dword [esp + 0x4c]
mov ecx, ebx
cmp ecx, esi
jl 0x5161f4
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov edx, ecx
mov eax, ecx
cmp esi, 0xffffffff
je 0x5169b6
cdq
idiv esi
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
add edi, dword [esp + 0x30]
mov dword [esp + 0x4c], ecx
mov ebx, dword [esp + 0x30]
imul ebx, esi
mov ecx, dword [esp + 0x4c]
sub ecx, ebx
mov dword [esp + 0x94], edi
mov ebx, ecx
inc ebx
mov dword [esp + 0x98], ebx
mov edi, dword [esp + 0xa8]
mov ecx, dword [esp + 0xac]
mov esi, 0x3b9aca00
cmp ecx, 0
jge 0x51625c
mov ebp, ecx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov dword [esp + 0x4c], ebp
mov ebx, dword [esp + 0x4c]
dec ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov edx, ebx
mov eax, ebx
cmp esi, 0xffffffff
je 0x5169ad
cdq
idiv esi
mov ebp, eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ebx, ebp
inc ebx
sub edi, ebx
imul ebx, esi
add ebx, ecx
mov ecx, ebx
cmp ecx, esi
jl 0x516299
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov edx, ecx
mov eax, ecx
cmp esi, 0xffffffff
je 0x5169a2
cdq
idiv esi
mov dword [esp + 0x38], eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
add edi, dword [esp + 0x38]
mov ebp, dword [esp + 0x38]
mov dword [esp + 0x4c], ebp
mov ebx, dword [esp + 0x4c]
imul ebx, esi
sub ecx, ebx
mov ebp, edi
mov dword [esp + 0xac], ecx
mov edi, dword [esp + 0xa4]
mov ecx, ebp
mov esi, 0x3c
cmp ebp, 0
jge 0x5162f4
mov ebp, ecx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov dword [esp + 0x40], ebp
mov ebx, dword [esp + 0x40]
dec ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov edx, ebx
mov eax, ebx
cmp esi, 0xffffffff
je 0x516999
cdq
idiv esi
mov ebp, eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ebx, ebp
inc ebx
sub edi, ebx
imul ebx, esi
add ebx, ecx
mov ecx, ebx
cmp ecx, esi
jl 0x516331
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov edx, ecx
mov eax, ecx
cmp esi, 0xffffffff
je 0x51698e
cdq
idiv esi
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
add edi, dword [esp + 0x3c]
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0x4c], ebp
mov ebx, dword [esp + 0x4c]
imul ebx, esi
sub ecx, ebx
mov ebp, edi
mov dword [esp + 0xa8], ecx
mov edi, dword [esp + 0xa0]
mov ecx, ebp
mov esi, 0x3c
cmp ebp, 0
jge 0x51638c
mov ebp, ecx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov dword [esp + 0x40], ebp
mov ebx, dword [esp + 0x40]
dec ebx
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov edx, ebx
mov eax, ebx
cmp esi, 0xffffffff
je 0x516985
cdq
idiv esi
mov ebp, eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
mov ebx, ebp
inc ebx
sub edi, ebx
imul ebx, esi
add ebx, ecx
mov ecx, ebx
cmp ecx, esi
jl 0x5163c9
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov edx, ecx
mov eax, ecx
cmp esi, 0xffffffff
je 0x51697a
cdq
idiv esi
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
add edi, dword [esp + 0x2c]
mov ebp, dword [esp + 0x2c]
mov dword [esp + 0x4c], ebp
mov ebx, dword [esp + 0x4c]
imul ebx, esi
sub ecx, ebx
mov ebp, edi
mov dword [esp + 0xa4], ecx
mov edi, dword [esp + 0x9c]
mov ecx, ebp
mov esi, 0x18
cmp ebp, 0
jge 0x516424
mov ebp, ecx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
mov dword [esp + 0x40], ebp
mov ebx, dword [esp + 0x40]
dec ebx
mov dword [esp + 0x48], eax
mov dword [esp + 0x44], edx
mov edx, ebx
mov eax, ebx
cmp esi, 0xffffffff
je 0x516971
cdq
idiv esi
mov ebp, eax
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x48]
mov ebx, ebp
inc ebx
sub edi, ebx
imul ebx, esi
add ebx, ecx
mov ecx, ebx
cmp ecx, esi
jl 0x516459
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], edx
mov edx, ecx
mov eax, ecx
cmp esi, 0xffffffff
je 0x516966
cdq
idiv esi
mov dword [esp + 0x34], eax
mov edx, dword [esp + 0x48]
mov eax, dword [esp + 0x44]
add edi, dword [esp + 0x34]
mov ebx, dword [esp + 0x34]
imul ebx, esi
sub ecx, ebx
mov edx, edi
mov dword [esp + 0x9c], edi
mov dword [esp + 0xa0], ecx
mov eax, dword [esp + 0x94]
cdq
mov ebx, eax
sub ebx, 0xf2ee9141
sbb edx, 0xffffffbb
mov dword [esp + 0x50], ebx
mov dword [esp], ebx
mov dword [esp + 0x54], edx
mov dword [esp + 4], edx
mov dword [esp + 8], 0x190
mov dword [esp + 0xc], 0
call fcn.0045b4b0
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x84], eax
mov eax, 0x190
xor edx, edx
mov ebp, edx
or ebp, ecx
jne 0x516951
mul edi
mov ebp, eax
mov ebx, edx
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
sub eax, ebp
sbb edx, ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov eax, 0x23ab1
xor edx, edx
mov ebp, edx
or ebp, ecx
jne 0x51693c
mul edi
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], edx
mov eax, dword [esp + 0x50]
mov dword [esp], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 4], eax
mov dword [esp + 8], 0x64
mov dword [esp + 0xc], 0
call fcn.0045b4b0
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x84], eax
mov eax, 0x64
xor edx, edx
mov ebp, edx
or ebp, ecx
jne 0x516927
mul edi
mov ebp, eax
mov ebx, edx
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
sub eax, ebp
sbb edx, ebx
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov eax, dword [esp + 0x70]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 0x84], eax
mov eax, 0x8eac
xor edx, edx
mov ebp, edx
or ebp, ecx
jne 0x516912
mul edi
mov esi, dword [esp + 0x80]
mov ebp, dword [esp + 0x84]
add esi, eax
adc ebp, edx
mov ebx, dword [esp + 0x50]
mov ecx, dword [esp + 0x54]
shrd ebx, ecx, 2
shr ecx, 2
mov eax, dword [esp + 0x50]
mov dword [esp + 0x80], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x84], eax
mov eax, ebx
mov edi, ecx
shld edi, ebx, 2
shl eax, 2
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
sub eax, dword [esp + 0x78]
sbb edx, edi
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], edx
mov dword [esp + 0x80], esi
mov edi, ebp
mov eax, 0x5b5
xor edx, edx
mov ebp, edx
or ebp, ecx
jne 0x5168fd
mul ebx
mov ebx, eax
mov eax, dword [esp + 0x80]
add eax, ebx
adc edi, edx
mov ebx, eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x68], eax
mov ebp, dword [esp + 0x54]
mov dword [esp + 0x80], ebx
mov eax, 0x16d
xor edx, edx
mov esi, dword [esp + 0x68]
mov ebx, ebp
mov ebp, edx
or ebp, ebx
jne 0x5168e8
mul esi
mov ebx, eax
mov eax, dword [esp + 0x80]
mov esi, edi
add eax, ebx
adc esi, edx
mov edi, eax
mov edx, esi
mov ebx, dword [esp + 0x98]
dec ebx
mov ebp, 0x8c73c0
cmp ebx, 0xd
jae 0x5168e1
shl ebx, 2
add ebp, ebx
mov eax, dword [ebp]
cdq
mov ebx, eax
mov eax, edi
mov edi, esi
add eax, ebx
adc edi, edx
mov dword [esp + 0x70], eax
mov edx, edi
mov ecx, dword [esp + 0x94]
mov ebp, ecx
sar ebp, 0x1f
and ebp, 3
mov ebx, ecx
add ebx, ebp
and ebx, 3
sub ebx, ebp
cmp ebx, 0
jne 0x516717
mov eax, 0x51eb851f
mov dword [esp + 0x48], edx
imul ecx
mov ebx, edx
mov edx, dword [esp + 0x48]
sar ebx, 5
mov ebp, ecx
sar ebp, 0x1f
sub ebx, ebp
imul ebx, ebx, 0x64
mov ebp, ecx
sub ebp, ebx
cmp ebp, 0
jne 0x5168d7
mov eax, 0x51eb851f
mov dword [esp + 0x48], edx
imul ecx
mov ebx, edx
mov edx, dword [esp + 0x48]
sar ebx, 7
mov edx, ecx
sar edx, 0x1f
sub ebx, edx
imul ebx, ebx, 0x190
mov ebp, ecx
sub ebp, ebx
cmp ebp, 0
je 0x5168d7
xor eax, eax
cmp al, 0
je 0x51673a
mov ebx, dword [esp + 0x98]
cmp ebx, 3
jl 0x51673a
mov eax, dword [esp + 0x70]
add eax, 1
adc edi, 0
mov dword [esp + 0x70], eax
mov edx, edi
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0x9c]
dec eax
cdq
mov ebx, eax
mov eax, esi
mov ebp, edi
add eax, ebx
adc ebp, edx
mov esi, 0x15180
xor ebx, ebx
mov edx, ebp
or ebp, ebx
jne 0x5168c2
mul esi
mov edi, eax
mov esi, edx
mov eax, dword [esp + 0xa0]
imul eax, eax, 0xe10
mov ebx, dword [esp + 0xa4]
imul ebx, ebx, 0x3c
add eax, ebx
add eax, dword [esp + 0xa8]
cdq
mov ecx, edx
mov ebp, edi
mov edx, esi
add ebp, eax
adc edx, ecx
add ebp, 0xe5263700
adc edx, 0x80000001
mov ebx, dword [esp + 0xb0]
mov dword [esp], ebx
mov dword [esp + 0x58], ebp
mov dword [esp + 4], ebp
mov dword [esp + 0x5c], edx
mov dword [esp + 8], edx
call fcn.00517500
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x60], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x64], eax
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
cmp ecx, 0
je 0x516854
mov eax, ecx
cdq
mov ebp, eax
mov ebx, edx
mov eax, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
sub eax, ebp
sbb edx, ebx
mov ebp, eax
mov eax, edx
cmp edx, dword [esp + 0x64]
jg 0x516898
jl 0x51680c
cmp ebp, dword [esp + 0x60]
jae 0x516898
mov ebx, dword [esp + 0xb0]
mov dword [esp], ebx
mov eax, dword [esp + 0x60]
mov edx, dword [esp + 0x64]
sub eax, 1
sbb edx, 0
mov dword [esp + 4], eax
mov dword [esp + 8], edx
call fcn.00517500
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x58]
mov ebp, dword [esp + 0x5c]
mov eax, ecx
cdq
mov ebx, eax
mov ecx, edx
mov eax, esi
mov edx, ebp
sub eax, ebx
sbb edx, ecx
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], edx
xor ebx, ebx
mov ebp, dword [esp + 0x58]
mov edx, dword [esp + 0x5c]
add ebp, 0x7791f700
adc edx, 0xe
mov ecx, dword [esp + 0xac]
mov eax, dword [esp + 0xb0]
mov dword [esp + 0xb4], ebp
mov dword [esp + 0xb8], edx
mov dword [esp + 0xbc], ecx
mov dword [esp + 0xc0], eax
add esp, 0x90
ret
cmp eax, esi
jl 0x516835
jg 0x5168a2
cmp ebp, edi
jb 0x516835
mov ebx, dword [esp + 0xb0]
mov dword [esp], ebx
mov dword [esp + 4], edi
mov dword [esp + 8], esi
call fcn.00517500
mov ecx, dword [esp + 0x14]
jmp 0x516835
imul edx, esi
mov ebp, eax
imul ebp, ebx
add ebp, edx
mov edx, esi
mul edx
add edx, ebp
jmp 0x516764
mov eax, 1
jmp 0x516719
call fcn.00435970
ud2
imul edx, esi
mov ebp, eax
imul ebp, ebx
add ebp, edx
mov edx, esi
mul edx
add edx, ebp
jmp 0x51665f
imul edx, ebx
mov ebp, eax
imul ebp, ecx
add ebp, edx
mov edx, ebx
mul edx
add edx, ebp
jmp 0x516624
imul edx, edi
mov ebp, eax
imul ebp, ecx
add ebp, edx
mov edx, edi
mul edx
add edx, ebp
jmp 0x5165a6
imul edx, edi
mov ebp, eax
imul ebp, ecx
add ebp, edx
mov edx, edi
mul edx
add edx, ebp
jmp 0x51655f
imul edx, edi
mov ebp, eax
imul ebp, ecx
add ebp, edx
mov edx, edi
mul edx
add edx, ebp
jmp 0x516502
imul edx, edi
mov ebp, eax
imul ebp, ecx
add ebp, edx
mov edx, edi
mul edx
add edx, ebp
jmp 0x5164d1
neg eax
mov dword [esp + 0x34], eax
jmp 0x516444
neg eax
mov ebp, eax
jmp 0x516410
neg eax
mov dword [esp + 0x2c], eax
jmp 0x5163ac
neg eax
mov ebp, eax
jmp 0x516378
neg eax
mov dword [esp + 0x3c], eax
jmp 0x516314
neg eax
mov ebp, eax
jmp 0x5162e0
neg eax
mov dword [esp + 0x38], eax
jmp 0x51627c
neg eax
mov ebp, eax
jmp 0x516248
neg eax
mov dword [esp + 0x30], eax
jmp 0x5161d7
neg eax
mov ebp, eax
jmp 0x51619d
call fcn.004616d0
jmp fcn.005160c0