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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xac
mov ebx, dword [eax]
mov dword [esp + 0x48], eax
movzx eax, byte [eax + 0x2c]
mov dword [esp + 0x78], ebx
mov ebx, dword [ebx]
mov dword [esp + 0x8c], edx
mov word [esp + 0x80], dx
mov dword [esp + 0x7c], ebx
mov byte [esp + 0x83], al
mov dword [esp + 0x6c], eax
cmp eax, 1
jle 0x665c2931
xor ebx, ebx
cmp eax, 2
setne bl
lea ebx, [ebx + ebx*4 + 5]
mov dword [esp + 0x44], ebx
cmp word [esp + 0x8c], 0
mov eax, dword [esp + 0x48]
mov eax, dword [eax + 8]
je 0x665c20a2
test eax, eax
je 0x665c20a2
mov eax, dword [eax]
mov dword [esp + 0x50], eax
lea esi, [eax + eax]
jmp 0x665c20ac
mov dword [esp + 0x50], 0
xor esi, esi
mov eax, dword [esp + 0x6c]
add eax, 8
imul eax, ebx
lea eax, [esi + eax*8]
cdq
mov ecx, edx
mov edx, eax
mov eax, dword [esp + 0x7c]
call fcn.6658bdd0
mov dword [esp + 0x70], eax
test eax, eax
je 0x665c2ae6
shl ebx, 5
add eax, ebx
mov edx, ebx
xor ebx, ebx
lea ecx, [eax + 4]
mov dword [esp + 0x68], eax
and ecx, 0xfffffffc
mov dword [eax], 0
mov dword [eax + 0x1c], 0
sub eax, ecx
mov edi, eax
xor eax, eax
add edi, 0x20
and edi, 0xfffffffc
mov dword [ecx + eax], ebx
add eax, 4
cmp eax, edi
jb 0x665c20ff
mov eax, dword [esp + 0x6c]
add edx, dword [esp + 0x68]
mov ecx, edx
lea ebp, [eax*4]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x74], ebp
lea edi, [eax + eax]
shl eax, 6
mov ebx, eax
mov eax, dword [esp + 0x70]
add ebx, eax
mov dword [eax + 0x18], ecx
add eax, 0x20
add ecx, ebp
cmp eax, ebx
jne 0x665c2130
imul edi, dword [esp + 0x74]
mov ebp, dword [esp + 0x50]
lea eax, [edx + edi]
mov dword [esp + 0x64], eax
test ebp, ebp
jne 0x665c28e6
mov ebx, dword [esp + 0x78]
mov eax, 0x30
mov dword [esp + 0x64], 0
cmp dword [ebx + 0x84], 0x30
cmovbe eax, dword [ebx + 0x84]
mov ebx, dword [esp + 0x68]
mov word [ebx + 0x10], ax
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x665c2ad9
mov eax, dword [esp + 0x70]
mov dword [esp + 0x4c], 0
mov dword [esp + 0x58], 1
mov dword [esp + 0x3c], eax
xor eax, eax
mov word [esp + 0x62], ax
xor eax, eax
mov word [esp + 0x60], ax
mov dword [esp + 0x54], 0
mov eax, dword [esp + 0x58]
test eax, eax
je 0x665c2540
mov eax, dword [esp + 0x54]
mov dword [esp + 0x28], 0
mov dword [esp + 0x40], 0
shl eax, 2
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x68]
mov dword [esp + 0x18], eax
lea esi, [esi]
mov eax, dword [esp + 0x48]
mov ebx, dword [eax + 0x40]
test ebx, ebx
je 0x665c2520
mov eax, dword [esp + 0x2c]
mov ebp, ebx
and eax, 2
mov dword [esp + 0x5c], eax
jmp 0x665c221b
mov ebp, dword [ebp + 0x34]
test ebp, ebp
je 0x665c2520
mov esi, dword [esp + 0x18]
movzx eax, byte [esi + 0x16]
mov dword [esp + 0x98], 0
mov dword [esp + 0x9c], 0
mov byte [esp + 0x1c], al
mov eax, esi
mov esi, dword [esi]
mov ebx, dword [eax + 4]
mov edx, esi
not edx
mov eax, edx
mov edx, ebx
and eax, dword [ebp]
not edx
and edx, dword [ebp + 4]
or edx, eax
jne 0x665c2210
mov ecx, dword [ebp + 8]
mov edx, esi
mov edi, dword [ebp + 0xc]
and edx, ecx
mov eax, edx
mov edx, ebx
and edx, edi
or edx, eax
jne 0x665c2210
mov eax, dword [esp + 0x18]
movzx eax, word [eax + 0x10]
mov word [esp + 0x20], ax
test byte [ebp + 0x25], 0x40
je 0x665c2285
cmp ax, 2
jle 0x665c2210
movzx edx, word [esp + 0x20]
movsx eax, word [ebp + 0x12]
mov dword [esp + 0x30], ecx
or ebx, edi
add dx, word [ebp + 0x14]
movsx edx, dx
call fcn.665889f0
mov ecx, dword [esp + 0x18]
cwde
movsx edx, word [ecx + 0x14]
call fcn.665889f0
mov ecx, dword [esp + 0x30]
movzx edx, word [esp + 0x20]
add dx, word [ebp + 0x16]
mov word [esp + 0x38], ax
or esi, ecx
cmp byte [esp + 0x1c], 0
mov word [esp + 0x3a], dx
js 0x665c2470
mov eax, dword [esp + 0x18]
mov edx, dword [eax + 0xc]
mov eax, dword [eax + 8]
mov dword [esp + 0x9c], edx
mov dword [esp + 0x98], eax
movsx eax, byte [esp + 0x1c]
cmp dword [esp + 0x50], eax
jle 0x665c24ac
mov ecx, dword [esp + 0x64]
lea edi, [ecx + eax*2]
movsx edx, word [edi]
test dx, dx
je 0x665c25dc
movsx eax, word [esp + 0x38]
mov edi, eax
call fcn.665889f0
mov ecx, dword [esp + 0x28]
mov word [esp + 0x30], di
add eax, 5
mov word [esp + 0x38], ax
test ecx, ecx
je 0x665c24c8
mov dword [esp + 0x20], ebp
mov eax, dword [esp + 0x3c]
xor edx, edx
mov ebp, ecx
jmp 0x665c234e
add edx, 1
add eax, 0x20
cmp edx, ebp
je 0x665c24e0
mov ecx, dword [eax]
mov edi, dword [eax + 4]
xor ecx, esi
xor edi, ebx
or edi, ecx
jne 0x665c2340
movzx ecx, byte [esp + 0x1c]
xor cl, byte [eax + 0x16]
js 0x665c2340
mov ebp, dword [esp + 0x20]
movzx ebx, word [esp + 0x38]
cmp bx, word [eax + 0x12]
jg 0x665c2210
je 0x665c25b3
mov esi, dword [esp + 0x18]
mov ecx, dword [esi]
mov edx, dword [esi + 4]
or ecx, dword [ebp + 8]
or edx, dword [ebp + 0xc]
mov dword [eax + 4], edx
mov dword [eax], ecx
mov ebx, dword [esp + 0x9c]
mov ecx, dword [esp + 0x98]
mov dword [eax + 0xc], ebx
movzx ebx, word [esp + 0x3a]
mov dword [eax + 8], ecx
mov ecx, dword [eax + 0x18]
mov word [eax + 0x10], bx
movzx ebx, word [esp + 0x38]
mov word [eax + 0x12], bx
movzx ebx, word [esp + 0x30]
mov word [eax + 0x14], bx
movzx ebx, byte [esp + 0x1c]
mov byte [eax + 0x16], bl
mov ebx, dword [esp + 0x2c]
mov esi, dword [esi + 0x18]
cmp ebx, 4
jae 0x665c2570
test ebx, ebx
je 0x665c23f4
movzx edx, byte [esi]
mov byte [ecx], dl
mov edx, dword [esp + 0x5c]
test edx, edx
jne 0x665c27c5
mov ecx, dword [eax + 0x18]
mov eax, dword [esp + 0x2c]
mov ebx, dword [esp + 0x28]
mov dword [ecx + eax], ebp
cmp dword [esp + 0x44], ebx
jg 0x665c2210
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x44]
movzx ebx, word [eax + 0x12]
movzx edi, word [eax + 0x10]
add eax, 0x20
mov word [esp + 0x60], bx
mov word [esp + 0x62], di
cmp esi, 1
je 0x665c27ad
xor ecx, ecx
mov dword [esp + 0x1c], ebp
mov edx, 1
mov dword [esp + 0x4c], ecx
jmp 0x665c2458
movzx edi, word [eax + 0x14]
mov dword [esp + 0x4c], edx
mov ebx, ecx
add edx, 1
add eax, 0x20
cmp esi, edx
je 0x665c25a0
movzx ecx, word [eax + 0x12]
cmp bx, cx
jl 0x665c2440
jne 0x665c244a
movzx ebp, word [eax + 0x14]
cmp di, bp
jge 0x665c244a
mov edi, ebp
jmp 0x665c2444
mov edi, dword [esp + 0x48]
lea eax, [esp + 0x98]
mov ecx, dword [esp + 0x18]
mov edx, dword [edi + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], ebp
mov dword [esp + 4], eax
movzx eax, word [edi + 0x28]
mov dword [esp], eax
mov eax, edi
call fcn.665c13c0
mov byte [esp + 0x1c], al
test al, al
jns 0x665c22ea
movzx eax, word [esp + 0x38]
mov ecx, dword [esp + 0x28]
sub eax, 2
mov word [esp + 0x30], ax
test ecx, ecx
jne 0x665c2331
lea esi, [esi]
mov ebx, dword [esp + 0x28]
mov eax, ebx
add ebx, 1
mov dword [esp + 0x28], ebx
jmp 0x665c2514
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x28]
cmp dword [esp + 0x44], ebx
jg 0x665c24c8
movzx ebx, word [esp + 0x60]
cmp word [esp + 0x38], bx
jg 0x665c2210
jne 0x665c2510
movzx ebx, word [esp + 0x62]
cmp word [esp + 0x30], bx
jge 0x665c2210
mov eax, dword [esp + 0x4c]
shl eax, 5
add eax, dword [esp + 0x3c]
jmp 0x665c237e
add dword [esp + 0x40], 1
mov eax, dword [esp + 0x40]
add dword [esp + 0x18], 0x20
cmp eax, dword [esp + 0x58]
jne 0x665c21e8
mov eax, dword [esp + 0x28]
mov dword [esp + 0x58], eax
mov esi, dword [esp + 0x3c]
add dword [esp + 0x54], 1
mov eax, dword [esp + 0x68]
mov ebx, dword [esp + 0x54]
mov dword [esp + 0x68], esi
cmp dword [esp + 0x6c], ebx
je 0x665c27db
mov dword [esp + 0x3c], eax
jmp 0x665c21b5
mov edx, dword [esi]
lea edi, [ecx + 4]
and edi, 0xfffffffc
mov dword [ecx], edx
mov ebx, dword [esp + 0x2c]
mov edx, dword [esi + ebx - 4]
mov dword [ecx + ebx - 4], edx
sub ecx, edi
sub esi, ecx
add ecx, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
jmp 0x665c23f1
mov word [esp + 0x60], bx
mov ebp, dword [esp + 0x1c]
mov word [esp + 0x62], di
jmp 0x665c2210
movzx ebx, word [esp + 0x3a]
cmp bx, word [eax + 0x10]
jg 0x665c2210
jne 0x665c237e
movzx ebx, word [esp + 0x30]
cmp bx, word [eax + 0x14]
jl 0x665c237e
jmp 0x665c2210
mov ecx, dword [esp + 0x50]
mov edx, ecx
sub edx, eax
imul eax, edx, 0x64
cdq
idiv ecx
mov edx, 7
mov ecx, eax
mov dword [esp + 0x20], eax
sar ecx, 0x1f
cmp edx, eax
mov dword [esp + 0x24], ecx
mov ecx, 0
sbb ecx, dword [esp + 0x24]
jb 0x665c26ed
mov edx, 1
mov ecx, 0
cmp edx, eax
sbb ecx, dword [esp + 0x24]
mov eax, 0
jae 0x665c269d
mov edx, 0x1e
mov dword [esp + 0x84], ebp
mov eax, dword [esp + 0x20]
mov ecx, 7
mov dword [esp + 0x88], ebx
mov dword [esp + 0x30], edi
mov edi, edx
mov edx, dword [esp + 0x24]
lea esi, [esi]
shld edx, eax, 1
add eax, eax
mov ebp, edi
mov ebx, 0
sub edi, 0xa
cmp ecx, eax
sbb ebx, edx
jae 0x665c2650
mov edi, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
mov ebx, dword [esp + 0x88]
mov word [esp + 0x30], bp
mov ebp, dword [esp + 0x84]
mov edx, dword [esp + 0x20]
movzx eax, word [esp + 0x30]
and edx, 7
movzx edx, word [edx + edx + 0x66689498]
lea eax, [eax + edx - 0xa]
movzx ecx, word [esp + 0x80]
mov edx, dword [esp + 0x48]
lea eax, [eax + ecx - 0x32]
mov word [esp + 0x20], ax
movzx eax, word [edx + 0x28]
test ah, 0x40
je 0x665c26c4
movzx edx, word [edx + 0x2a]
cmp cx, dx
jg 0x665c26da
test ah, 1
je 0x665c2735
movzx eax, word [esp + 0x80]
lea edx, [eax - 0xa]
cmp ax, 0xa
jle 0x665c26e0
cmp dx, 0xa
jg 0x665c2743
movsx edx, word [esp + 0x20]
mov word [edi], dx
jmp 0x665c230c
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x665c279f
bsr eax, ecx
xor eax, 0x1f
mov ecx, 0x3c
mov edx, dword [esp + 0x24]
sub ecx, eax
lea eax, [ecx + ecx*4]
lea eax, [eax + eax + 0x28]
mov word [esp + 0x30], ax
mov eax, dword [esp + 0x20]
shrd eax, edx, cl
shr edx, cl
test cl, 0x20
je 0x665c2728
mov eax, edx
xor edx, edx
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], edx
jmp 0x665c2685
movzx edx, word [esp + 0x80]
cmp dx, 0xa
jle 0x665c26e0
movsx edx, dx
mov eax, edx
mov dword [esp + 0x30], edx
sar eax, 0x1f
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x665c27ba
bsr eax, dword [esp + 0x34]
xor eax, 0x1f
mov ecx, 0x3c
mov edx, dword [esp + 0x34]
sub ecx, eax
mov eax, dword [esp + 0x30]
shrd eax, edx, cl
shr edx, cl
test cl, 0x20
je 0x665c277e
mov eax, edx
lea edx, [ecx + ecx*4]
movzx ecx, word [esp + 0x20]
and eax, 7
lea edx, [ecx + edx*2 - 3]
add dx, word [eax + eax + 0x66689498]
mov word [esp + 0x20], dx
jmp 0x665c26e0
bsr eax, eax
xor eax, 0x1f
add eax, 0x20
jmp 0x665c26ff
mov dword [esp + 0x4c], 0
jmp 0x665c2210
bsr edx, edx
xor edx, 0x1f
lea eax, [edx + 0x20]
jmp 0x665c2763
mov ebx, dword [esp + 0x2c]
movzx edx, word [esi + ebx - 2]
mov word [ecx + ebx - 2], dx
mov ecx, dword [eax + 0x18]
jmp 0x665c23f4
mov ebp, dword [esp + 0x58]
test ebp, ebp
je 0x665c2ac0
cmp dword [esp + 0x58], 1
je 0x665c2816
mov edx, dword [esp + 0x58]
mov ebx, dword [esp + 0x3c]
shl edx, 5
lea eax, [ebx + 0x20]
mov ecx, ebx
add edx, ebx
movzx ebx, word [eax + 0x12]
cmp word [ecx + 0x12], bx
cmovg ecx, eax
add eax, 0x20
cmp edx, eax
jne 0x665c2800
mov dword [esp + 0x3c], ecx
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x6c]
xor ecx, ecx
mov esi, dword [eax + 0x18]
mov eax, dword [esp + 0x48]
mov ebx, dword [eax + 4]
lea edx, [eax + 0x2f4]
mov eax, dword [esi + ecx*4]
add ecx, 1
add edx, 0x58
mov dword [edx - 0x14], eax
movzx eax, byte [eax + 0x10]
mov byte [edx - 0x28], al
lea eax, [eax + eax*8]
mov eax, dword [ebx + eax*8 + 0x34]
mov dword [edx - 0x58], eax
cmp edi, ecx
jg 0x665c2830
mov eax, dword [esp + 0x48]
movzx eax, word [eax + 0x28]
mov word [esp + 0x18], ax
and ax, 0x180
cmp ax, 0x100
je 0x665c2990
mov ebx, dword [esp + 0x48]
movzx eax, byte [ebx + 0x30]
mov edx, dword [ebx + 8]
mov byte [esp + 0x18], al
and eax, 0xfffffffb
mov byte [ebx + 0x30], al
test edx, edx
je 0x665c28bf
mov esi, dword [esp + 0x3c]
movzx ebx, word [ebx + 0x28]
movsx ecx, byte [esi + 0x16]
test bl, 0x80
je 0x665c2943
cmp ecx, dword [edx]
je 0x665c2af1
and bh, 2
je 0x665c28bf
mov eax, dword [esp + 0x48]
movsx eax, byte [eax + 0x2d]
cmp eax, dword [edx]
jne 0x665c28bf
mov ecx, dword [esp + 0x6c]
test ecx, ecx
jne 0x665c2afe
mov eax, dword [esp + 0x3c]
mov ebx, dword [esp + 0x48]
movzx eax, word [eax + 0x10]
mov word [ebx + 0x34], ax
mov edx, dword [esp + 0x70]
mov eax, dword [esp + 0x7c]
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
jmp fcn.665926e0
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov ebx, dword [esp + 0x78]
mov edi, dword [esp + 0x6c]
mov eax, 0x30
cmp dword [ebx + 0x84], 0x30
cmovbe eax, dword [ebx + 0x84]
test edi, edi
mov ebx, dword [esp + 0x68]
mov word [ebx + 0x10], ax
mov eax, 0xffffffff
cmove eax, dword [esp + 0x50]
mov byte [ebx + 0x16], al
jmp 0x665c217b
mov dword [esp + 0x44], 1
mov ebx, 1
jmp 0x665c2081
mov ebp, dword [esp + 0x48]
mov edi, dword [esp + 0x3c]
mov byte [ebp + 0x2d], cl
mov esi, dword [edi + 8]
mov edi, dword [edi + 0xc]
mov dword [ebp + 0x48], esi
mov dword [ebp + 0x4c], edi
test cl, cl
jle 0x665c2a0b
cmp cl, 1
jne 0x665c28a2
mov esi, dword [esp + 0x6c]
test esi, esi
je 0x665c28a2
test bl, 3
je 0x665c28a2
mov esi, dword [esp + 0x48]
or eax, 4
mov byte [esi + 0x30], al
jmp 0x665c28a2
mov eax, dword [esp + 0x48]
cmp byte [eax + 0x2f], 0
jne 0x665c286c
cmp word [esp + 0x8c], 0
je 0x665c286c
mov ecx, dword [esp + 0x3c]
mov edx, dword [eax + 0xc]
mov ebx, eax
lea eax, [esp + 0x98]
mov dword [esp + 0xc], eax
mov esi, dword [esp + 0x74]
mov eax, dword [ecx + 0x18]
mov eax, dword [eax + esi - 4]
mov dword [esp], pe_nt_image_headers32
mov dword [esp + 8], eax
movzx eax, byte [esp + 0x83]
sub eax, 1
movzx eax, ax
mov dword [esp + 4], eax
mov eax, ebx
call fcn.665c13c0
mov edx, dword [ebx + 0xc]
movsx eax, al
cmp eax, dword [edx]
jne 0x665c286c
mov eax, dword [esp + 0x48]
mov byte [eax + 0x2f], 2
jmp 0x665c286c
mov edi, dword [esp + 0x6c]
mov byte [ebp + 0x2d], 0
test edi, edi
je 0x665c28bf
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x74]
mov eax, dword [edi + 0x18]
mov ecx, dword [eax + ecx - 4]
mov eax, dword [ecx + 0x24]
test ah, 0x10
jne 0x665c28a2
and eax, 0x104
cmp eax, 0x104
je 0x665c28a2
lea eax, [esp + 0x98]
mov dword [esp + 8], ecx
mov ecx, edi
mov dword [esp + 0xc], eax
movzx eax, byte [esp + 0x83]
mov dword [esp], 0x800
mov dword [esp + 0x98], 0
sub eax, 1
mov dword [esp + 0x9c], 0
movzx eax, ax
mov dword [esp + 4], eax
mov eax, ebp
call fcn.665c13c0
mov edx, dword [ebp + 8]
movsx eax, al
cmp eax, dword [edx]
jne 0x665c2ab3
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x98]
mov ebx, dword [esp + 0x9c]
or byte [eax + 0x30], 4
mov dword [eax + 0x48], ecx
mov dword [eax + 0x4c], ebx
mov eax, dword [esp + 0x48]
movzx ebx, word [eax + 0x28]
jmp 0x665c28a2
mov eax, dword [esp + 0x78]
mov dword [esp + 4], str.no_query_solution
mov dword [esp], eax
call fcn.665b3dd0
jmp 0x665c28cf
mov eax, dword [esp + 0x68]
mov dword [esp + 0x3c], eax
jmp 0x665c2851
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x48]
mov byte [eax + 0x2f], 2
jmp 0x665c28a2
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x74]
lea eax, [esp + 0x98]
mov dword [esp + 0x98], 0
mov dword [esp + 0xc], eax
mov dword [esp + 0x9c], 0
mov eax, dword [ecx + 0x18]
mov eax, dword [eax + ebx - 4]
mov ebx, dword [esp + 0x48]
mov dword [esp], 0
mov dword [esp + 8], eax
movzx eax, byte [esp + 0x83]
sub eax, 1
movzx eax, ax
mov dword [esp + 4], eax
mov eax, ebx
call fcn.665c13c0
mov edx, dword [ebx + 8]
movsx eax, al
cmp eax, dword [edx]
jne 0x665c28bf
mov ebx, dword [esp + 0x48]
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0x9c]
or byte [ebx + 0x30], 8
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x4c], edx
jmp 0x665c28bf