Function at 0x665e98a0
Capabilities:
Contain obfuscated stackstrings
Inspect section memory permissions
Resolve function by parsing pe exports

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0xfc
mov edi, dword [eax]
mov dword [esp + 0x24], ecx
mov ecx, dword [eax + 0x40]
mov dword [esp + 0x2c], edx
mov dword [esp + 0xb4], 0
mov dword [esp + 0xb8], 0
mov dword [esp + 0x28], 0
test ecx, ecx
jne 0x665e98df
cmp byte [edi + 0x41], 0
je 0x665e9920
mov edx, dword [esp + 0x28]
mov eax, edi
call sym._sqlite3DbFree
mov edx, dword [esp + 0x2c]
mov eax, edi
call sym._sqlite3SrcListDelete
mov edx, dword [esp + 0x24]
mov eax, edi
call sym._sqlite3ExprListDelete
mov edx, dword [esp + 0x110]
mov eax, edi
call sym._sqlite3ExprDelete
add esp, 0xfc
pop ebx
pop esi
pop edi
pop ebp
ret
mov ebp, eax
call sym._sqlite3SrcListLookup
test eax, eax
mov dword [esp + 0x34], eax
je 0x665ea250
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 0x40]
mov eax, dword [ebp]
test edx, edx
je 0x665ea290
mov esi, dword [eax + 0x14]
test esi, esi
mov dword [esp + 0x3c], esi
jle 0x665ea29d
mov eax, dword [eax + 0x10]
cmp edx, dword [eax + 0xc]
je 0x665ea29d
add eax, 0x1c
xor ecx, ecx
mov ebx, dword [esp + 0x3c]
jmp 0x665e9978
add eax, 0x10
cmp edx, dword [eax - 0x10]
je 0x665e99f0
add ecx, 1
cmp ecx, ebx
jne 0x665e9970
lea eax, [esp + 0xb0]
mov esi, dword [esp + 0x34]
mov ecx, 0x6e
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov edx, esi
mov dword [esp], eax
mov eax, ebp
call sym._sqlite3TriggersExist
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x54], eax
mov edx, esi
mov eax, ebp
mov dword [esp + 0x58], ecx
call sym._sqlite3ViewGetColumnNames
test eax, eax
je 0x665e9a00
mov edx, dword [esp + 0xb8]
mov dword [esp + 0x28], 0
test edx, edx
je 0x665e98df
mov eax, dword [esp + 0xb4]
mov dword [esp + 0xb8], 0
mov dword [edx + 0x1ec], eax
jmp 0x665e98df
mov dword [esp + 0x3c], ecx
jmp 0x665e997f
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0x34]
mov eax, ebp
call sym._sqlite3IsReadOnly
test eax, eax
jne 0x665e99bb
mov eax, dword [ebp + 0x44]
mov esi, dword [esp + 0x2c]
lea ecx, [eax + 1]
mov dword [esp + 0x74], eax
mov dword [ebp + 0x44], ecx
mov dword [esi + 0x34], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 0x70], ecx
test byte [eax + 0x2a], 0x20
jne 0x665ea2aa
mov eax, dword [eax + 8]
mov dword [esp + 0x48], 0
test eax, eax
mov dword [esp + 0x28], eax
mov edx, eax
je 0x665ea356
mov eax, dword [esp + 0x48]
mov esi, dword [esp + 0x70]
mov ebx, dword [esp + 0x74]
test eax, eax
mov eax, esi
setne cl
mov dword [esp + 0x68], ebx
lea esi, [esi]
movzx ebx, byte [edx + 0x34]
and ebx, 3
cmp bl, 2
jne 0x665e9a8b
test cl, cl
je 0x665e9a8b
mov ebx, dword [esp + 0x2c]
mov dword [esp + 0x68], eax
mov dword [ebx + 0x34], eax
mov edx, dword [edx + 0x14]
add eax, 1
mov ebx, eax
mov dword [ebp + 0x44], eax
sub ebx, esi
test edx, edx
jne 0x665e9a70
lea edx, [ebx + 2]
mov esi, ebx
mov eax, dword [esp + 0x34]
xor ecx, ecx
movsx eax, word [eax + 0x22]
add eax, ebx
lea edx, [edx + eax*4]
mov eax, edi
call sym._sqlite3DbMallocRaw
test eax, eax
mov dword [esp + 0x28], eax
je 0x665ea250
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x28]
movsx eax, word [eax + 0x22]
mov dword [esp + 4], 1
lea ecx, [ecx + eax*4]
lea eax, [ecx + esi*4]
mov dword [esp + 0x6c], ecx
lea ecx, [ebx + 1]
mov dword [esp], eax
mov dword [esp + 8], ecx
mov ebx, eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x78], eax
call sym._memset
mov eax, dword [esp + 0x34]
mov byte [ebx + esi + 1], 0
mov ecx, dword [esp + 0x28]
movsx edx, word [eax + 0x22]
xor eax, eax
test edx, edx
jle 0x665e9b1f
mov dword [ecx + eax*4], 0xffffffff
add eax, 1
cmp eax, edx
jne 0x665e9b11
xor eax, eax
mov dword [esp + eax + 0xd0], 0
add eax, 4
cmp eax, 0x20
jb 0x665e9b21
mov eax, dword [esp + 0x2c]
mov dword [esp + 0xd0], ebp
mov dword [esp + 0xd4], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
test eax, eax
jle 0x665eaf28
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x5c], 0
mov byte [esp + 0x60], 0
mov byte [esp + 0x64], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x44], edi
shl eax, 4
mov dword [esp + 0x50], ebp
mov dword [esp + 0x4c], eax
mov esi, dword [esp + 0x24]
mov eax, dword [esp + 0x38]
mov edx, dword [esi + 4]
lea eax, [eax + eax*2]
lea ebx, [eax*8]
mov edx, dword [edx + eax*8]
lea eax, [esp + 0xd0]
call sym._sqlite3ResolveExprNames
test eax, eax
jne 0x665ea310
mov eax, dword [esp + 0x34]
movsx eax, word [eax + 0x22]
test eax, eax
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x24]
jle 0x665ea144
add ebx, dword [eax + 4]
mov eax, dword [esp + 0x34]
mov esi, dword [eax + 4]
mov dword [esp + 0x40], ebx
mov edi, dword [ebx + 4]
xor ebx, ebx
jmp 0x665e9bf0
add ebx, 1
add esi, 0x18
cmp ebx, dword [esp + 0x30]
je 0x665ea150
mov ebp, dword [esi]
mov dword [esp + 4], edi
mov dword [esp], ebp
call sym.libsqlite3_0.dll_sqlite3_stricmp
test eax, eax
jne 0x665e9be0
mov eax, dword [esp + 0x34]
movsx eax, word [eax + 0x20]
cmp eax, ebx
je 0x665ea260
mov eax, dword [esp + 0x48]
test eax, eax
je 0x665ea2ec
test byte [esi + 0x17], 1
movzx esi, byte [esp + 0x64]
mov eax, 1
mov ecx, dword [esp + 0x38]
cmovne esi, eax
cmp dword [esp + 0x30], ebx
mov eax, esi
mov byte [esp + 0x64], al
mov eax, dword [esp + 0x28]
mov dword [eax + ebx*4], ecx
jle 0x665ea320
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x4c]
mov ecx, ebp
mov eax, dword [eax + 0x10]
mov eax, dword [eax + esi]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x34]
mov edx, 0x17
mov dword [esp], ecx
mov ecx, dword [eax]
mov eax, dword [esp + 0x50]
call sym._sqlite3AuthCheck
cmp eax, 1
je 0x665ea310
cmp eax, 2
je 0x665ea1a0
mov ecx, dword [esp + 0x24]
add dword [esp + 0x38], 1
mov eax, dword [esp + 0x38]
cmp dword [ecx], eax
jg 0x665e9b81
mov edi, dword [esp + 0x44]
mov ebp, dword [esp + 0x50]
movzx eax, byte [esp + 0x64]
mov esi, dword [esp + 0x2c]
add al, byte [esp + 0x60]
mov ecx, dword [esp + 0x28]
mov dword [esi + 0x40], 0
mov dword [esi + 0x44], 0
mov esi, dword [esp + 0x34]
mov byte [esp + 0x40], al
movzx eax, al
mov dword [esp + 0x8c], eax
mov dword [esp], eax
mov eax, dword [ebp]
mov edx, esi
call sym._sqlite3FkRequired.isra.181
mov ebx, dword [esi + 8]
mov dword [esp + 0x80], eax
test ebx, ebx
je 0x665e9da1
cmp byte [esp + 0x40], 0
mov eax, dword [esp + 0x80]
mov dword [esp + 0x44], edi
setne dl
test eax, eax
setne al
xor ecx, ecx
or edx, eax
mov byte [esp + 0x30], dl
cmp byte [esp + 0x30], 0
jne 0x665e9d70
mov eax, dword [ebx + 0x24]
test eax, eax
jne 0x665e9d70
cmp ebx, dword [esp + 0x48]
je 0x665e9d70
movzx edx, word [ebx + 0x2e]
test edx, edx
je 0x665e9d7d
mov esi, dword [ebx + 4]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x38], 0
movsx edi, word [esi]
mov edi, dword [eax + edi*4]
test edi, edi
jns 0x665e9d70
xor eax, eax
mov dword [esp + 0x38], ecx
add eax, 1
cmp eax, edx
je 0x665ea775
movsx edi, word [esi + eax*2]
mov ecx, dword [esp + 0x28]
mov ecx, dword [ecx + edi*4]
test ecx, ecx
js 0x665e9d4f
mov ecx, dword [esp + 0x38]
lea esi, [esi]
mov eax, dword [ebp + 0x48]
add eax, 1
test eax, eax
mov dword [ebp + 0x48], eax
jne 0x665e9d88
mov eax, dword [esp + 0x78]
mov byte [eax + ecx + 1], 0
xor eax, eax
mov esi, dword [esp + 0x6c]
mov ebx, dword [ebx + 0x14]
mov dword [esi + ecx*4], eax
add ecx, 1
test ebx, ebx
jne 0x665e9d14
mov edi, dword [esp + 0x44]
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esp + 0x30], eax
je 0x665eac72
cmp byte [ebp + 0x12], 0
jne 0x665e9dbe
mov eax, dword [esp + 0x30]
or byte [eax + 0x58], 4
mov ecx, dword [esp + 0x3c]
mov eax, ebp
mov edx, 1
call sym._sqlite3BeginWriteOperation
mov eax, dword [esp + 0x34]
test byte [eax + 0x2a], 0x10
jne 0x665ea3ad
mov ebx, dword [ebp + 0x48]
lea eax, [ebx + 2]
mov esi, eax
mov dword [esp + 0x38], eax
mov dword [ebp + 0x48], eax
mov eax, dword [esp + 0x54]
test eax, eax
mov eax, dword [esp + 0x80]
setne dl
test eax, eax
movzx eax, byte [esp + 0x64]
setne byte [esp + 0xaa]
movzx ecx, byte [esp + 0xaa]
and eax, 1
or eax, ecx
test dl, dl
mov byte [esp + 0xab], al
jne 0x665ea386
test al, al
jne 0x665ea386
mov eax, dword [esp + 0x34]
mov dword [esp + 0x88], esi
mov dword [esp + 0x94], 0
movsx eax, word [eax + 0x22]
cmp byte [esp + 0x40], 0
setne byte [esp + 0x4c]
or dl, byte [esp + 0xaa]
movzx ecx, byte [esp + 0x4c]
jne 0x665ea36c
mov esi, dword [esp + 0x38]
test cl, cl
mov dword [esp + 0x44], esi
jne 0x665ea36c
add eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x58]
test ecx, ecx
mov dword [ebp + 0x48], eax
je 0x665e9ec6
mov esi, dword [esp + 0x34]
mov edx, dword [ebp + 0x1ec]
mov eax, dword [esi]
mov dword [esp + 0xb4], edx
mov dword [esp + 0xb8], ebp
mov dword [ebp + 0x1ec], eax
mov eax, esi
mov ecx, dword [esi + 0x40]
mov esi, dword [esp + 0x68]
mov edx, eax
mov eax, ebp
mov dword [esp + 4], esi
mov esi, dword [esp + 0x110]
mov dword [esp], esi
call sym._sqlite3MaterializeView.isra.495
mov edx, dword [esp + 0x110]
lea eax, [esp + 0xd0]
call sym._sqlite3ResolveExprNames
test eax, eax
jne 0x665ea250
mov esi, dword [esp + 0x34]
lea eax, [ebx + 1]
mov dword [esp + 0x40], eax
test byte [esi + 0x2a], 0x20
jne 0x665eaa15
mov esi, dword [esp + 0x38]
mov dword [esp], eax
xor ecx, ecx
mov eax, dword [esp + 0x30]
mov edx, 0x1c
mov dword [esp + 4], esi
call sym._sqlite3VdbeAddOp3
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x110]
mov edx, dword [esp + 0x2c]
mov dword [esp + 8], 4
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0xc], eax
mov eax, ebp
call sym._sqlite3WhereBegin
test eax, eax
mov ebx, eax
je 0x665ea250
mov eax, dword [eax + 0x3c]
mov ecx, dword [esp + 0x68]
mov edx, 0x67
mov dword [esp + 0xa0], eax
mov eax, dword [ebx + 0x40]
mov dword [esp + 0xa4], eax
movzx eax, byte [ebx + 0x26]
mov dword [esp + 4], 0
mov esi, eax
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x38]
mov dword [esp], eax
mov eax, dword [esp + 0x30]
call sym._sqlite3VdbeAddOp3
test esi, esi
jne 0x665e9fb0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x40]
mov edx, pe_nt_image_headers32
mov dword [esp + 4], 0
mov dword [esp], eax
mov eax, dword [esp + 0x30]
call sym._sqlite3VdbeAddOp3
mov eax, ebx
xor esi, esi
call sym._sqlite3WhereEnd
mov dword [esp + 0x3c], 0
mov dword [esp + 0x64], 0
test byte [edi + 0x18], 0x80
mov dword [esp + 0x90], 0
je 0x665e9fe7
cmp dword [ebp + 0x19c], 0
je 0x665eb2db
mov eax, dword [esp + 0x30]
mov eax, dword [eax + 0x18]
call sym._sqlite3VdbeMakeLabel.isra.428
cmp dword [esp + 0x58], 0
mov dword [esp + 0x84], eax
je 0x665eacbf
cmp dword [esp + 0x50], 0
je 0x665eabdd
cmp dword [esp + 0x48], 0
mov ebx, dword [esp + 0x84]
mov edx, 0x4c
mov ecx, dword [esp + 0x3c]
cmove ecx, dword [esp + 0x38]
mov eax, dword [esp + 0x30]
mov dword [esp + 4], 0
mov dword [esp], ebx
call sym._sqlite3VdbeAddOp3
mov dword [esp + 0x40], ebx
mov dword [esp + 0x7c], 0
cmp byte [esp + 0x60], 0
jne 0x665eac8a
xor ebx, ebx
cmp byte [esp + 0xab], 0
jne 0x665eab77
cmp dword [esp + 0x54], 0
je 0x665ea7bb
mov eax, dword [esp + 0x114]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x54]
mov dword [esp + 4], 3
mov dword [esp], 0
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x34]
mov dword [esp + 8], eax
mov eax, ebp
call sym._sqlite3TriggerColmask
or ebx, eax
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x94]
mov dword [esp + 0x5c], ebx
xor ebx, ebx
cmp word [eax + 0x22], 0
jle 0x665ea78c
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], edi
mov esi, ecx
mov edi, dword [esp + 0x34]
jmp 0x665ea0fd
mov ecx, dword [esp + 0x68]
mov eax, dword [esp + 0x30]
mov edx, edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._sqlite3ExprCodeGetColumnOfTable
movsx eax, word [edi + 0x22]
add ebx, 1
add esi, 1
cmp eax, ebx
jle 0x665ea77e
mov edx, dword [esp + 0x5c]
cmp edx, 0xffffffff
je 0x665ea0d5
cmp ebx, 0x1f
jg 0x665ea118
mov eax, 1
mov ecx, ebx
shl eax, cl
test edx, eax
jne 0x665ea0d5
mov edx, dword [edi + 4]
lea eax, [ebx + ebx*2]
lea eax, [edx + eax*8]
test byte [eax + 0x17], 1
jne 0x665ea0d5
mov eax, dword [esp + 0x30]
mov dword [esp + 4], 0
xor ecx, ecx
mov dword [esp], esi
mov edx, 0x1c
call sym._sqlite3VdbeAddOp3
jmp 0x665ea0eb
add ebx, dword [eax + 4]
mov edi, dword [ebx + 4]
mov dword [esp + 0x40], ebx
nop
mov eax, dword [esp + 0x48]
test eax, eax
jne 0x665ea320
mov eax, edi
call sym._sqlite3IsRowid
test eax, eax
je 0x665ea320
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x4c]
mov ebx, 0xffffffff
mov byte [esp + 0x60], 1
mov eax, dword [eax]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x44]
mov eax, dword [eax + 0x10]
mov eax, dword [eax + ecx]
mov ecx, str.ROWID
jmp 0x665e9c5a
mov eax, dword [esp + 0x28]
mov dword [eax + ebx*4], 0xffffffff
jmp 0x665e9c87
mov edx, dword [esp + 0xb8]
jmp 0x665e99ca
mov eax, dword [esp + 0x40]
cmp dword [esp + 0x30], ebx
mov esi, dword [esp + 0x38]
mov eax, dword [eax]
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0x28]
mov dword [eax + ebx*4], esi
jle 0x665ea150
mov byte [esp + 0x60], 1
jmp 0x665e9c4a
mov dword [esp + 0x3c], 0xfff0bdc0
jmp 0x665e997f
mov dword [esp + 0x3c], 0
jmp 0x665e997f
mov eax, dword [esp + 0x34]
mov edx, dword [eax + 8]
test edx, edx
je 0x665ea34e
movzx eax, byte [edx + 0x34]
and eax, 3
cmp al, 2
je 0x665eac69
mov eax, edx
jmp 0x665ea2dc
movzx ecx, byte [eax + 0x34]
and ecx, 3
cmp cl, 2
je 0x665ea2e3
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x665ea2d0
mov dword [esp + 0x48], eax
jmp 0x665e9a55
cmp dword [esp + 0x30], ebx
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x38]
mov dword [eax + ebx*4], esi
jg 0x665e9c4a
jmp 0x665ea15c
invalid
jl 0x665ea337