Function at 0x46d4e0
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
cmp byte [esi + 0x51], bl
jne 0x46d50e
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.00470a30
add esp, 0xc
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb4], 1
jle 0x46d51e
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46d4f7
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x46d55b
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x4c2560], 3
je 0x46d542
push str.non_text_filename
jmp 0x46d4f7
push ecx
call fcn.004113c0
mov ecx, dword [esi + 0x3c]
and ecx, 0xfffffffe
add esp, 4
or ecx, 6
mov edx, eax
mov dword [esi + 0x3c], ecx
jmp 0x46d560
mov edx, 0x4ada1c
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
push edi
mov edi, dword [esi + 0x18]
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x68]
mov dword [ebp - 0x30], ecx
mov ecx, dword [esi + 0x6c]
mov dword [ebp - 0x2c], eax
or eax, 0x201
mov dword [esi + 0x20], eax
and dword [esi + 0x20], 0xefffafff
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x34], ecx
mov cl, byte [esi + 0x5a]
or edi, 6
mov dword [esi + 0x18], edi
mov edi, dword [ebp + 0x10]
mov byte [ebp + 0xf], cl
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x24], ecx
and dword [esi + 0x24], 0xfffffffe
mov byte [esi + 0x5a], bl
shl edi, 4
push edx
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 8], eax
mov eax, dword [eax + 4]
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [eax]
push dword [ebp + 8]
movzx eax, byte [eax + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x14]
push esi
mov dword [ebp + 0x10], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x1c], eax
call fcn.00430640
mov edi, eax
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x46d86e
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 4]
mov dword [ebp - 0x10], ebx
cmp dword [ebp + 0x14], edi
je 0x46d65e
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x46d65a
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x46d63e
cmp dword [ebp - 0x14], eax
jl 0x46d65a
jg 0x46d63e
cmp dword [ebp - 0x18], eax
jbe 0x46d65a
mov eax, dword [ebp + 8]
push str.output_file_already_exists
push esi
push eax
mov edi, 1
call fcn.00470a30
add esp, 0xc
jmp 0x46d86b
or dword [esi + 0x18], 8
mov edi, dword [ebp - 8]
push edi
call fcn.0044ea30
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [eax + ecx + 0xc]
push dword [ecx + 0x50]
push ebx
call fcn.004508c0
push 0
push edi
call fcn.00450ae0
push eax
push ebx
call fcn.00450ae0
push 0x21
push ebx
call fcn.00450a90
mov eax, dword [ebp + 8]
push str.BEGIN
push eax
push esi
call fcn.00430550
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x46d86b
cmp dword [ebp + 0x14], eax
push eax
mov ecx, 2
cmove eax, ecx
push eax
push dword [ebp - 8]
call fcn.0044da60
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46d86b
mov edi, dword [ebp - 8]
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x46d6e7
mov dword [esi + 0x60], 0
mov eax, dword [edi + 4]
push 0
push dword [ebp - 0x14]
push dword [eax + 0x24]
push ebx
call fcn.004509b0
add esp, 0x10
test eax, eax
jne 0x46d866
cmp dword [ebp - 0x24], eax
jne 0x46d720
push eax
push dword [ebp - 0x14]
push dword [esi + 0x60]
push ebx
call fcn.004509b0
add esp, 0x10
test eax, eax
jne 0x46d866
cmp byte [esi + 0x53], 0
jne 0x46d866
mov al, byte [esi + 0x56]
test al, al
js 0x46d736
movsx eax, al
jmp 0x46d73f
push edi
call fcn.0044e960
add esp, 4
push eax
push ebx
call fcn.00450840
push dword [ebp - 0xc]
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c]
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 + 0xa8], al
call fcn.00430640
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46d86b
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebx
push esi
call fcn.00430640
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d86b
push dword [ebp - 0xc]
mov byte [esi + 0xa8], 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.00430640
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d86b
push dword [ebp - 0xc]
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.00430640
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d86b
xor ebx, ebx
mov edi, edi
lea eax, [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x4c0b60]
push eax
push dword [ebp - 8]
call fcn.0044e9d0
movzx eax, byte [ebx + 0x4c0b61]
add eax, dword [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x4c0b60]
push eax
push dword [ebp - 0x10]
call fcn.00451280
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46d86b
add ebx, 2
cmp ebx, 0xa
jl 0x46d7d0
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x46d82a
push ebx
push dword [ebp - 8]
call fcn.0044e1b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x46d86b
push ebx
call fcn.0044e000
mov edi, eax
add esp, 4
test edi, edi
jne 0x46d86b
cmp dword [ebp + 0x14], eax
jne 0x46d86b
push ebx
call fcn.0044e960
mov edi, dword [ebp - 8]
push eax
push edi
call fcn.00450840
mov eax, dword [ebx + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x24]
push edi
call fcn.004509b0
add esp, 0x1c
mov edi, eax
jmp 0x46d86b
mov edi, 7
mov ebx, dword [ebp - 4]
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x30]
push 1
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x34]
push 0
mov dword [esi + 0x6c], eax
mov al, byte [ebp + 0xf]
push 0xffffffffffffffff
push dword [ebp - 8]
mov byte [esi + 0xa8], 0
mov byte [esi + 0x5a], al
call fcn.004509b0
add esp, 0x10
mov byte [esi + 0x51], 1
test ebx, ebx
je 0x46d8cb
push dword [ebx + 4]
call fcn.0044de20
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.0046c3b0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret