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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x5c
mov edx, dword [esp + 0x70]
mov dword [esp + 0x30], edx
mov edi, dword [esp + 0x74]
mov esi, dword [esp + 0x78]
mov ebp, dword [esp + 0x7c]
mov ebx, dword [esp + 0x80]
mov edx, dword [esp + 0x84]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x88]
mov dword [esp + 0x2c], edx
cmp ebp, 7
jle 0x516390
mov ecx, ebp
sub ecx, ebx
mov dword [esp + 0x28], ecx
lea edx, [ebp*4]
mov dword [esp + 0x38], edx
add edx, edi
mov dword [esp + 0x3c], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], edx
mov dword [esp], edi
call fcn.004bd9c0
mov edx, dword [esp + 0x24]
sub edx, ebp
mov dword [esp + 0x34], edx
mov edx, dword [esp + 0x38]
add edx, esi
mov dword [esp + 0x40], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 8], edx
mov dword [esp + 4], esi
mov edx, dword [esp + 0x40]
mov dword [esp], edx
mov dword [esp + 0x20], eax
call fcn.004bd9c0
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx + 4]
cmp eax, 8
jbe switch.0x00516380
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x38]
mov dword [esp + 0x4c], 0
lea eax, [ebp + ebp]
mov dword [esp + 0x28], eax
cmp ebp, 8
je 0x516433
mov ecx, dword [esp + 0x2c]
lea eax, [ecx + eax*8]
mov dword [esp + 0x48], eax
lea eax, [ebp*8]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebp
mov dword [esp + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
add edx, eax
mov dword [esp + 0x34], edx
mov dword [esp], edx
mov dword [esp + 0x20], eax
call fcn.00515500
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], edx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebp
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.00515500
mov esi, ebp
sar esi, 1
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x20]
jge 0x5165d0
mov edx, ebx
sub edx, esi
cmp edx, 0
je 0x5165df
jle 0x516670
add eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x24]
sub eax, esi
mov dword [esp + 0x14], eax
mov eax, ebx
sub eax, esi
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.005160e0
mov edx, dword [esp + 0x28]
sub edx, ebx
sub edx, dword [esp + 0x24]
add ebx, dword [esp + 0x28]
add ebx, dword [esp + 0x24]
shl edx, 2
mov ecx, dword [esp + 0x30]
lea edi, [ecx + ebx*4]
cmp edx, 4
jae 0x516640
test dl, 2
je 0x5162d0
mov word [edi], 0
add edi, 2
and edx, 1
je 0x5162d8
mov byte [edi], 0
mov edx, dword [esp + 0x28]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x44]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x30]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call fcn.00519320
mov ebx, eax
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x4c]
test esi, esi
mov dword [esp + 0xc], edx
je 0x5165b0
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.005194d0
sub ebx, eax
mov eax, dword [esp + 0x30]
add eax, dword [esp + 0x38]
mov edx, dword [esp + 0x28]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], eax
call fcn.00519320
add ebx, eax
je 0x516377
mov eax, dword [esp + 0x28]
add eax, ebp
mov ecx, dword [esp + 0x30]
lea edx, [ecx + eax*4]
mov eax, dword [edx]
add eax, ebx
mov dword [edx], eax
cmp ebx, eax
jbe 0x516377
nop
add edx, 4
inc dword [edx]
je 0x516370
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
jmp dword [eax*4 + 0x5ffc30]
mov eax, dword [esp + 0x24]
add eax, ebp
mov dword [esp + 0x80], eax
mov dword [esp + 0x7c], esi
add ebx, ebp
mov dword [esp + 0x78], ebx
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.00515380
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
mov edx, dword [esp + 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call fcn.00519680
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x38]
mov eax, ebp
sub eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [esp + 0x20], edx
call fcn.00519680
mov dword [esp + 0x4c], 1
mov edx, dword [esp + 0x20]
lea eax, [ebp + ebp]
mov dword [esp + 0x28], eax
cmp ebp, 8
jne 0x5161bb
mov dword [esp + 8], edx
mov edx, dword [esp + 0x2c]
mov dword [esp + 4], edx
add edx, 0x40
mov dword [esp + 0x34], edx
mov dword [esp], edx
call fcn.0055e840
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.0055e840
mov edx, dword [esp + 0x30]
add edx, 0x40
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x24]
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.00515380
jmp 0x51629e
mov eax, ebx
sub eax, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call fcn.00519680
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
jmp 0x51640a
mov eax, ebx
sub eax, ebp
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ebx
mov dword [esp + 8], edi
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call fcn.00519680
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x38]
mov eax, ebp
sub eax, dword [esp + 0x24]
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0x24]
mov dword [esp + 0xc], ecx
mov eax, dword [esp + 0x40]
mov dword [esp + 8], eax
mov dword [esp + 4], esi
mov dword [esp], edx
mov dword [esp + 0x20], edx
call fcn.00519680
mov dword [esp + 0x4c], 0
mov edx, dword [esp + 0x20]
jmp 0x5161aa
mov edx, dword [esp + 0x28]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
mov edx, dword [esp + 0x3c]
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov edx, dword [esp + 0x2c]
mov dword [esp], edx
call fcn.00519680
mov edx, dword [esp + 0x2c]
add edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x10], ecx
mov eax, dword [esp + 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
jmp 0x51653a
mov edx, dword [esp + 0x2c]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x34]
mov dword [esp + 4], edx
mov dword [esp], edx
call fcn.00519320
add ebx, eax
jmp 0x516330
mov edx, dword [esp + 0x24]
sub edx, esi
cmp edx, 0
jne 0x516256
add eax, dword [esp + 0x30]
mov dword [esp + 0x44], eax
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], edx
mov eax, dword [esp + 0x24]
sub eax, esi
mov dword [esp + 0x14], eax
sub ebx, esi
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], esi
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.00515500
mov eax, esi
neg eax
mov ecx, dword [esp + 0x28]
lea edx, [ecx + eax*2]
lea eax, [ecx + esi*2]
shl edx, 2
mov ecx, dword [esp + 0x30]
lea edi, [ecx + eax*4]
cmp edx, 4
jb 0x5162c3
test edi, 1
jne 0x5167a0
test edi, 2
jne 0x516790
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x5162c3
mov edx, dword [esp + 0x30]
add edx, eax
mov dword [esp + 0x44], edx
mov edx, eax
mov edi, dword [esp + 0x44]
cmp eax, 4
jae 0x516760
test dl, 2
jne 0x516750
and edx, 1
jne 0x516740
mov edx, dword [esp + 0x24]
cmp ebx, 0xf
jle 0x516710
lea esi, [esi]
lea edi, [edi]
mov eax, esi
shr eax, 0x1f
add eax, esi
sar eax, 1
mov esi, eax
cmp ebx, eax
jg 0x5167b0
cmp edx, eax
jg 0x5167b0
cmp eax, ebx
je 0x5166d3
cmp eax, edx
jne 0x5166b0
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
sub edx, eax
mov dword [esp + 0x14], edx
sub ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.00515500
jmp 0x5162d8
cmp dword [esp + 0x24], 0xf
jg 0x5166b0
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.00515380
jmp 0x5162d8
mov byte [edi], 0
jmp 0x51669b
mov word [edi], 0
add edi, 2
jmp 0x516692
test edi, 1
jne 0x5167fd
test edi, 2
jne 0x5167ed
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x516689
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x516658
mov byte [edi], 0
inc edi
dec edx
jmp 0x51664c
mov edx, dword [esp + 0x48]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x24]
sub edx, eax
mov dword [esp + 0x14], edx
sub ebx, eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x40]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x3c]
mov dword [esp + 4], edx
mov edx, dword [esp + 0x44]
mov dword [esp], edx
call fcn.005160e0
jmp 0x5162d8
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x516774
mov byte [edi], 0
mov edi, dword [esp + 0x44]
inc edi
dec edx
jmp 0x51676c