Function at 0x4a8340
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x14], 0
mov al, byte [esi + 0x4f]
test al, al
jne 0x4a8360
push str.cannot_VACUUM_from_within_a_transaction
jmp 0x4a83a6
cmp dword [esi + 0xb0], 1
jle 0x4a8386
mov ecx, dword [ebp + 8]
push str.cannot_VACUUM___SQL_statements_in_progress
push esi
push ecx
call fcn.004a4810
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 0x14]
mov edx, dword [esi + 0x3c]
test edi, edi
mov dword [ebp - 0x10], edx
je 0x4a83d7
push edi
call fcn.00483c10
add esp, 4
cmp eax, 3
je 0x4a83be
push str.non_text_filename
mov eax, dword [ebp + 8]
push esi
push eax
call fcn.004a4810
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call fcn.00483b40
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edi, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x4a83dc
mov edi, 0x8b36e4
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [esi + 0x64]
mov dword [ebp - 0x38], eax
mov edx, dword [esi + 0x18]
or eax, 0x201
mov dword [ebp - 0x24], ebx
mov ebx, dword [esi + 0x68]
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], ecx
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x28], ebx
mov bl, byte [esi + 0x58]
and eax, 0xefffaf7f
mov byte [ebp + 0xf], bl
mov dword [esi + 0x20], eax
mov ebx, dword [esi + 0x24]
mov dword [ebp - 0x20], edx
or edx, 6
mov dword [esi + 0x24], ebx
mov ebx, dword [ebp + 0x10]
mov dword [esi + 0x18], edx
mov edx, dword [esi + 0x10]
shl ebx, 4
mov dword [ebp - 0x34], ecx
mov byte [esi + 0x58], 0
mov ecx, dword [ebx + edx]
lea eax, [ebx + edx]
mov dword [ebp - 0x1c], ecx
mov eax, dword [eax + 4]
push eax
mov dword [ebp - 4], eax
call fcn.00475900
push eax
call fcn.0047fe00
mov edx, dword [esi + 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 8]
push edi
push str.ATTACH__Q_AS_vacuum_db
push eax
push esi
mov dword [ebp - 0xc], edx
call fcn.004a8b70
mov ecx, dword [ebp - 0x10]
mov edi, eax
add esp, 0x18
mov dword [esi + 0x3c], ecx
test edi, edi
jne 0x4a875e
mov eax, dword [ebp - 0xc]
mov ecx, dword [esi + 0x10]
shl eax, 4
add eax, ecx
mov dword [ebp - 0x14], eax
mov edi, dword [eax + 4]
mov eax, dword [ebp + 0x14]
test eax, eax
mov dword [ebp - 8], edi
je 0x4a84f2
push edi
call fcn.00475900
push eax
call fcn.00477ff0
xor ecx, ecx
add esp, 8
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
cmp dword [eax], ecx
je 0x4a84ea
lea edx, [ebp - 0x30]
push edx
push eax
call fcn.00477710
add esp, 8
test eax, eax
jne 0x4a84ce
mov eax, dword [ebp - 0x2c]
test eax, eax
jl 0x4a84ea
jg 0x4a84ce
mov eax, dword [ebp - 0x30]
test eax, eax
jbe 0x4a84ea
mov eax, dword [ebp + 8]
push str.output_file_already_exists
push esi
push eax
mov edi, 1
call fcn.004a4810
add esp, 0xc
jmp 0x4a875e
mov eax, dword [esi + 0x18]
or al, 8
mov dword [esi + 0x18], eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.0047fe40
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0x5c]
add esp, 4
test eax, eax
je 0x4a852b
mov ecx, dword [ebp + 0x10]
lea edx, [ebp + 0x10]
lea eax, [ebp - 0x2c]
push edx
push eax
push ecx
push esi
call fcn.00524c90
mov eax, dword [ebp + 0x10]
add esp, 0x10
test eax, eax
je 0x4a852b
mov dword [esi + 0x5c], 0
mov edx, dword [esi + 0x10]
mov eax, dword [ebx + edx + 0xc]
mov ecx, dword [eax + 0x50]
push ecx
push edi
call fcn.004a4840
mov edx, dword [ebp - 4]
push 0
push edx
call fcn.004a87d0
push eax
push edi
call fcn.004a87d0
push 0x21
push edi
call fcn.0049f510
mov eax, dword [ebp + 8]
push str.BEGIN
push eax
push esi
call fcn.004a8a90
mov edi, eax
add esp, 0x2c
test edi, edi
jne 0x4a875e
mov ecx, dword [ebp + 0x14]
mov ebx, dword [ebp - 4]
neg ecx
sbb ecx, ecx
push eax
and ecx, 0xfffffffe
add ecx, 2
push ecx
push ebx
call fcn.0047a540
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4a875e
push ebx
call fcn.00475900
push eax
call fcn.00478010
add esp, 8
cmp eax, 5
jne 0x4a85ae
mov dword [esi + 0x5c], edi
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 4]
push 0
push ebx
push edx
call fcn.00479d60
mov edi, dword [ebp - 8]
add esp, 4
push eax
push edi
call fcn.0047fb00
add esp, 0x10
test eax, eax
jne 0x4a8759
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x4a85f4
mov eax, dword [esi + 0x5c]
push 0
push ebx
push eax
push edi
call fcn.0047fb00
add esp, 0x10
test eax, eax
jne 0x4a8759
mov al, byte [esi + 0x51]
test al, al
jne 0x4a8759
mov al, byte [esi + 0x54]
test al, al
jl 0x4a860b
movsx eax, al
jmp 0x4a8617
mov ecx, dword [ebp - 4]
push ecx
call fcn.004a88f0
add esp, 4
push eax
push edi
call fcn.004a8880
mov ebx, dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
mov dl, byte [ebp - 0xc]
push ebx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push eax
push esi
mov byte [esi + 0xa4], dl
call fcn.004a8b70
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4a875e
mov ecx, dword [ebp + 8]
push ebx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ecx
push esi
call fcn.004a8b70
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4a875e
mov edx, dword [ebp + 8]
push ebx
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push edx
push esi
mov byte [esi + 0xa4], al
call fcn.004a8b70
mov ecx, dword [esi + 0x18]
mov edi, eax
add esp, 0x10
and ecx, 0xfffffffb
test edi, edi
mov dword [esi + 0x18], ecx
jne 0x4a875e
mov eax, dword [ebp + 8]
push ebx
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push eax
push esi
call fcn.004a8b70
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4a875e
xor ebx, ebx
mov eax, dword [ebp - 4]
xor edx, edx
mov dl, byte [ebx + 0x8ad10c]
lea ecx, [ebp + 8]
push ecx
push edx
push eax
call fcn.00492f40
mov edx, dword [ebp + 8]
xor ecx, ecx
mov cl, byte [ebx + 0x8ad10d]
mov eax, dword [ebp - 8]
add ecx, edx
xor edx, edx
mov dl, byte [ebx + 0x8ad10c]
push ecx
push edx
push eax
call fcn.0047f9e0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4a875e
add ebx, 2
cmp ebx, 0xa
jl 0x4a86af
mov eax, dword [ebp + 0x14]
mov ebx, dword [ebp - 8]
test eax, eax
jne 0x4a8713
mov ecx, dword [ebp - 4]
push ebx
push ecx
call fcn.004a8940
mov edi, eax
add esp, 8
test edi, edi
jne 0x4a875e
push ebx
call fcn.004a4870
mov edi, eax
add esp, 4
test edi, edi
jne 0x4a875e
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x4a875e
push ebx
call fcn.004a88f0
mov edi, dword [ebp - 4]
push eax
push edi
call fcn.004a8880
mov edx, dword [ebp - 0x10]
add esp, 0xc
push 1
push edx
push ebx
call fcn.00479d60
add esp, 4
push eax
push edi
call fcn.0047fb00
add esp, 0x10
mov edi, eax
jmp 0x4a875e
mov edi, 7
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x20], ecx
mov ecx, dword [ebp - 0x28]
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 4]
push 1
mov dword [esi + 0x24], edx
mov dl, byte [ebp + 0xf]
push 0xffffffffffffffff
push 0xffffffffffffffff
push eax
mov byte [esi + 0xa4], 0
mov dword [esi + 0x68], ecx
mov byte [esi + 0x58], dl
call fcn.0047fb00
mov ebx, dword [ebp - 0x14]
add esp, 0x10
test ebx, ebx
mov byte [esi + 0x4f], 1
je 0x4a87ba
mov ecx, dword [ebx + 4]
push ecx
call fcn.00481460
add esp, 4
xor eax, eax
mov dword [ebx + 4], eax
mov dword [ebx + 0xc], eax
push esi
call fcn.004a02c0
add esp, 4
mov eax, edi
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret