Function at 0x1003b2db
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
cmp byte [esi + 0x4f], bl
jne 0x1003b306
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.1003d131
xor eax, eax
add esp, 0xc
inc eax
jmp 0x1003b6cf
cmp dword [esi + 0xac], 1
jle 0x1003b316
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1003b2f2
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x10], eax
test ecx, ecx
je 0x1003b351
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x10070438], 3
je 0x1003b33a
push str.non_text_filename
jmp 0x1003b2f2
push ecx
call fcn.100029fe
pop ecx
mov ecx, dword [esi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x1003b356
mov edx, 0x10070ad4
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [esi + 0x64]
push edi
mov edi, dword [esi + 0x18]
mov dword [ebp - 0x28], eax
or eax, 0x201
mov dword [ebp - 0x2c], ecx
mov ecx, dword [esi + 0x68]
mov dword [esi + 0x20], eax
and dword [esi + 0x20], 0xefffaf7f
mov dword [ebp - 0x30], ecx
mov cl, byte [esi + 0x58]
mov dword [ebp - 0x24], edi
or edi, 6
mov dword [esi + 0x18], edi
mov edi, dword [ebp + 0x10]
mov byte [ebp + 0xf], cl
mov ecx, dword [ebp - 0x1c]
mov eax, ecx
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x10]
shl edi, 4
mov byte [esi + 0x58], bl
push edx
push str.ATTACH__Q_AS_vacuum_db
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
push dword [ebp + 8]
mov dword [ebp - 4], eax
push esi
mov eax, dword [eax + 4]
mov dword [ebp + 0x10], edi
mov dword [ebp - 0xc], ecx
mov eax, dword [eax]
movzx eax, byte [eax + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x18], eax
call fcn.10014afc
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x10]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x1003b670
mov ebx, dword [ebp - 0x18]
shl ebx, 4
add ebx, dword [esi + 0x10]
cmp dword [ebp + 0x14], 0
mov edi, dword [ebx + 4]
mov dword [ebp - 8], edi
je 0x1003b44a
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x14], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x1003b446
lea edx, [ebp - 0x14]
push edx
push eax
call dword [ecx + 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x1003b42d
cmp dword [ebp - 0x10], eax
jl 0x1003b446
jg 0x1003b42d
cmp dword [ebp - 0x14], eax
jbe 0x1003b446
push str.output_file_already_exists
push esi
push dword [ebp + 8]
xor edi, edi
inc edi
call fcn.1003d131
add esp, 0xc
jmp 0x1003b670
or dword [esi + 0x18], 8
push dword [ebp - 4]
call fcn.10027d8f
mov ecx, dword [ebp - 4]
push ecx
mov eax, dword [ecx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x10], edx
call fcn.10028629
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp + 0x10]
mov eax, dword [ecx + eax + 0xc]
push dword [eax + 0x50]
push edi
call fcn.10029303
push 0
push dword [ebp - 4]
call fcn.100293e0
push eax
push edi
call fcn.100293e0
push 0x21
push edi
call fcn.100293b6
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.10014a45
mov edi, eax
add esp, 0x34
test edi, edi
jne 0x1003b670
cmp dword [ebp + 0x14], eax
push eax
push 2
pop ecx
cmove eax, ecx
push eax
push dword [ebp - 4]
call fcn.100273ae
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x1003b670
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x1003b4df
and dword [esi + 0x5c], edi
mov eax, dword [ecx + 4]
mov edi, dword [ebp - 8]
push 0
push dword [ebp - 0x10]
push dword [eax + 0x20]
push edi
call fcn.1002932d
add esp, 0x10
test eax, eax
jne 0x1003b66d
cmp dword [ebp - 0x20], eax
jne 0x1003b51b
push eax
push dword [ebp - 0x10]
push dword [esi + 0x5c]
push edi
call fcn.1002932d
add esp, 0x10
test eax, eax
jne 0x1003b66d
cmp byte [esi + 0x51], 0
jne 0x1003b66d
mov al, byte [esi + 0x54]
test al, al
js 0x1003b531
movsx eax, al
jmp 0x1003b53a
push dword [ebp - 4]
call fcn.10027df5
pop ecx
push eax
push edi
call fcn.100292b2
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp + 8]
mov byte [esi + 0xa4], al
push esi
call fcn.10014afc
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x1003b670
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.10014afc
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1003b670
push dword [ebp - 0xc]
mov byte [esi + 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 dword [ebp + 8]
push esi
call fcn.10014afc
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1003b670
push dword [ebp - 0xc]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp + 8]
push esi
call fcn.10014afc
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1003b670
mov dword [ebp - 0x18], edi
lea eax, [ebp - 0x20]
push eax
movzx eax, byte [edi + 0x1006bfb4]
push eax
push dword [ebp - 4]
call fcn.10027e42
movzx eax, byte [edi + 0x1006bfb5]
add eax, dword [ebp - 0x20]
push eax
movzx eax, byte [edi + 0x1006bfb4]
push eax
push dword [ebp - 8]
call fcn.1002954a
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x1003b670
mov edi, dword [ebp - 0x18]
add edi, 2
mov dword [ebp - 0x18], edi
cmp edi, 0xa
jl 0x1003b5cf
cmp dword [ebp + 0x14], eax
jne 0x1003b62d
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.1002786f
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x1003b670
push dword [ebp - 8]
call fcn.1002776f
mov edi, eax
pop ecx
test edi, edi
jne 0x1003b670
cmp dword [ebp + 0x14], eax
jne 0x1003b670
mov edi, dword [ebp - 8]
push edi
call fcn.10027df5
push eax
push dword [ebp - 4]
call fcn.100292b2
mov eax, dword [edi + 4]
push 1
push dword [ebp - 0x10]
push dword [eax + 0x20]
push dword [ebp - 4]
call fcn.1002932d
add esp, 0x1c
mov edi, eax
jmp 0x1003b670
push 7
pop edi
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x2c]
push 1
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x30]
push 0xffffffffffffffff
mov dword [esi + 0x68], eax
mov al, byte [ebp + 0xf]
push 0xffffffffffffffff
push dword [ebp - 4]
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.1002932d
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x1003b6c5
push dword [ebx + 4]
call fcn.10027651
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
pop ecx
push esi
call fcn.1003a862
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret