Function at 0x4afe90
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x30
push ebp
push esi
mov esi, dword [esp + 0x40]
xor ebp, ebp
cmp byte [esi + 0x4f], 0
jne 0x4afebe
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [esp + 0x44]
call fcn.004b34e0
add esp, 0xc
mov eax, 1
pop esi
pop ebp
add esp, 0x30
ret
cmp dword [esi + 0xb0], 1
jle 0x4afece
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4afea6
mov ecx, dword [esp + 0x48]
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x4aff0d
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x4e8600], 3
je 0x4afef4
push str.non_text_filename
jmp 0x4afea6
push ecx
call fcn.0044f210
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x4aff12
mov edx, 0x4ede96
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0x24]
push ebx
mov ebx, dword [esi + 0x18]
mov dword [esp + 0x30], eax
or eax, 0x201
mov dword [esp + 0x2c], ebx
or ebx, 6
mov dword [esi + 0x18], ebx
mov ebx, dword [esp + 0x48]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
and dword [esi + 0x20], 0xefffafff
mov dword [esp + 0x24], ecx
mov cl, byte [esi + 0x58]
shl ebx, 4
mov byte [esp + 0x44], cl
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x24], ecx
and dword [esi + 0x24], 0xfffffffe
mov byte [esi + 0x58], 0
mov ecx, dword [ebx + eax]
mov dword [esp + 0x48], ebx
mov ebx, dword [ebx + eax + 4]
push edi
mov edi, dword [esi + 0x64]
push edx
mov eax, dword [ebx + 4]
push str.ATTACH__Q_AS_vacuum_db
push dword [esp + 0x4c]
mov dword [esp + 0x44], edi
mov eax, dword [eax]
mov edi, dword [esi + 0x68]
push esi
mov dword [esp + 0x4c], edi
movzx eax, byte [eax + 0xc]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], eax
call fcn.0045cd60
mov edi, eax
add esp, 0x10
mov eax, dword [esp + 0x20]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x4b0245
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
mov ebp, dword [eax + 4]
cmp dword [esp + 0x50], edi
je 0x4b0025
mov eax, dword [ebp + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], edi
mov ecx, dword [eax]
test ecx, ecx
je 0x4b0021
lea edx, [esp + 0x20]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4b0004
cmp dword [esp + 0x24], eax
jl 0x4b0021
jg 0x4b0004
cmp dword [esp + 0x20], eax
jbe 0x4b0021
mov eax, dword [esp + 0x44]
mov edi, 1
push str.output_file_already_exists
push esi
push eax
call fcn.004b34e0
add esp, 0xc
jmp 0x4b0241
or dword [esi + 0x18], 8
push ebx
call fcn.0048c250
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x50]
mov ecx, dword [eax + ecx + 0xc]
push dword [ecx + 0x50]
push ebp
call fcn.0048e2c0
push 0
push ebx
call fcn.0048e4c0
push eax
push ebp
call fcn.0048e4c0
push 0x21
push ebp
call fcn.0048e470
mov eax, dword [esp + 0x68]
push str.BEGIN
push eax
push esi
call fcn.0045cc80
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x4b0241
push eax
mov eax, dword [esp + 0x54]
neg eax
sbb eax, eax
and eax, 0xfffffffe
add eax, 2
push eax
push ebx
call fcn.0048b0c0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x4b0241
mov eax, dword [ebx + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x4b00a8
mov dword [esi + 0x5c], edi
mov eax, dword [ebx + 4]
mov edi, dword [esp + 0x20]
push 0
push edi
push dword [eax + 0x20]
push ebp
call fcn.0048e3b0
add esp, 0x10
test eax, eax
jne 0x4b0236
cmp dword [esp + 0x2c], eax
jne 0x4b00e2
push eax
push edi
push dword [esi + 0x5c]
push ebp
call fcn.0048e3b0
add esp, 0x10
test eax, eax
jne 0x4b0236
cmp byte [esi + 0x51], 0
jne 0x4b0236
mov al, byte [esi + 0x54]
test al, al
js 0x4b00f8
movsx eax, al
jmp 0x4b0101
push ebx
call fcn.0048c170
add esp, 4
push eax
push ebp
call fcn.0048e250
push dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [esp + 0x54]
mov byte [esi + 0xa4], al
push esi
call fcn.0045cd60
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4b0241
push dword [esp + 0x14]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [esp + 0x4c]
push esi
call fcn.0045cd60
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b0241
push dword [esp + 0x14]
mov byte [esi + 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 dword [esp + 0x4c]
push esi
call fcn.0045cd60
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b0241
push dword [esp + 0x14]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [esp + 0x4c]
push esi
call fcn.0045cd60
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b0241
xor ebx, ebx
mov edi, edi
lea eax, [esp + 0x2c]
push eax
movzx eax, byte [ebx + 0x4e8ec4]
push eax
push dword [esp + 0x20]
call fcn.0048c1f0
movzx eax, byte [ebx + 0x4e8ec5]
add eax, dword [esp + 0x38]
push eax
movzx eax, byte [ebx + 0x4e8ec4]
push eax
push ebp
call fcn.0048e6f0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x4b023d
add ebx, 2
cmp ebx, 0xa
jl 0x4b01a0
mov ebx, dword [esp + 0x18]
cmp dword [esp + 0x50], eax
jne 0x4b01fb
push ebp
push ebx
call fcn.0048b860
mov edi, eax
add esp, 8
test edi, edi
jne 0x4b0241
push ebp
call fcn.0048b6b0
mov edi, eax
add esp, 4
test edi, edi
jne 0x4b0241
cmp dword [esp + 0x50], eax
jne 0x4b0241
push ebp
call fcn.0048c170
push eax
push ebx
call fcn.0048e250
mov eax, dword [ebp + 4]
push 1
push dword [esp + 0x30]
push dword [eax + 0x20]
push ebx
call fcn.0048e3b0
add esp, 0x1c
mov edi, eax
jmp 0x4b0241
mov edi, 7
jmp 0x4b0241
mov ebx, dword [esp + 0x18]
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x28]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x38]
push 1
mov dword [esi + 0x64], eax
mov eax, dword [esp + 0x40]
push 0xffffffffffffffff
mov dword [esi + 0x68], eax
mov al, byte [esp + 0x50]
push 0xffffffffffffffff
push ebx
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.0048e3b0
add esp, 0x10
mov byte [esi + 0x4f], 1
test ebp, ebp
je 0x4b02a6
push dword [ebp + 4]
call fcn.0048b4e0
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push esi
call fcn.004aec70
add esp, 4
mov eax, edi
pop edi
pop ebx
pop esi
pop ebp
add esp, 0x30
ret