Function at 0x1813465f
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
and dword [esp + 0x20], 0
push ebx
push esi
mov esi, edx
mov ebx, ecx
push edi
cmp byte [esi + 0x4f], 0
jne 0x1813468d
push str.cannot_VACUUM_from_within_a_transaction
call fcn.180e6caa
xor eax, eax
pop ecx
inc eax
jmp 0x18134a72
cmp dword [esi + 0xb0], 1
jle 0x1813469d
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1813467f
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x181346db
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x181ea608], 3
je 0x181346c4
push str.non_text_filename
mov ecx, ebx
jmp 0x1813467f
mov dl, 1
call fcn.180ff02c
mov ecx, dword [esi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x181346e0
mov edx, 0x181f4ba4
mov ecx, dword [esi + 0x20]
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov dword [esp + 0x28], ecx
mov ecx, dword [esi + 0x64]
mov dword [esp + 0x38], ecx
mov ecx, dword [esi + 0x68]
mov dword [esp + 0x30], eax
or eax, 6
mov dword [esp + 0x3c], ecx
mov cl, byte [esi + 0x58]
mov dword [esp + 0x34], edi
and edi, 0xfffffffe
mov dword [esi + 0x24], edi
mov edi, dword [ebp + 8]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov byte [esp + 0xf], cl
mov ecx, dword [esp + 0x28]
and ecx, 0xefffafff
shl edi, 4
mov byte [esi + 0x58], 0
or ecx, 0x201
mov dword [esi + 0x20], ecx
push edx
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
mov dword [esp + 0x14], eax
push str.ATTACH__Q_AS_vacuum_db
push ebx
mov eax, dword [eax + 4]
push esi
mov dword [ebp + 8], edi
mov dword [esp + 0x24], ecx
mov eax, dword [eax]
mov al, byte [eax + 0xc]
mov byte [esp + 0x1e], al
mov eax, dword [esi + 0x14]
mov dword [esp + 0x30], eax
call fcn.1813456b
mov edi, eax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x18134a0a
mov eax, dword [esp + 0x20]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [esp + 0x2c], eax
mov edi, dword [eax + 4]
mov dword [esp + 0x24], edi
je 0x181347e7
mov eax, dword [edi + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
and dword [esp + 0x18], 0
and dword [esp + 0x1c], 0
mov ecx, dword [eax]
test ecx, ecx
je 0x181347e3
lea edx, [esp + 0x18]
push edx
push eax
call dword [ecx + 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x181347cc
cmp dword [esp + 0x1c], eax
jl 0x181347e3
jg 0x181347cc
cmp dword [esp + 0x18], eax
jbe 0x181347e3
xor edi, edi
mov edx, esi
push str.output_file_already_exists
mov ecx, ebx
inc edi
call fcn.180e6caa
pop ecx
jmp 0x18134a0a
or dword [esi + 0x18], 8
mov ecx, dword [esp + 0x10]
call fcn.180f6ca3
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 8]
mov dword [esp + 0x18], eax
mov edx, dword [edx + ecx + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.180f6b56
mov ecx, dword [esp + 0x10]
xor edx, edx
call fcn.180f6b90
mov edx, eax
mov ecx, edi
call fcn.180f6b90
push 0x21
pop edx
mov ecx, edi
call fcn.180f6bf7
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.181344b0
mov edi, eax
pop ecx
test edi, edi
jne 0x18134a0a
mov edx, dword [ebp + 0xc]
mov ecx, dword [esp + 0x10]
neg edx
push eax
sbb edx, edx
and edx, 0xfffffffe
add edx, 2
call fcn.180f70c4
mov edi, eax
pop ecx
test edi, edi
jne 0x18134a0a
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x18134876
and dword [esi + 0x5c], edi
mov edx, dword [ecx + 4]
mov edi, dword [esp + 0x24]
mov ecx, edi
mov edx, dword [edx + 0x24]
push 0
push dword [esp + 0x1c]
call fcn.180f6c1c
pop ecx
pop ecx
test eax, eax
jne 0x18134a07
cmp byte [esp + 0xe], al
jne 0x181348b3
mov edx, dword [esi + 0x5c]
mov ecx, edi
push eax
push dword [esp + 0x1c]
call fcn.180f6c1c
pop ecx
pop ecx
test eax, eax
jne 0x18134a07
cmp byte [esi + 0x51], 0
jne 0x18134a07
mov al, byte [esi + 0x54]
test al, al
js 0x181348c9
movsx eax, al
jmp 0x181348d2
mov ecx, dword [esp + 0x10]
call fcn.180f6d95
mov edx, eax
mov ecx, edi
call fcn.180f6d43
push dword [esp + 0x14]
mov eax, dword [esp + 0x24]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0xa4], al
call fcn.1813456b
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18134a0a
push dword [esp + 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebx
push esi
call fcn.1813456b
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18134a0a
push dword [esp + 0x14]
mov byte [esi + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.1813456b
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18134a0a
push dword [esp + 0x14]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.1813456b
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x18134a0a
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], edi
movzx edx, byte [edi + 0x181e5e48]
lea eax, [esp + 0x24]
mov ecx, dword [esp + 0x10]
push eax
call fcn.180fc9a4
movzx eax, byte [edi + 0x181e5e49]
add eax, dword [esp + 0x28]
movzx edx, byte [edi + 0x181e5e48]
pop ecx
push eax
mov ecx, ebx
call fcn.180fc9e6
mov edi, eax
pop ecx
test edi, edi
jne 0x18134a0a
mov edi, dword [esp + 0x20]
add edi, 2
mov dword [esp + 0x20], edi
cmp edi, 0xa
jl 0x1813496b
cmp dword [ebp + 0xc], eax
jne 0x181349c8
mov ecx, dword [esp + 0x10]
mov edx, ebx
call fcn.180fe22c
mov edi, eax
test edi, edi
jne 0x18134a0a
mov ecx, ebx
call fcn.180f7b72
mov edi, eax
test edi, edi
jne 0x18134a0a
cmp dword [ebp + 0xc], eax
jne 0x18134a0a
mov ecx, ebx
call fcn.180f6d95
mov ecx, dword [esp + 0x10]
mov edx, eax
call fcn.180f6d43
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x10]
push 1
push dword [esp + 0x1c]
mov edx, dword [eax + 0x24]
call fcn.180f6c1c
pop ecx
pop ecx
mov edi, eax
jmp 0x18134a0a
push 7
pop edi
mov eax, dword [esp + 0x30]
or edx, 0xffffffff
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x34]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x64], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x68], eax
mov al, byte [esp + 0xf]
push 1
push 0
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.180f6c1c
mov ebx, dword [esp + 0x34]
mov byte [esi + 0x4f], 1
pop ecx
pop ecx
test ebx, ebx
je 0x18134a69
mov ecx, dword [ebx + 4]
call fcn.180f6aaf
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
mov ecx, esi
call fcn.18118bb0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret