Function at 0x5164e0
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 0x516790
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.004bdde0
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.004bdde0
mov ecx, dword [esp + 0x20]
lea ecx, [ecx + ecx*2]
lea eax, [eax + ecx + 4]
cmp eax, 8
jbe switch.0x00516780
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 0x516833
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.00515900
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.00515900
mov esi, ebp
sar esi, 1
cmp dword [esp + 0x24], ebx
mov eax, dword [esp + 0x20]
jge 0x5169d0
mov edx, ebx
sub edx, esi
cmp edx, 0
je 0x5169df
jle 0x516a70
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.005164e0
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 0x516a40
test dl, 2
je 0x5166d0
mov word [edi], 0
add edi, 2
and edx, 1
je 0x5166d8
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.00519720
mov ebx, eax
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x4c]
test esi, esi
mov dword [esp + 0xc], edx
je 0x5169b0
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.005198d0
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.00519720
add ebx, eax
je 0x516777
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 0x516777
nop
add edx, 4
inc dword [edx]
je 0x516770
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
jmp dword [eax*4 + 0x5ffd10]
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.00515780
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.00519a80
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.00519a80
mov dword [esp + 0x4c], 1
mov edx, dword [esp + 0x20]
lea eax, [ebp + ebp]
mov dword [esp + 0x28], eax
cmp ebp, 8
jne 0x5165bb
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.0055ec40
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov edx, dword [esp + 0x30]
mov dword [esp], edx
call fcn.0055ec40
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.00515780
jmp 0x51669e
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.00519a80
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 0x51680a
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.00519a80
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.00519a80
mov dword [esp + 0x4c], 0
mov edx, dword [esp + 0x20]
jmp 0x5165aa
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.00519a80
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 0x51693a
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.00519720
add ebx, eax
jmp 0x516730
mov edx, dword [esp + 0x24]
sub edx, esi
cmp edx, 0
jne 0x516656
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.00515900
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 0x5166c3
test edi, 1
jne 0x516ba0
test edi, 2
jne 0x516b90
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x5166c3
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 0x516b60
test dl, 2
jne 0x516b50
and edx, 1
jne 0x516b40
mov edx, dword [esp + 0x24]
cmp ebx, 0xf
jle 0x516b10
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 0x516bb0
cmp edx, eax
jg 0x516bb0
cmp eax, ebx
je 0x516ad3
cmp eax, edx
jne 0x516ab0
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.00515900
jmp 0x5166d8
cmp dword [esp + 0x24], 0xf
jg 0x516ab0
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.00515780
jmp 0x5166d8
mov byte [edi], 0
jmp 0x516a9b
mov word [edi], 0
add edi, 2
jmp 0x516a92
test edi, 1
jne 0x516bfd
test edi, 2
jne 0x516bed
mov ecx, edx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
jmp 0x516a89
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x516a58
mov byte [edi], 0
inc edi
dec edx
jmp 0x516a4c
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.005164e0
jmp 0x5166d8
mov word [edi], 0
add edi, 2
sub edx, 2
jmp 0x516b74
mov byte [edi], 0
mov edi, dword [esp + 0x44]
inc edi
dec edx
jmp 0x516b6c