Function at 0x6892dc7a
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
mov ebx, edx
sub esp, 0x9c
cmp byte [edx + 0x55], 0
jne 0x6892dc97
mov ecx, str.cannot_VACUUM_from_within_a_transaction
jmp 0x6892dca5
cmp dword [edx + 0xbc], 1
jle 0x6892dcb8
mov ecx, str.cannot_VACUUM___SQL_statements_in_progress
mov edx, ebx
mov eax, edi
mov esi, 1
call fcn.688dd7a4
jmp 0x6892e1dd
mov eax, dword [edx + 0x3c]
cmp dword [ebp + 8], 0
mov esi, ecx
mov dword [ebp - 0x5c], eax
je 0x6892dcf4
mov eax, dword [ebp + 8]
mov ecx, str.non_text_filename
mov dword [esp], eax
call sym.sqlite.dll_sqlite3_value_type
cmp eax, 3
jne 0x6892dca5
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.sqlite.dll_sqlite3_value_text
mov edx, dword [ebx + 0x3c]
and edx, 0xfffffffe
or edx, 6
mov dword [ebx + 0x3c], edx
jmp 0x6892dcf9
mov eax, 0x68a2e749
mov edx, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x24]
shl esi, 4
mov dword [ebp - 0x84], 1
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x78], edx
mov edx, dword [ebx + 0x68]
mov dword [ebp - 0x74], ecx
mov ecx, dword [ebx + 0x18]
mov dword [ebp - 0x90], edx
mov edx, dword [ebx + 0x70]
mov dword [ebp - 0x70], ecx
mov ecx, dword [ebx + 0x6c]
mov dword [ebp - 0x98], edx
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x8c], ecx
mov ecx, dword [ebx + 0x74]
or edx, 6
mov dword [ebx + 0x18], edx
mov edx, dword [ebp - 0x78]
mov dword [ebp - 0x94], ecx
mov cl, byte [ebx + 0x5e]
and edx, 0xefffafff
mov byte [ebx + 0x5e], 0
or edx, 0x201
mov byte [ebp - 0x85], cl
mov ecx, dword [ebp - 0x74]
mov dword [ebx + 0x20], edx
mov edx, dword [ebx + 0x10]
and ecx, 0xfffffffe
add edx, esi
mov dword [ebx + 0x24], ecx
mov ecx, dword [edx + 4]
mov esi, dword [edx]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x60], ecx
mov edx, dword [edx]
cmp byte [edx + 0xc], 0
jne 0x6892dd9a
xor ecx, ecx
cmp byte [edx + 0x10], 0
setne cl
mov dword [ebp - 0x84], ecx
mov ecx, dword [ebx + 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.ATTACH__Q_AS_vacuum_db
mov dword [esp + 4], edi
mov dword [esp], ebx
mov dword [ebp - 0x7c], ecx
call fcn.6892dc32
mov esi, eax
mov eax, dword [ebp - 0x5c]
mov dword [ebx + 0x3c], eax
xor eax, eax
mov dword [ebp - 0x64], eax
test esi, esi
jne 0x6892e15c
mov eax, dword [ebp - 0x7c]
shl eax, 4
add eax, dword [ebx + 0x10]
cmp dword [ebp + 8], 0
mov dword [ebp - 0x64], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x5c], eax
je 0x6892de3f
mov eax, dword [eax + 4]
xor ecx, ecx
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x48], ecx
mov dword [ebp - 0x44], ecx
cmp dword [eax], 0
je 0x6892de26
lea edx, [ebp - 0x48]
call fcn.688c837c
test eax, eax
jne 0x6892de0e
cmp eax, dword [ebp - 0x48]
sbb eax, dword [ebp - 0x44]
jge 0x6892de26
mov ecx, str.output_file_already_exists
mov edx, ebx
mov eax, edi
mov esi, 1
call fcn.688dd7a4
jmp 0x6892e15c
mov eax, dword [ebx + 0x10]
mov esi, dword [ebp - 0x6c]
or dword [ebx + 0x18], 8
movzx esi, byte [eax + esi + 8]
mov eax, dword [ebx + 0x20]
and eax, 0x38
or esi, eax
jmp 0x6892de44
mov esi, 1
mov eax, dword [ebp - 0x60]
or esi, 0x20
call fcn.688d6e47
mov ecx, dword [ebp - 0x6c]
mov dword [ebp - 0x80], eax
mov eax, dword [ebx + 0x10]
mov eax, dword [eax + ecx + 0xc]
mov edx, dword [eax + 0x50]
mov eax, dword [ebp - 0x5c]
call fcn.688d6fd4
mov eax, dword [ebp - 0x60]
xor edx, edx
call fcn.688d6dd9
mov edx, eax
mov eax, dword [ebp - 0x5c]
call fcn.688d6dd9
mov eax, dword [ebp - 0x5c]
mov edx, esi
call fcn.688d7b96
mov ecx, str.BEGIN
mov edx, edi
mov eax, ebx
call fcn.6892db53
mov esi, eax
test eax, eax
jne 0x6892e15c
cmp dword [ebp + 8], 0
mov eax, dword [ebp - 0x60]
sete dl
sete byte [ebp - 0x6c]
xor ecx, ecx
movzx edx, dl
add edx, edx
call fcn.68905a32
mov esi, eax
test eax, eax
jne 0x6892e15c
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov edx, dword [eax]
cmp byte [edx + 5], 5
jne 0x6892deda
cmp byte [ebp - 0x6c], 0
je 0x6892deda
xor edx, edx
mov dword [ebx + 0x64], edx
xor esi, esi
mov edx, dword [eax + 0x24]
mov ecx, dword [ebp - 0x80]
mov dword [esp], esi
mov eax, dword [ebp - 0x5c]
call fcn.688d8a2f
test eax, eax
jne 0x6892df19
cmp dword [ebp - 0x84], 0
je 0x6892df02
cmp byte [ebx + 0x57], 0
je 0x6892df23
jmp 0x6892df19
xor ecx, ecx
mov edx, dword [ebx + 0x64]
mov eax, dword [ebp - 0x5c]
mov dword [esp], ecx
mov ecx, dword [ebp - 0x80]
call fcn.688d8a2f
test eax, eax
je 0x6892defa
mov esi, 7
jmp 0x6892e15c
movsx edx, byte [ebx + 0x5a]
test dl, dl
jns 0x6892df35
mov eax, dword [ebp - 0x60]
call fcn.688d6f05
mov edx, eax
mov eax, dword [ebp - 0x5c]
call fcn.688d6eba
mov al, byte [ebp - 0x7c]
mov byte [ebx + 0xb0], al
mov eax, dword [ebp - 0x68]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.6892dc32
mov esi, eax
test eax, eax
jne 0x6892e15c
mov eax, dword [ebp - 0x68]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.6892dc32
mov esi, eax
test eax, eax
jne 0x6892e15c
mov eax, dword [ebp - 0x68]
mov byte [ebx + 0xb0], 0
mov dword [esp + 8], str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov dword [esp + 0xc], eax
mov dword [esp + 4], edi
mov dword [esp], ebx
call fcn.6892dc32
and dword [ebx + 0x18], 0xfffffffb
mov esi, eax
test eax, eax
jne 0x6892e15c
mov eax, dword [ebp - 0x68]
mov dword [esp + 8], str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov dword [esp + 4], edi
mov dword [esp + 0xc], eax
mov dword [esp], ebx
call fcn.6892dc32
mov esi, eax
test eax, eax
jne 0x6892e15c
movzx eax, byte [esi + 0x68a34788]
lea ecx, [ebp - 0x4c]
mov edi, eax
mov edx, eax
mov eax, dword [ebp - 0x60]
call fcn.688d6f8c
mov eax, dword [ebp - 0x5c]
movzx ecx, byte [esi + 0x68a34789]
mov edx, edi
add ecx, dword [ebp - 0x4c]
call fcn.68905a86
mov edi, eax
test eax, eax
jne 0x6892e15a
add esi, 2
cmp esi, 0xa
jne 0x6892dfe5
cmp dword [ebp + 8], 0
je 0x6892e03e
mov eax, dword [ebp - 0x5c]
call fcn.68909e75
mov edi, eax
test eax, eax
je 0x6892e11a
jmp 0x6892e15a
mov eax, dword [ebp - 0x60]
call fcn.688d6cb1
mov eax, dword [ebp - 0x5c]
call fcn.688d6cb1
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
cmp dword [eax], 0
mov dword [ebp - 0x68], eax
je 0x6892e09b
mov eax, dword [ebp - 0x5c]
mov edx, dword [eax + 4]
mov eax, dword [edx + 0x24]
mov ecx, dword [edx + 0x30]
mov edi, eax
mul dword [edx + 0x30]
sar edi, 0x1f
imul ecx, edi
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0x68]
add edx, ecx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x44], edx
mov edx, 0xb
call fcn.688c8392
mov edi, eax
test eax, eax
je 0x6892e09b
cmp eax, 0xc
jne 0x6892e101
lea esi, [ebp - 0x48]
xor eax, eax
mov ecx, 0xc
mov edi, esi
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax]
mov dword [esp + 4], 0x7fffffff
mov dword [esp], esi
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x44], eax
call sym.sqlite.dll_sqlite3_backup_step
mov eax, esi
call fcn.6890b9ab
mov edi, eax
test eax, eax
jne 0x6892e0ee
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
and word [eax + 0x18], 0xfffd
jmp 0x6892e101
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x6892e101
call fcn.688cd59a
mov eax, dword [ebp - 0x5c]
call fcn.688d089a
mov eax, dword [ebp - 0x60]
call fcn.688d089a
test edi, edi
jne 0x6892e15a
jmp 0x6892e027
xor esi, esi
cmp dword [ebp + 8], 0
jne 0x6892e15c
mov eax, dword [ebp - 0x5c]
call fcn.688d6f05
mov edx, eax
mov eax, dword [ebp - 0x60]
call fcn.688d6eba
mov eax, dword [ebp - 0x5c]
call fcn.688d6e47
mov ecx, eax
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax + 4]
mov edx, dword [eax + 0x24]
mov eax, dword [ebp - 0x60]
mov dword [esp], 1
call fcn.688d8a2f
mov esi, eax
jmp 0x6892e15c
mov esi, edi
mov eax, dword [ebp - 0x70]
mov edx, dword [ebp - 0x74]
mov byte [ebx + 0xb0], 0
xor ecx, ecx
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x78]
mov dword [ebx + 0x24], edx
mov edx, dword [ebp - 0x8c]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x90]
mov dword [ebx + 0x6c], edx
mov edx, dword [ebp - 0x94]
mov dword [ebx + 0x68], eax
mov eax, dword [ebp - 0x98]
mov dword [ebx + 0x74], edx
or edx, 0xffffffff
mov dword [ebx + 0x70], eax
mov al, byte [ebp - 0x85]
mov byte [ebx + 0x5e], al
mov eax, dword [ebp - 0x60]
mov dword [esp], 1
call fcn.688d8a2f
cmp dword [ebp - 0x64], 0
mov byte [ebx + 0x55], 1
je 0x6892e1d6
mov eax, dword [ebp - 0x64]
mov eax, dword [eax + 4]
call fcn.6890a702
mov eax, dword [ebp - 0x64]
xor edx, edx
mov dword [eax + 4], edx
mov dword [eax + 0xc], edx
mov eax, ebx
call fcn.688d6d70
add esp, 0x9c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret