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

Disassembly:
xor eax, eax
cmp dword [ecx + 0x34], 1
jne 0x66cb27
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0xc50
mov edi, dword [ecx + 0x48]
mov eax, 1
test edi, edi
je 0x66cb20
mov esi, dword [ecx + 0x30]
test esi, esi
je 0x66cb20
mov edx, 1
mov dword [esp], esi
mov eax, esi
xor esi, esi
mov dword [esp + 4], ecx
jmp 0x66c6be
mov edi, dword [ecx + 0x48]
mov edx, eax
inc esi
cmp esi, edi
jae 0x66cb1b
test esi, esi
setne byte [esp + 0xf]
test edx, edx
je 0x66cb10
mov dword [esp + 8], 0
mov dword [esp + 0x1c], esi
jmp 0x66c6f8
mov eax, dword [esp]
mov edx, dword [esp + 0x18]
mov dword [esp + 8], edx
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 4]
cmp edx, 4
je 0x66c6b0
test eax, eax
je 0x66caf0
test esi, esi
sete al
setne cl
mov edx, dword [esp + 8]
cmp edx, 2
setae ah
setb ch
or ah, cl
mov byte [esp + 0xd], ah
mov edi, edx
or edi, esi
mov dword [esp + 0x2c], edi
and ch, al
mov byte [esp + 0xe], ch
lea eax, [edx + 1]
mov dword [esp + 0x18], eax
xor edx, edx
jmp 0x66c74f
mov esi, dword [esi + 0x30]
mov edx, dword [esp + 0x10]
inc edx
mov dword [esp], esi
cmp edx, esi
jae 0x66c6e0
mov dword [esp + 0x10], edx
push 0x400
push 0
lea eax, [esp + 0x50]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov edi, dword [esp + 4]
mov esi, dword [edi + 0x40]
cmp esi, 1
je 0x66c787
cmp esi, 2
jne 0x66c809
cmp byte [esp + 0xd], 0
jne 0x66c809
push 0x400
push 0
lea eax, [esp + 0x450]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x3d0
push 0
lea eax, [esp + 0x80]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], 0
mov eax, dword [esp + 0x10]
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], 0
mov eax, dword [esp + 8]
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], 0
movq xmm0, qword [edi + 0x48]
punpckldq xmm0, xmmword [0x9fb220]
pshufd xmm0, xmm0, 0x4e
movdqu xmmword [esp + 0x60], xmm0
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], 0
cmp dword [esp + 0x2c], 0
je 0x66c820
xor ecx, ecx
xor eax, eax
xor edi, edi
jmp 0x66c880
dec esi
xor eax, eax
mov edi, 2
cmp esi, 1
ja 0x66c879
mov dword [esp + 0x7c], 0
mov dword [esp + 0x78], 1
lea esi, [esp + 0x448]
mov ecx, esi
lea edx, [esp + 0x48]
push 0
lea edi, [esp + 0x84c]
push edi
call fcn.0066cfd0
add esp, 8
mov ecx, esi
mov edx, edi
push 0
push edi
mov edi, 2
call fcn.0066cfd0
xor eax, eax
add esp, 8
mov ecx, 1
jmp 0x66c880
xor ecx, ecx
nop dword [eax + eax]
mov edx, dword [esp + 0x10]
mov esi, dword [esp + 4]
mov ebx, dword [esi + 0x50]
cmp edi, ebx
mov esi, dword [esp]
jae 0x66c747
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], eax
mov esi, dword [esp + 4]
mov ecx, dword [esi + 0x54]
mov eax, ecx
imul eax, edx
mov dword [esp + 0x20], ebx
imul ebx, dword [esp + 8]
add ebx, edi
add ebx, eax
mov eax, ebx
xor edx, edx
div ecx
dec ecx
neg edx
mov eax, 0
sbb eax, eax
or eax, ecx
add eax, ebx
mov dword [esp + 0x14], eax
mov ecx, ebx
shl ecx, 0xa
lea eax, [edi - 1]
jmp 0x66c99e
xor eax, eax
cmp dword [esp], 0xffffffff
sete al
mov ebx, esi
sub ebx, eax
mov eax, dword [esp + 0x18]
sub ebx, ecx
imul ecx, eax
cmp dword [esp + 8], 3
mov eax, 0
cmove ecx, eax
mov eax, dword [esp + 0x3c]
mul eax
mov eax, edx
mul ebx
dec ebx
xor eax, eax
add ebx, ecx
setb al
sub ebx, edx
sbb eax, 0
push 0
push esi
push eax
push ebx
call fcn.00788350
add esp, 0x10
mov ecx, dword [esp + 4]
mov edx, dword [ecx + 0x44]
imul edi, esi
shl edi, 0xa
shl eax, 0xa
add eax, edx
add edi, eax
cmp dword [ecx + 0x38], 0x10
setne al
mov esi, dword [esp + 0x14]
mov ecx, esi
shl ecx, 0xa
add ecx, edx
mov ebx, dword [esp + 0x38]
add ebx, edx
and al, byte [esp + 0xf]
movzx eax, al
mov edx, edi
push eax
push ebx
call fcn.0066cfd0
add esp, 8
mov edi, dword [esp + 0x34]
inc edi
mov ebx, dword [esp + 0x44]
inc ebx
inc esi
mov dword [esp + 0x14], esi
mov esi, dword [esp + 4]
mov ecx, dword [esi + 0x50]
mov edx, dword [esp + 0x38]
add edx, 0x400
mov eax, dword [esp]
add eax, 2
mov dword [esp + 0x20], ecx
cmp eax, ecx
mov ecx, edx
mov eax, dword [esp + 0x40]
jae 0x66c740
mov dword [esp + 0x38], ecx
mov dword [esp], eax
mov ecx, dword [esi + 0x40]
mov esi, dword [esi + 0x54]
mov eax, ebx
xor edx, edx
mov dword [esp + 0x30], esi
div esi
cmp edx, 1
jne 0x66c9c1
lea eax, [ebx - 1]
mov dword [esp + 0x14], eax
mov dword [esp + 0x34], edi
mov eax, dword [esp]
lea edi, [eax + 1]
cmp ecx, 1
mov dword [esp + 0x44], ebx
mov dword [esp + 0x40], edi
je 0x66c9e4
cmp ecx, 2
jne 0x66ca50
cmp byte [esp + 0xe], 0
je 0x66ca50
and edi, 0x7f
jne 0x66ca35
mov ecx, dword [esp + 0x24]
add ecx, 1
mov eax, dword [esp + 0x28]
adc eax, 0
mov dword [esp + 0x24], ecx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x28], eax
mov dword [esp + 0x7c], eax
lea esi, [esp + 0x448]
mov ecx, esi
lea edx, [esp + 0x48]
push 0
lea ebx, [esp + 0x84c]
push ebx
call fcn.0066cfd0
add esp, 8
mov ecx, esi
mov edx, ebx
push 0
push ebx
call fcn.0066cfd0
add esp, 8
mov esi, dword [esp + 4]
lea eax, [esp + edi*8]
add eax, 0x848
jmp 0x66ca5e
mov eax, dword [esp + 0x14]
shl eax, 0xa
mov esi, dword [esp + 4]
add eax, dword [esi + 0x44]
mov ecx, dword [eax]
mov dword [esp + 0x3c], ecx
mov eax, dword [eax + 4]
xor edx, edx
div dword [esi + 0x30]
mov edi, edx
cmp dword [esp + 0x2c], 0
mov edx, dword [esp + 0x10]
cmove edi, edx
cmp dword [esp + 0x1c], 0
je 0x66caa0
mov eax, edi
xor eax, edx
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
jne 0x66c8e0
mov eax, dword [esp]
lea ebx, [eax + esi]
jmp 0x66c8ed
mov eax, dword [esp + 8]
test eax, eax
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x30]
je 0x66cac7
imul ebx, eax
mov eax, edi
xor eax, edx
jne 0x66cad1
mov eax, dword [esp + 0x34]
add ebx, eax
dec ebx
xor ecx, ecx
jmp 0x66c903
mov ebx, dword [esp]
xor ecx, ecx
jmp 0x66c903
xor eax, eax
cmp dword [esp], 0xffffffff
sete al
sub ebx, eax
xor ecx, ecx
jmp 0x66c903
mov edx, dword [esp + 8]
inc edx
xor eax, eax
mov dword [esp + 8], edx
cmp edx, 4
jne 0x66c6f8
jmp 0x66c6b0
xor edx, edx
inc esi
cmp esi, edi
jb 0x66c6be
mov eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret