Function at 0x46d1c0
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 0x46d1ee
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.00470700
add esp, 0xc
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb4], 1
jle 0x46d1fe
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x46d1d7
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x46d23b
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x4c36e8], 3
je 0x46d222
push str.non_text_filename
jmp 0x46d1d7
push ecx
call fcn.00411100
mov ecx, dword [esi + 0x3c]
and ecx, 0xfffffffe
add esp, 4
or ecx, 6
mov edx, eax
mov dword [esi + 0x3c], ecx
jmp 0x46d240
mov edx, 0x4aeafc
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.004302f0
mov edi, eax
mov eax, dword [ebp - 0x14]
add esp, 0x10
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x46d54e
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 0x46d33e
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 0x46d33a
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x46d31e
cmp dword [ebp - 0x14], eax
jl 0x46d33a
jg 0x46d31e
cmp dword [ebp - 0x18], eax
jbe 0x46d33a
mov eax, dword [ebp + 8]
push str.output_file_already_exists
push esi
push eax
mov edi, 1
call fcn.00470700
add esp, 0xc
jmp 0x46d54b
or dword [esi + 0x18], 8
mov edi, dword [ebp - 8]
push edi
call fcn.0044e6e0
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.00450570
push 0
push edi
call fcn.00450790
push eax
push ebx
call fcn.00450790
push 0x21
push ebx
call fcn.00450740
mov eax, dword [ebp + 8]
push str.BEGIN
push eax
push esi
call fcn.00430200
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x46d54b
cmp dword [ebp + 0x14], eax
push eax
mov ecx, 2
cmove eax, ecx
push eax
push dword [ebp - 8]
call fcn.0044d710
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x46d54b
mov edi, dword [ebp - 8]
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x46d3c7
mov dword [esi + 0x60], 0
mov eax, dword [edi + 4]
push 0
push dword [ebp - 0x14]
push dword [eax + 0x24]
push ebx
call fcn.00450660
add esp, 0x10
test eax, eax
jne 0x46d546
cmp dword [ebp - 0x24], eax
jne 0x46d400
push eax
push dword [ebp - 0x14]
push dword [esi + 0x60]
push ebx
call fcn.00450660
add esp, 0x10
test eax, eax
jne 0x46d546
cmp byte [esi + 0x53], 0
jne 0x46d546
mov al, byte [esi + 0x56]
test al, al
js 0x46d416
movsx eax, al
jmp 0x46d41f
push edi
call fcn.0044e610
add esp, 4
push eax
push ebx
call fcn.004504f0
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.004302f0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46d54b
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebx
push esi
call fcn.004302f0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d54b
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.004302f0
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d54b
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.004302f0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x46d54b
xor ebx, ebx
mov edi, edi
lea eax, [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x4c1ce8]
push eax
push dword [ebp - 8]
call fcn.0044e680
movzx eax, byte [ebx + 0x4c1ce9]
add eax, dword [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x4c1ce8]
push eax
push dword [ebp - 0x10]
call fcn.00450f30
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x46d54b
add ebx, 2
cmp ebx, 0xa
jl 0x46d4b0
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x46d50a
push ebx
push dword [ebp - 8]
call fcn.0044de60
mov edi, eax
add esp, 8
test edi, edi
jne 0x46d54b
push ebx
call fcn.0044dcb0
mov edi, eax
add esp, 4
test edi, edi
jne 0x46d54b
cmp dword [ebp + 0x14], eax
jne 0x46d54b
push ebx
call fcn.0044e610
mov edi, dword [ebp - 8]
push eax
push edi
call fcn.004504f0
mov eax, dword [ebx + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x24]
push edi
call fcn.00450660
add esp, 0x1c
mov edi, eax
jmp 0x46d54b
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.00450660
add esp, 0x10
mov byte [esi + 0x51], 1
test ebx, ebx
je 0x46d5ab
push dword [ebx + 4]
call fcn.0044dad0
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.0046c090
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret