Function at 0x4528a7
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 0x4528cd
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0040b57b
xor eax, eax
pop ecx
inc eax
jmp 0x452ccb
cmp dword [edi + 0xb0], 1
jle 0x4528dd
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4528bf
mov ecx, dword [esp + 0x54]
mov eax, dword [edi + 0x3c]
mov dword [esp + 0x30], eax
test ecx, ecx
je 0x45291c
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x4a7af0], 3
je 0x452905
push str.non_text_filename
mov ecx, ebx
jmp 0x4528bf
mov dl, 1
call fcn.004217ae
mov ecx, dword [edi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [edi + 0x3c], ecx
jmp 0x452921
mov edx, 0x4b41c0
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.004527a3
mov esi, eax
add esp, 0x10
mov eax, dword [esp + 0x30]
mov dword [edi + 0x3c], eax
test esi, esi
jne 0x452c69
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 0x452a2a
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 0x452a23
lea edx, [esp + 0x20]
push edx
push eax
call dword [ecx + 0x18]
pop ecx
pop ecx
test eax, eax
jne 0x452a0c
cmp dword [esp + 0x24], eax
jl 0x452a23
jg 0x452a0c
cmp dword [esp + 0x20], eax
jbe 0x452a23
xor esi, esi
mov edx, edi
push str.output_file_already_exists
mov ecx, ebx
inc esi
call fcn.0040b57b
pop ecx
jmp 0x452c69
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.00413d33
mov ecx, dword [esp + 0x18]
xor edx, edx
call fcn.00419b01
mov edx, eax
mov ecx, esi
call fcn.00419b01
mov ecx, dword [esi + 4]
push 0x21
pop edx
mov ecx, dword [ecx]
call fcn.00413da7
push str.BEGIN
mov edx, ebx
mov ecx, edi
call fcn.004526e7
mov esi, eax
pop ecx
test esi, esi
jne 0x452c69
mov ecx, dword [esp + 0x18]
xor edx, edx
cmp dword [esp + 0x54], edx
push eax
push 2
pop eax
cmove edx, eax
call fcn.00419fa7
mov esi, eax
pop ecx
test esi, esi
jne 0x452c69
mov ecx, dword [esp + 0x18]
mov edx, dword [ecx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x452ac0
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.00419b4e
pop ecx
pop ecx
test eax, eax
jne 0x452c66
cmp byte [esp + 0x16], al
jne 0x452afd
mov edx, dword [edi + 0x5c]
mov ecx, esi
push eax
push dword [esp + 0x24]
call fcn.00419b4e
pop ecx
pop ecx
test eax, eax
jne 0x452c66
cmp byte [edi + 0x51], 0
jne 0x452c66
mov al, byte [edi + 0x54]
test al, al
js 0x452b13
movsx edx, al
jmp 0x452b28
mov eax, dword [esp + 0x18]
xor edx, edx
mov eax, dword [eax + 4]
cmp byte [eax + 0x11], dl
je 0x452b28
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, esi
call fcn.00419c04
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.004527a3
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x452c69
push dword [esp + 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push edi
call fcn.004527a3
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x452c69
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.004527a3
and dword [edi + 0x18], 0xfffffffb
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x452c69
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.004527a3
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x452c69
mov ebx, dword [esp + 0x30]
mov dword [esp + 0x1c], eax
movzx esi, byte [eax + 0x4a1d44]
lea eax, [esp + 0x30]
mov ecx, dword [esp + 0x18]
mov edx, esi
push eax
call fcn.0041f38a
mov eax, dword [esp + 0x20]
mov edx, esi
pop ecx
mov ecx, ebx
movzx eax, byte [eax + 0x4a1d45]
add eax, dword [esp + 0x30]
push eax
call fcn.0041f3b4
mov esi, eax
pop ecx
test esi, esi
jne 0x452c69
mov eax, dword [esp + 0x1c]
add eax, 2
mov dword [esp + 0x1c], eax
cmp eax, 0xa
jl 0x452bbf
cmp dword [esp + 0x54], esi
jne 0x452c1e
mov ecx, dword [esp + 0x18]
mov edx, ebx
call fcn.00420a02
mov esi, eax
test esi, esi
jne 0x452c69
mov ecx, ebx
call fcn.0041a959
mov esi, eax
test esi, esi
jne 0x452c69
cmp dword [esp + 0x54], eax
jne 0x452c69
mov eax, dword [ebx + 4]
xor edx, edx
cmp byte [eax + 0x11], dl
je 0x452c42
cmp byte [eax + 0x12], dl
setne dl
inc edx
mov ecx, dword [esp + 0x18]
call fcn.00419c04
mov eax, dword [ebx + 4]
mov ecx, dword [esp + 0x18]
push 1
push dword [esp + 0x24]
mov edx, dword [eax + 0x20]
call fcn.00419b4e
pop ecx
pop ecx
mov esi, eax
jmp 0x452c69
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.00419b4e
mov byte [edi + 0x4f], 1
pop ecx
pop ecx
test ebp, ebp
je 0x452cc2
mov ecx, dword [ebp + 4]
call fcn.00419a91
mov dword [ebp + 4], ebx
mov dword [ebp + 0xc], ebx
mov ecx, edi
call fcn.00438ecb
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret