Function at 0x459567
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x3c
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov ebx, ecx
cmp byte [edi + 0x4f], 0
jne 0x45958d
push str.cannot_VACUUM_from_within_a_transaction
call fcn.00412e8d
xor eax, eax
pop ecx
inc eax
jmp 0x45998b
cmp dword [edi + 0xb0], 1
jle 0x45959d
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x45957f
mov ecx, dword [esp + 0x54]
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x30], eax
test ecx, ecx
je 0x4595dc
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x4cfc30], 3
je 0x4595c5
push str.non_text_filename
mov ecx, ebx
jmp 0x45957f
push ecx
call fcn.0042c759
pop ecx
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x4595e1
mov edx, 0x4e36f8
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x20]
mov esi, dword [edi + 0x24]
mov dword [esp + 0x3c], eax
or eax, 6
mov dword [edi + 0x18], eax
mov dword [esp + 0x38], esi
mov esi, dword [edi + 0x64]
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x34]
mov cl, byte [edi + 0x58]
and eax, 0xefffaf7f
mov dword [esp + 0x40], esi
or eax, 0x201
mov esi, dword [edi + 0x68]
mov dword [edi + 0x20], eax
mov eax, dword [edi + 0x10]
mov dword [esp + 0x44], esi
mov esi, dword [esp + 0x38]
mov dword [edi + 0x24], esi
mov esi, dword [esp + 0x50]
shl esi, 4
mov byte [edi + 0x58], 0
mov byte [esp + 0x17], 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 + 0x60], esi
mov dword [esp + 0x2c], ecx
mov eax, dword [eax]
mov al, byte [eax + 0xc]
mov byte [esp + 0x26], al
mov eax, dword [edi + 0x14]
mov dword [esp + 0x3c], eax
call fcn.00459463
mov esi, eax
add esp, 0x10
mov eax, dword [esp + 0x30]
mov dword [edi + 0x3c], eax
test esi, esi
jne 0x459929
mov ebp, dword [esp + 0x2c]
mov edx, dword [edi + 0x10]
shl ebp, 4
add ebp, edx
cmp dword [esp + 0x54], 0
mov esi, dword [ebp + 4]
mov dword [esp + 0x30], esi
je 0x4596ea
mov eax, dword [esi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [esp + 0x20], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4596e3
lea edx, [esp + 0x20]
push edx
push eax
call dword [ecx + 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x4596cc
cmp dword [esp + 0x24], eax
jl 0x4596e3
jg 0x4596cc
cmp dword [esp + 0x20], eax
jbe 0x4596e3
xor esi, esi
mov edx, edi
push str.output_file_already_exists
mov ecx, ebx
inc esi
call fcn.00412e8d
pop ecx
jmp 0x459929
or dword [edi + 0x18], 8
mov edx, dword [edi + 0x10]
mov eax, dword [esp + 0x18]
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x20]
sub ecx, dword [eax + 0x24]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x20], ecx
mov ecx, dword [esi + 4]
mov edx, dword [eax + edx + 0xc]
mov ecx, dword [ecx]
mov edx, dword [edx + 0x50]
call fcn.0041b4c1
mov ecx, dword [esp + 0x18]
xor edx, edx
call fcn.00421248
mov edx, eax
mov ecx, esi
call fcn.00421248
mov ecx, dword [esi + 4]
push 0x21
pop edx
mov ecx, dword [ecx]
call fcn.0041b535
push str.BEGIN
mov edx, ebx
mov ecx, edi
call fcn.004593a7
mov esi, eax
pop ecx
test esi, esi
jne 0x459929
mov ecx, dword [esp + 0x18]
xor edx, edx
cmp dword [esp + 0x54], edx
push eax
push 2
pop eax
cmove edx, eax
call fcn.00421707
mov esi, eax
pop ecx
test esi, esi
jne 0x459929
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x459780
and dword [edi + 0x5c], esi
mov edx, dword [ecx + 4]
mov esi, dword [esp + 0x30]
mov ecx, esi
mov edx, dword [edx + 0x20]
push 0
push dword [esp + 0x24]
call fcn.00421295
pop ecx
pop ecx
test eax, eax
jne 0x459926
cmp byte [esp + 0x16], al
jne 0x4597bd
mov edx, dword [edi + 0x5c]
mov ecx, esi
push eax
push dword [esp + 0x24]
call fcn.00421295
pop ecx
pop ecx
test eax, eax
jne 0x459926
cmp byte [edi + 0x51], 0
jne 0x459926
mov al, byte [edi + 0x54]
test al, al
js 0x4597d3
movsx edx, al
jmp 0x4597e8
mov eax, dword [esp + 0x18]
xor edx, edx
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], dl
je 0x4597e8
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, esi
call fcn.0042134b
push dword [esp + 0x1c]
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.00459463
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x459929
push dword [esp + 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push edi
call fcn.00459463
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x459929
push dword [esp + 0x1c]
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.00459463
and dword [edi + 0x18], 0xfffffffb
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x459929
push dword [esp + 0x1c]
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.00459463
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x459929
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x1c], eax
movzx esi, byte [eax + 0x4ca5a4]
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov edx, esi
push eax
call fcn.0042690e
mov eax, dword [esp + 0x20]
mov edx, esi
pop ecx
mov ecx, ebx
movzx eax, byte [eax + 0x4ca5a5]
add eax, dword [esp + 0x30]
push eax
call fcn.00426938
mov esi, eax
pop ecx
test esi, esi
jne 0x459929
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x1c], eax
cmp eax, 0xa
jl 0x45987f
cmp dword [esp + 0x54], esi
jne 0x4598de
mov ecx, dword [esp + 0x18]
mov edx, ebx
call fcn.00427fad
mov esi, eax
test esi, esi
jne 0x459929
mov ecx, ebx
call fcn.00422092
mov esi, eax
test esi, esi
jne 0x459929
cmp dword [esp + 0x54], eax
jne 0x459929
mov eax, dword [ebx + 4]
xor edx, edx
cmp byte [eax + 0x11], dl
je 0x459902
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, dword [esp + 0x18]
call fcn.0042134b
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x18]
push 1
push dword [esp + 0x24]
mov edx, dword [eax + 0x20]
call fcn.00421295
pop ecx
pop ecx
mov esi, eax
jmp 0x459929
push 7
pop esi
mov eax, dword [esp + 0x3c]
or edx, 0xffffffff
mov ecx, dword [esp + 0x18]
xor ebx, ebx
mov dword [edi + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [edi + 0x20], eax
mov eax, dword [esp + 0x38]
mov dword [edi + 0x24], eax
mov eax, dword [esp + 0x40]
mov dword [edi + 0x64], eax
mov eax, dword [esp + 0x44]
mov dword [edi + 0x68], eax
mov al, byte [esp + 0x17]
push 1
push edx
mov byte [edi + 0xa4], bl
mov byte [edi + 0x58], al
call fcn.00421295
mov byte [edi + 0x4f], 1
pop ecx
pop ecx
test ebp, ebp
je 0x459982
mov ecx, dword [ebp + 4]
call fcn.004211cb
mov dword [ebp + 4], ebx
mov dword [ebp + 0xc], ebx
mov ecx, edi
call fcn.0043fffa
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret