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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x94], edi
test edi, edi
jne 0x61a1e1
push 0x14
pop eax
jmp 0x61a5fb
mov eax, edx
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
cdq
sar ecx, 1
sub eax, edx
sar eax, 1
mov dword [esp + 0x68], ecx
mov dword [esp + 0x80], ecx
mov dword [esp + 0x5c], eax
mov dword [ebp + 8], eax
test ecx, ecx
jne 0x61a210
test eax, eax
je 0x61a5f9
mov ecx, edi
call fcn.0061a602
mov dword [esp + 0x74], eax
cmp eax, 2
jne 0x61a22e
cmp word [edi], 0
je 0x61a5f9
push 6
jmp 0x61a1db
mov eax, dword [edi + 4]
xor esi, esi
mov dword [esp + 0x58], eax
xor edx, edx
xor eax, eax
cmp ax, word [edi]
jmp 0x61a5eb
mov eax, dword [edi + 0xc]
xor ecx, ecx
and dword [esp + 0x64], 0
and dword [esp + 0x54], ecx
and dword [esp + 0x50], ecx
movsx eax, word [eax + edx*2]
xor edx, edx
or dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x2c], eax
xor eax, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x2c]
mov ebx, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x4c], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x44], esi
cmp dword [esp + 0x30], eax
je 0x61a5de
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x38]
cmp ebx, eax
je 0x61a5d3
cmp esi, eax
je 0x61a2f3
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx + esi*8]
sub eax, dword [ecx + ebx*8]
mov dword [esp + 0x18], eax
mov eax, dword [ecx + esi*8 + 4]
sub eax, dword [ecx + ebx*8 + 4]
lea ecx, [esp + 0x18]
mov dword [esp + 0x1c], eax
call fcn.00616b24
mov edx, dword [esp + 0xc]
mov dword [esp + 0x40], eax
test eax, eax
je 0x61a5b3
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x38]
jmp 0x61a31f
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x54]
mov esi, dword [esp + 0x28]
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x64]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x44]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x24]
test ecx, ecx
je 0x61a591
test eax, eax
jns 0x61a33b
mov dword [esp + 0x38], ebx
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edx
mov dword [esp + 0x64], ecx
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x18]
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 esi, dword [esp + 0x6c]
mov eax, dword [esp + 0x4c]
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 + 0x70], eax
mov eax, dword [esp + 0x70]
add eax, esi
cmp eax, 0xffff1000
jle 0x61a54e
mov ecx, dword [esp + 0x28]
add eax, 0x10000
mov esi, dword [esp + 0x74]
add ecx, edi
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0xc]
add eax, dword [esp + 0x3c]
mov dword [esp + 0x34], ecx
test esi, esi
jne 0x61a3c3
neg eax
jmp 0x61a3c9
neg ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x4c]
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
mov ebx, dword [esp + 0x78]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
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
sub ebx, dword [esp + 0x7c]
mov dword [esp + 0xc], ebx
test esi, esi
jne 0x61a42f
neg ebx
mov dword [esp + 0xc], ebx
mov ecx, dword [esp + 0x40]
mov edi, ecx
cmp dword [esp + 0x10], ecx
cmovl edi, dword [esp + 0x10]
mov dword [esp + 0x10], edi
mov eax, dword [esp + 0x80]
mov edx, dword [esp + 0xc]
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 + 0x84], eax
mov esi, dword [esp + 0x84]
mov eax, dword [esp + 0x10]
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 + 0x88], eax
cmp esi, dword [esp + 0x88]
jg 0x61a4b3
mov edi, dword [esp + 0x20]
mov eax, edi
mov edx, dword [esp + 0x68]
jmp 0x61a4bb
mov edx, edi
mov eax, ebx
mov edi, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
push eax
call fcn.00616508
pop ecx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0xc]
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
mov esi, dword [esp + 0x8c]
mov eax, dword [esp + 0x10]
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 + 0x90], eax
cmp esi, dword [esp + 0x90]
jg 0x61a531
mov edx, dword [esp + 0x5c]
jmp 0x61a537
mov edx, dword [esp + 0x10]
mov edi, ebx
mov ecx, dword [esp + 0x34]
push edi
call fcn.00616508
mov ebx, dword [esp + 0x28]
mov edx, eax
pop ecx
mov ecx, dword [esp + 0x14]
jmp 0x61a556
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x14], ecx
mov esi, dword [esp + 0x44]
cmp ebx, esi
je 0x61a597
mov edi, dword [esp + 0x2c]
mov eax, dword [esp + 0x68]
add eax, ecx
mov ecx, dword [esp + 0x58]
add dword [ecx + ebx*8], eax
mov eax, dword [esp + 0x5c]
add eax, edx
add dword [ecx + ebx*8 + 4], eax
cmp ebx, edi
mov eax, dword [esp + 0x30]
lea ecx, [ebx + 1]
cmovl eax, ecx
mov ecx, dword [esp + 0x14]
mov ebx, eax
cmp ebx, esi
jne 0x61a562
jmp 0x61a593
mov ebx, esi
mov dword [esp + 0x24], ebx
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x28]
mov eax, dword [esp + 0x40]
mov dword [esp + 0xc], edx
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edx
mov dword [esp + 0x10], eax
cmp esi, dword [esp + 0x2c]
lea ecx, [esi + 1]
mov eax, dword [esp + 0x30]
cmovl eax, ecx
mov ecx, dword [esp + 0x10]
mov esi, eax
mov dword [esp + 0x44], esi
cmp esi, ebx
jne 0x61a296
mov edi, dword [esp + 0x94]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x60]
lea esi, [eax + 1]
movsx eax, word [edi]
inc edx
cmp edx, eax
mov dword [esp + 0x60], edx
mov dword [esp + 0x30], esi
jl 0x61a243
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret