Function at 0x4af510
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 0x4af53e
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.004b2900
add esp, 0xc
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb4], 1
jle 0x4af54e
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4af527
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x4af58b
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x54a210], 3
je 0x4af572
push str.non_text_filename
jmp 0x4af527
push ecx
call fcn.00453280
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x4af590
mov edx, 0x564cf6
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x20]
push edi
mov edi, dword [esi + 0x18]
mov dword [ebp - 0x2c], eax
or eax, 0x201
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x68]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
and dword [esi + 0x20], 0xefffafff
mov dword [ebp - 0x28], edi
or edi, 6
mov dword [esi + 0x18], edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x30], ecx
mov ecx, dword [esi + 0x6c]
mov dword [ebp - 0x34], ecx
mov cl, byte [esi + 0x5a]
shl edi, 4
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
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 8], eax
push edx
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [eax + 4]
push dword [ebp + 8]
mov dword [ebp + 0x10], edi
push esi
mov eax, dword [eax]
mov dword [ebp - 0xc], ecx
movzx eax, byte [eax + 0xc]
mov dword [ebp - 0x24], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.00471000
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x4af89e
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 0x4af68c
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4af688
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4af66c
cmp dword [ebp - 0x14], eax
jl 0x4af688
jg 0x4af66c
cmp dword [ebp - 0x18], eax
jbe 0x4af688
mov eax, dword [ebp + 8]
mov edi, 1
push str.output_file_already_exists
push esi
push eax
call fcn.004b2900
add esp, 0xc
jmp 0x4af89b
or dword [esi + 0x18], 8
mov edi, dword [ebp - 8]
push edi
call fcn.004911f0
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.00493090
push 0
push edi
call fcn.004932b0
push eax
push ebx
call fcn.004932b0
push 0x21
push ebx
call fcn.00493260
mov eax, dword [ebp + 8]
push str.BEGIN
push eax
push esi
call fcn.00470f30
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x4af89b
push eax
mov eax, dword [ebp + 0x14]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
push eax
push dword [ebp - 8]
call fcn.00490220
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4af89b
mov edi, dword [ebp - 8]
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4af717
mov dword [esi + 0x60], 0
mov eax, dword [edi + 4]
push 0
push dword [ebp - 0x14]
push dword [eax + 0x24]
push ebx
call fcn.00493180
add esp, 0x10
test eax, eax
jne 0x4af896
cmp dword [ebp - 0x24], eax
jne 0x4af750
push eax
push dword [ebp - 0x14]
push dword [esi + 0x60]
push ebx
call fcn.00493180
add esp, 0x10
test eax, eax
jne 0x4af896
cmp byte [esi + 0x53], 0
jne 0x4af896
mov al, byte [esi + 0x56]
test al, al
js 0x4af766
movsx eax, al
jmp 0x4af76f
push edi
call fcn.00491120
add esp, 4
push eax
push ebx
call fcn.00493010
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.00471000
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4af89b
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebx
push esi
call fcn.00471000
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4af89b
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.00471000
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4af89b
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.00471000
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4af89b
xor ebx, ebx
mov edi, edi
lea eax, [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x54a2f8]
push eax
push dword [ebp - 8]
call fcn.00491190
movzx eax, byte [ebx + 0x54a2f9]
add eax, dword [ebp - 0x24]
push eax
movzx eax, byte [ebx + 0x54a2f8]
push eax
push dword [ebp - 0x10]
call fcn.004938d0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4af89b
add ebx, 2
cmp ebx, 0xa
jl 0x4af800
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0x14], eax
jne 0x4af85a
push ebx
push dword [ebp - 8]
call fcn.00490980
mov edi, eax
add esp, 8
test edi, edi
jne 0x4af89b
push ebx
call fcn.004907d0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4af89b
cmp dword [ebp + 0x14], eax
jne 0x4af89b
push ebx
call fcn.00491120
mov edi, dword [ebp - 8]
push eax
push edi
call fcn.00493010
mov eax, dword [ebx + 4]
push 1
push dword [ebp - 0x14]
push dword [eax + 0x24]
push edi
call fcn.00493180
add esp, 0x1c
mov edi, eax
jmp 0x4af89b
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.00493180
add esp, 0x10
mov byte [esi + 0x51], 1
test ebx, ebx
je 0x4af8fb
push dword [ebx + 4]
call fcn.004905f0
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.004ae3d0
add esp, 4
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret