Function at 0x1006b0e8
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x34
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov ebx, ecx
cmp byte [edi + 0x4f], 0
jne 0x1006b10e
push str.cannot_VACUUM_from_within_a_transaction
call fcn.100241e0
xor eax, eax
pop ecx
inc eax
jmp 0x1006b511
cmp dword [edi + 0xac], 1
jle 0x1006b11e
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1006b100
mov ecx, dword [esp + 0x4c]
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x24], eax
test ecx, ecx
je 0x1006b15d
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x1008fc60], 3
je 0x1006b146
push str.non_text_filename
mov ecx, ebx
jmp 0x1006b100
mov dl, 1
call fcn.1003aa95
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x1006b162
mov edx, 0x10091798
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x20]
mov esi, dword [edi + 0x24]
mov dword [esp + 0x38], eax
or eax, 6
mov dword [edi + 0x18], eax
mov dword [esp + 0x34], esi
mov esi, dword [edi + 0x64]
mov dword [esp + 0x30], ecx
mov eax, dword [esp + 0x30]
mov cl, byte [edi + 0x58]
and eax, 0xefffaf7f
mov dword [esp + 0x3c], esi
or eax, 0x201
mov esi, dword [edi + 0x68]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0x34]
mov dword [edi + 0x24], esi
mov esi, dword [esp + 0x48]
shl esi, 4
mov byte [edi + 0x58], 0
mov byte [esp + 0x13], cl
push edx
mov ecx, dword [esi + eax]
mov eax, dword [esi + eax + 4]
mov dword [esp + 0x1c], eax
push str.ATTACH__Q_AS_vacuum_db
push ebx
mov eax, dword [eax + 4]
push edi
mov dword [esp + 0x58], esi
mov dword [esp + 0x30], ecx
mov eax, dword [eax]
mov al, byte [eax + 0xc]
mov byte [esp + 0x22], al
mov eax, dword [edi + 0x14]
mov dword [esp + 0x3c], eax
call fcn.1006afe4
mov esi, eax
add esp, 0x10
mov eax, dword [esp + 0x24]
mov dword [edi + 0x3c], eax
test esi, esi
jne 0x1006b4af
mov ebp, dword [esp + 0x2c]
shl ebp, 4
add ebp, dword [edi + 0x10]
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], eax
lea ecx, [eax + 4]
mov dword [esp + 0x1c], ecx
cmp dword [esp + 0x4c], esi
je 0x1006b270
mov eax, dword [ecx]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
and dword [esp + 0x24], esi
and dword [esp + 0x28], esi
mov edx, dword [eax]
test edx, edx
je 0x1006b26a
lea ecx, [esp + 0x24]
push ecx
push eax
call dword [edx + 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x1006b24f
cmp dword [esp + 0x28], eax
jl 0x1006b266
jg 0x1006b24f
cmp dword [esp + 0x24], eax
jbe 0x1006b266
xor esi, esi
mov edx, edi
push str.output_file_already_exists
mov ecx, ebx
inc esi
call fcn.100241e0
pop ecx
jmp 0x1006b4af
mov ecx, dword [esp + 0x1c]
or dword [edi + 0x18], 8
jmp 0x1006b274
mov dword [esp + 0x1c], ecx
mov esi, dword [esp + 0x18]
mov ecx, dword [ecx]
mov eax, dword [esi + 4]
mov ecx, dword [ecx]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov eax, dword [edi + 0x10]
mov dword [esp + 0x24], edx
mov edx, dword [esp + 0x48]
mov edx, dword [edx + eax + 0xc]
mov edx, dword [edx + 0x50]
call fcn.1002d14c
xor edx, edx
mov ecx, esi
call fcn.10032fa5
mov ecx, dword [esp + 0x14]
mov edx, eax
call fcn.10032fa5
mov eax, dword [esp + 0x1c]
push 0x21
pop edx
mov ecx, dword [eax]
mov ecx, dword [ecx]
call fcn.1002d1c0
push str.BEGIN
mov edx, ebx
mov ecx, edi
call fcn.1006af27
mov esi, eax
pop ecx
test esi, esi
jne 0x1006b4af
mov edx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x18]
neg edx
push eax
sbb edx, edx
and edx, 0xfffffffe
add edx, 2
call fcn.1003343d
mov esi, eax
pop ecx
test esi, esi
jne 0x1006b4af
mov esi, dword [esp + 0x18]
mov eax, dword [esi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x1006b30f
and dword [edi + 0x5c], 0
mov eax, dword [esi + 4]
mov ecx, dword [esp + 0x14]
push 0
push dword [esp + 0x28]
mov edx, dword [eax + 0x20]
call fcn.10032fee
pop ecx
pop ecx
test eax, eax
jne 0x1006b4ac
cmp byte [esp + 0x12], al
jne 0x1006b34f
mov edx, dword [edi + 0x5c]
mov ecx, dword [esp + 0x14]
push eax
push dword [esp + 0x28]
call fcn.10032fee
pop ecx
pop ecx
test eax, eax
jne 0x1006b4ac
cmp byte [edi + 0x51], 0
jne 0x1006b4ac
mov al, byte [edi + 0x54]
test al, al
js 0x1006b365
movsx edx, al
jmp 0x1006b376
mov eax, dword [esi + 4]
xor edx, edx
cmp byte [eax + 0x11], dl
je 0x1006b376
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, dword [esp + 0x14]
call fcn.1003309d
push dword [esp + 0x20]
mov eax, dword [esp + 0x30]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push edi
mov byte [edi + 0xa4], al
call fcn.1006afe4
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x1006b4af
push dword [esp + 0x20]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push edi
call fcn.1006afe4
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x1006b4af
push dword [esp + 0x20]
mov byte [edi + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push edi
call fcn.1006afe4
and dword [edi + 0x18], 0xfffffffb
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x1006b4af
push dword [esp + 0x20]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push edi
call fcn.1006afe4
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x1006b4af
xor ebx, ebx
movzx esi, byte [ebx + 0x1008b578]
lea eax, [esp + 0x2c]
mov ecx, dword [esp + 0x18]
mov edx, esi
push eax
call fcn.10038709
movzx eax, byte [ebx + 0x1008b579]
mov edx, esi
add eax, dword [esp + 0x30]
pop ecx
mov ecx, dword [esp + 0x14]
push eax
call fcn.10038733
mov esi, eax
pop ecx
test esi, esi
jne 0x1006b4af
add ebx, 2
cmp ebx, 0xa
jl 0x1006b409
mov ebx, dword [esp + 0x4c]
test ebx, ebx
jne 0x1006b462
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
call fcn.10039ce9
mov esi, eax
test esi, esi
jne 0x1006b4af
mov ecx, dword [esp + 0x14]
call fcn.10033db1
mov esi, eax
test esi, esi
jne 0x1006b4af
test ebx, ebx
jne 0x1006b4af
mov ebx, dword [esp + 0x1c]
xor edx, edx
mov eax, dword [ebx]
cmp byte [eax + 0x11], dl
je 0x1006b489
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, dword [esp + 0x18]
call fcn.1003309d
mov eax, dword [ebx]
mov ecx, dword [esp + 0x18]
push 1
push dword [esp + 0x28]
mov edx, dword [eax + 0x20]
call fcn.10032fee
pop ecx
pop ecx
mov esi, eax
jmp 0x1006b4af
push 7
pop esi
mov eax, dword [esp + 0x38]
or edx, 0xffffffff
mov ecx, dword [esp + 0x18]
xor ebx, ebx
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x64], eax
mov eax, dword [esp + 0x40]
mov dword [edi + 0x68], eax
mov al, byte [esp + 0x13]
push 1
push edx
mov byte [edi + 0xa4], bl
mov byte [edi + 0x58], al
call fcn.10032fee
mov byte [edi + 0x4f], 1
pop ecx
pop ecx
test ebp, ebp
je 0x1006b508
mov ecx, dword [ebp + 4]
call fcn.10032f35
mov dword [ebp + 4], ebx
mov dword [ebp + 0xc], ebx
mov ecx, edi
call fcn.10051ee9
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret