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

Disassembly:
push ebp
push edi
mov edi, eax
push esi
push ebx
sub esp, 0x5c
mov ebx, dword [esp + 0x70]
mov dword [esp + 0x48], eax
mov eax, edx
mov edx, ecx
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x74]
mov dword [esp + 0x30], ebx
movzx ebx, word [esp + 0x78]
mov word [esp + 0x2c], bx
movzx ebx, word [esp + 0x80]
mov word [esp + 0x44], bx
mov ebx, dword [edi + 4]
mov dword [esp + 0x24], ebx
mov ebx, dword [esp + 0x7c]
mov ebx, dword [ebx + 0x10]
mov dword [esp + 0x20], ebx
mov ebx, edi
mov edi, dword [edi + 0xc]
mov ecx, dword [ebx]
mov ebx, dword [ecx]
mov dword [esp + 0x38], ebx
mov ebx, dword [ecx + 4]
mov dword [esp + 0x3c], ebx
movzx ebx, byte [edi + 0x10]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x7c]
mov esi, dword [ebx]
mov ebx, dword [esp + 0x84]
mov dword [esp + 0x18], esi
mov dword [ebx], 0
mov dword [edi], eax
mov eax, dword [esp + 0x7c]
mov dword [edi + 4], edx
mov ebx, dword [eax + 4]
test esi, esi
jle 0x665b9a34
mov eax, dword [esp + 0x24]
mov dword [esp + 0x34], edi
xor esi, esi
mov edi, dword [esp + 0x30]
mov ebp, dword [eax + 0x14]
jmp 0x665b99ec
add esi, 1
add ebx, 0xc
cmp dword [esp + 0x18], esi
je 0x665b9a30
mov eax, dword [ebx + 8]
mov edx, dword [esp + 0x28]
mov ecx, edi
mov byte [ebx + 5], 0
not ecx
lea eax, [eax + eax*2]
not edx
shl eax, 4
add eax, ebp
and edx, dword [eax + 0x20]
and ecx, dword [eax + 0x24]
or ecx, edx
jne 0x665b99e0
movzx ecx, word [esp + 0x2c]
and cx, word [eax + 0xc]
jne 0x665b99e0
mov byte [ebx + 5], 1
add esi, 1
add ebx, 0xc
cmp dword [esp + 0x18], esi
jne 0x665b99ec
lea esi, [esi]
mov edi, dword [esp + 0x34]
mov eax, dword [esp + 0x18]
mov dword [esp + 4], 0
shl eax, 3
mov dword [esp + 8], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x3c]
mov esi, dword [esp + 0x7c]
mov dword [eax + 0x18], 0
mov dword [eax + 0x14], 0
mov dword [eax + 0x20], 0
mov dword [eax + 0x28], 0xa2879f2e
mov dword [eax + 0x2c], 0x546d42ae
mov dword [eax + 0x30], 0x19
mov dword [eax + 0x34], 0
mov dword [eax + 0x38], 0
mov eax, dword [esp + 0x40]
lea eax, [eax + eax*8]
lea eax, [ebx + eax*8]
mov ebx, dword [eax + 0x44]
mov ecx, dword [eax + 0x40]
mov eax, dword [eax + 0x18]
mov dword [esi + 0x44], ebx
mov ebx, dword [esp + 0x38]
mov eax, dword [eax + 0x40]
mov dword [esi + 0x40], ecx
mov edx, dword [ebx]
test eax, eax
jne 0x665b9ad3
jmp 0x665ba02f
mov eax, dword [eax + 0x18]
test eax, eax
je 0x66679f15
cmp edx, dword [eax]
jne 0x665b9ac8
mov ebx, dword [eax + 8]
mov esi, dword [esp + 0x7c]
mov eax, dword [ebx]
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [eax + 0xc]
mov dword [esp + 0x34], eax
test eax, eax
je 0x665b9b48
cmp eax, 0x13
je 0x665b9b48
cmp eax, 7
je 0x665b9da0
mov eax, dword [ebx + 8]
test eax, eax
je 0x665b9d40
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], 0x6667eaa2
mov dword [esp], eax
call fcn.665b3dd0
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov dword [ebx + 8], 0
mov eax, dword [esp + 0x34]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebx + 8]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov eax, dword [esp + 0x34]
mov dword [ebx + 8], 0
test eax, eax
jne 0x665b9d1f
mov eax, dword [esp + 0x18]
test eax, eax
jle 0x665b9db3
mov eax, dword [esp + 0x18]
mov ebx, dword [edi + 0x30]
xor ebp, ebp
mov esi, 0xffffffff
mov dword [esp + 4], 0
shl eax, 2
mov dword [esp], ebx
mov dword [esp + 8], eax
mov dword [esp + 0x30], ebx
call sub.msvcrt.dll_memset
mov eax, dword [esp + 0x7c]
movzx ecx, word [esp + 0x44]
mov word [edi + 0x1e], bp
mov dword [esp + 0x28], esi
mov ebx, dword [eax + 4]
mov dword [esp + 0x44], ecx
xor eax, eax
jmp 0x665b9bf2
test byte [edx + 0xc], 1
je 0x665b9be2
mov esi, dword [esp + 0x7c]
and dword [esi + 0x38], 0xfffffffe
mov dword [esi + 0x20], 0
mov esi, dword [esp + 0x84]
mov dword [esi], 1
add eax, 1
add ebx, 0xc
cmp dword [esp + 0x18], eax
je 0x665b9ca8
mov esi, dword [esp + 0x20]
mov ecx, dword [esi + eax*8]
sub ecx, 1
js 0x665b9be2
mov edx, dword [ebx + 8]
cmp dword [esp + 0x18], ecx
jle 0x665b9ce2
test edx, edx
js 0x665b9ce2
mov esi, dword [esp + 0x24]
cmp dword [esi + 0xc], edx
jle 0x665b9ce2
mov esi, dword [esp + 0x30]
lea esi, [esi + ecx*4]
mov dword [esp + 0x2c], esi
mov esi, dword [esi]
test esi, esi
jne 0x665b9ce2
cmp byte [ebx + 5], 0
je 0x665b9ce2
mov esi, dword [esp + 0x24]
lea edx, [edx + edx*2]
shl edx, 4
add edx, dword [esi + 0x14]
mov esi, dword [edi]
or esi, dword [edx + 0x20]
mov ebp, dword [edx + 0x24]
mov dword [edi], esi
mov esi, dword [esp + 0x2c]
or dword [edi + 4], ebp
mov ebp, dword [esp + 0x28]
mov dword [esi], edx
mov esi, dword [esp + 0x20]
cmp ebp, ecx
cmovl ebp, ecx
cmp byte [esi + eax*8 + 4], 0
mov dword [esp + 0x28], ebp
je 0x665b9bc0
cmp eax, 0xf
jg 0x665b9bc0
mov esi, dword [esp + 0x44]
bt esi, eax
jb 0x665b9bc0
mov esi, 1
shl esi, cl
or word [edi + 0x1e], si
jmp 0x665b9bc0
mov esi, dword [esp + 0x28]
lea eax, [esi + 1]
mov word [edi + 0x28], ax
cmp esi, 0xffffffff
je 0x665b9dbf
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
jmp 0x665b9cdb
add eax, 1
cmp esi, eax
jl 0x665b9dbf
mov ecx, dword [edx + eax*4]
test ecx, ecx
jne 0x665b9cd0
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x3c]
lea eax, [eax + eax*8]
mov eax, dword [edi + eax*8 + 0x18]
mov eax, dword [eax]
mov dword [esp + 4], str._s.xBestIndex_malfunction
mov dword [esp + 8], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
call fcn.665b3dd0
mov dword [esp + 0x34], 1
mov eax, dword [esp + 0x34]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [esp + 0x34], 0x13
jne 0x665b9b35
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x34]
add esp, 0x5c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, dword [esp + 0x34]
mov eax, str.no_more_rows_available
cmp edi, 0x65
je 0x665b9b0b
mov eax, str.abort_due_to_ROLLBACK
cmp edi, 0x204
je 0x665b9b0b
mov eax, str.another_row_available
cmp edi, 0x64
je 0x665b9b0b
mov eax, edi
movzx edx, al
mov eax, str.unknown_error
cmp edx, 0x1c
jg 0x665b9b0b
mov eax, dword [edx*4 + 0x66689700]
mov edx, str.unknown_error
test eax, eax
cmove eax, edx
jmp 0x665b9b0b
mov eax, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.6658a200
jmp 0x665b9b23
xor eax, eax
xor edx, edx
mov word [edi + 0x1e], ax
mov word [edi + 0x28], dx
mov eax, dword [esp + 0x7c]
mov ebx, dword [esp + 0x7c]
mov eax, dword [eax + 0x14]
mov edx, dword [ebx + 0x20]
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x7c]
mov eax, dword [eax + 0x1c]
mov byte [edi + 0x1c], al
mov eax, dword [esp + 0x7c]
mov dword [eax + 0x1c], 0
mov eax, dword [eax + 0x18]
mov dword [edi + 0x20], eax
xor eax, eax
test edx, edx
jne 0x665b9ed9
mov byte [edi + 0x1d], al
mov eax, dword [esp + 0x7c]
xor ebp, ebp
xor ebx, ebx
mov word [edi + 0x12], bp
fld qword [eax + 0x28]
fst qword [esp + 0x18]
fld1
fcompi st(1)
jae 0x665b9e36
fld dword [0x66690d40]
fcompi st(1)
jae 0x665b9f24
fstp st(0)
mov edx, dword [esp + 0x1c]
mov eax, edx
shr eax, 0x14
sub ax, 0x3fe
lea eax, [eax + eax*4]
lea ebx, [eax + eax]
jmp 0x665b9e38
fstp st(0)
mov eax, dword [esp + 0x7c]
xor ecx, ecx
mov word [edi + 0x14], bx
mov ebx, 7
mov edx, dword [eax + 0x34]
mov eax, dword [eax + 0x30]
cmp ebx, eax
mov ebx, ecx
sbb ebx, edx
jae 0x665b9ee2
test edx, edx
je 0x665b9fb9
bsr ebx, edx
xor ebx, 0x1f
mov ecx, 0x3c
sub ecx, ebx
shrd eax, edx, cl
lea ebx, [ecx + ecx*4]
shr edx, cl
and ecx, 0x20
cmovne eax, edx
lea ebx, [ebx + ebx + 0x28]
and eax, 7
movzx eax, word [eax + eax + 0x66689498]
lea ebx, [ebx + eax - 0xa]
mov eax, dword [edi + 0x24]
mov word [edi + 0x16], bx
mov ebx, dword [esp + 0x7c]
mov edx, eax
and ah, 0xef
or dh, 0x10
test byte [ebx + 0x38], 1
cmovne eax, edx
mov edx, edi
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x48]
call fcn.66592ea0
cmp byte [edi + 0x1c], 0
mov dword [esp + 0x34], eax
je 0x665b9b35
mov eax, dword [edi + 0x20]
mov dword [esp], eax
call sym.libsqlite3_0.dll_sqlite3_free
mov byte [edi + 0x1c], 0
jmp 0x665b9b35
movzx eax, byte [ebx + 8]
jmp 0x665b9df5
mov ebx, 1
cmp ebx, eax
mov ebx, 0
sbb ecx, edx
jae 0x665b9e8f
mov dword [esp + 0x18], edi
mov ecx, 0x1e
mov ebp, 7
xor esi, esi
lea esi, [esi]
shld edx, eax, 1
add eax, eax
mov ebx, ecx
mov edi, esi
sub ecx, 0xa
cmp ebp, eax
sbb edi, edx
jae 0x665b9f08
mov edi, dword [esp + 0x18]
jmp 0x665b9e80
fld dword [0x66690c28]
fxch st(1)
fcomi st(1)
jae 0x665b9fec
fstp st(1)
fnstcw word [esp + 0x4e]
movzx eax, word [esp + 0x4e]
or ah, 0xc
mov word [esp + 0x4c], ax
fldcw word [esp + 0x4c]
fistp qword [esp + 0x18]
fldcw word [esp + 0x4e]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov ebx, 7
cmp ebx, eax
mov ebx, ecx
sbb ebx, edx
jb 0x665b9fc7
mov ebx, 1
cmp ebx, eax
mov ebx, 0
sbb ecx, edx
jae 0x665b9e38
mov dword [esp + 0x18], edi
mov ecx, 0x1e
mov ebp, 7
xor esi, esi
shld edx, eax, 1
add eax, eax
mov ebx, ecx
mov edi, esi
sub ecx, 0xa
cmp ebp, eax
sbb edi, edx
jae 0x665b9f8e
mov edi, dword [esp + 0x18]
and eax, 7
movzx eax, word [eax + eax + 0x66689498]
lea ebx, [ebx + eax - 0xa]
jmp 0x665b9e38
bsr ebx, eax
xor ebx, 0x1f
add ebx, 0x20
jmp 0x665b9e67
test edx, edx
je 0x665ba024
bsr ebx, edx
xor ebx, 0x1f
mov ecx, 0x3c
sub ecx, ebx
shrd eax, edx, cl
lea ebx, [ecx + ecx*4]
shr edx, cl
and ecx, 0x20
cmovne eax, edx
lea ebx, [ebx + ebx + 0x28]
jmp 0x665b9fa5
fstp st(0)
fnstcw word [esp + 0x4e]
fsubr qword [esp + 0x18]
movzx eax, word [esp + 0x4e]
or ah, 0xc
mov word [esp + 0x4c], ax
fldcw word [esp + 0x4c]
fistp qword [esp + 0x18]
fldcw word [esp + 0x4e]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
lea ecx, [edx - 0x80000000]
mov edx, ecx
jmp 0x665b9f5b
bsr ebx, eax
xor ebx, 0x1f
add ebx, 0x20
jmp 0x665b9fd1
jmp 0x66679f15
mov eax, dword [8]
ud2