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

Disassembly:
sub esp, 0x84
push ebx
mov ebx, dword [esp + 0x8c]
test ebx, ebx
jne 0x1016279d
lea eax, [ebx + 0x14]
pop ebx
add esp, 0x84
ret
mov eax, dword [esp + 0x90]
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x94]
cdq
sar ecx, 1
sub eax, edx
sar eax, 1
mov dword [esp + 0x50], ecx
mov dword [esp + 0x90], ecx
mov dword [esp + 0x54], eax
mov dword [esp + 0x94], eax
test ecx, ecx
jne 0x101627d9
test eax, eax
je 0x10162bdb
push ebx
call fcn.10162ca0
add esp, 4
mov dword [esp + 0x64], eax
cmp eax, 2
jne 0x10162802
cmp word [ebx], 0
je 0x10162bdb
mov eax, 6
pop ebx
add esp, 0x84
ret
mov eax, dword [ebx + 4]
xor ecx, ecx
mov dword [esp + 0x4c], eax
xor eax, eax
push edi
xor edi, edi
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x34], edi
cmp ax, word [ebx]
jge 0x10162bda
push ebp
push esi
mov eax, dword [ebx + 0xc]
xor ebp, ebp
xor edx, edx
mov dword [esp + 0x50], 0
mov dword [esp + 0x18], ebp
mov ebx, edi
mov dword [esp + 0x4c], ebp
movsx eax, word [eax + ecx*2]
xor ecx, ecx
mov dword [esp + 0x24], eax
mov esi, eax
mov dword [esp + 0x48], ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x14], edx
mov dword [esp + 0x40], edx
mov dword [esp + 0x28], 0xffffffff
cmp edi, eax
je 0x10162bb6
mov edi, eax
nop
mov eax, dword [esp + 0x28]
cmp esi, eax
je 0x10162bb2
cmp ebx, eax
je 0x101628cd
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx + ebx*8]
sub eax, dword [ecx + esi*8]
mov dword [esp + 0x1c], eax
mov eax, dword [ecx + ebx*8 + 4]
sub eax, dword [ecx + esi*8 + 4]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x1c]
push eax
call fcn.10164a60
mov ecx, dword [esp + 0x14]
add esp, 4
mov edx, dword [esp + 0x14]
mov dword [esp + 0x38], eax
test eax, eax
je 0x10162b9e
mov eax, dword [esp + 0x20]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x30], eax
jmp 0x101628ed
mov eax, dword [esp + 0x4c]
mov edi, dword [esp + 0x48]
mov dword [esp + 0x34], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x30], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x38], eax
test ebp, ebp
je 0x10162b78
cmp dword [esp + 0x28], 0
jge 0x1016290c
mov dword [esp + 0x28], esi
mov dword [esp + 0x48], edx
mov dword [esp + 0x4c], ecx
mov dword [esp + 0x50], ebp
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x68], eax
mov edi, dword [esp + 0x68]
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x20]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x6c], eax
mov eax, dword [esp + 0x6c]
add eax, edi
cmp eax, 0xffff1000
jle 0x10162b36
mov edx, dword [esp + 0x30]
add eax, 0x10000
add edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
add ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x70]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x54], eax
mov eax, edx
neg eax
test edi, edi
cmovne edx, eax
mov eax, ecx
neg eax
mov dword [esp + 0x90], edx
test edi, edi
cmovne eax, ecx
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x44]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x74], eax
mov ebp, dword [esp + 0x74]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x40]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x78], eax
sub ebp, dword [esp + 0x78]
mov dword [esp + 0x14], ebp
test edi, edi
jne 0x10162a10
neg ebp
mov dword [esp + 0x14], ebp
mov edx, dword [esp + 0x38]
mov eax, edx
cmp dword [esp + 0x18], edx
cmovl eax, dword [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x7c], eax
mov edi, dword [esp + 0x7c]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x54]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x80], eax
cmp edi, dword [esp + 0x80]
jg 0x10162a8c
mov eax, dword [esp + 0x5c]
mov ecx, dword [esp + 0x2c]
jmp 0x10162a92
mov eax, dword [esp + 0x10]
mov ecx, ebp
push ecx
push eax
push dword [esp + 0x8c]
call fcn.10161e50
add esp, 0xc
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x14]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x88], eax
mov edi, dword [esp + 0x88]
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0x54]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x8c], eax
cmp edi, dword [esp + 0x8c]
jg 0x10162b12
mov eax, dword [esp + 0x60]
jmp 0x10162b1a
mov eax, dword [esp + 0x10]
mov dword [esp + 0x2c], ebp
push dword [esp + 0x2c]
push eax
push dword [esp + 0x98]
call fcn.10161e50
mov ecx, eax
add esp, 0xc
mov eax, dword [esp + 0x18]
jmp 0x10162b3e
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x18], eax
cmp esi, ebx
je 0x10162b7a
mov edx, dword [esp + 0x24]
mov ebp, dword [esp + 0x58]
nop word [eax + eax]
add eax, dword [esp + 0x5c]
add dword [ebp + esi*8], eax
mov eax, dword [esp + 0x60]
add eax, ecx
add dword [ebp + esi*8 + 4], eax
cmp esi, edx
lea eax, [esi + 1]
cmovge eax, dword [esp + 0x3c]
mov esi, eax
mov eax, dword [esp + 0x18]
cmp esi, ebx
jne 0x10162b50
jmp 0x10162b7a
mov esi, ebx
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x18], ebp
cmp ebx, edi
lea eax, [ebx + 1]
cmovge eax, dword [esp + 0x3c]
mov ebx, eax
cmp ebx, esi
jne 0x10162870
mov eax, dword [esp + 0x24]
mov ebx, dword [esp + 0x98]
lea edi, [eax + 1]
mov ecx, dword [esp + 0x64]
inc ecx
mov dword [esp + 0x3c], edi
mov dword [esp + 0x64], ecx
movsx eax, word [ebx]
cmp ecx, eax
jl 0x10162823
pop esi
pop ebp
pop edi
xor eax, eax
pop ebx
add esp, 0x84
ret