Function at 0x100495f6
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
cmp byte [esi + 0x55], bl
jne 0x10049621
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [ebp + 8]
call fcn.1004fbf8
xor eax, eax
add esp, 0xc
inc eax
jmp 0x100499f2
cmp dword [esi + 0xbc], 1
jle 0x10049631
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x1004960d
mov ecx, dword [ebp + 0x14]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x1004966c
movzx eax, word [ecx + 0x10]
and eax, 0x3f
cmp byte [eax + 0x100726a0], 3
je 0x10049655
push str.non_text_filename
jmp 0x1004960d
push ecx
call fcn.1004fbf8
pop ecx
mov ecx, dword [esi + 0x3c]
mov edx, eax
and ecx, 0xfffffffe
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x10049671
mov edx, 0x10077c58
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x18]
push edi
mov edi, dword [esi + 0x24]
mov dword [ebp - 0x24], edi
mov edi, dword [esi + 0x68]
mov dword [ebp - 0x30], edi
mov edi, dword [esi + 0x6c]
mov dword [ebp - 0x34], edi
mov edi, dword [esi + 0x70]
mov dword [ebp - 0x38], edi
mov edi, dword [esi + 0x74]
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x20], ecx
and edi, 0xfffffffe
mov cl, byte [esi + 0x5e]
mov dword [esi + 0x24], edi
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
or eax, 6
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x18], eax
and ecx, 0xefffafff
mov eax, dword [esi + 0x10]
or ecx, 0x201
shl edi, 4
mov dword [esi + 0x20], ecx
mov byte [esi + 0x5e], bl
mov dword [ebp + 0x10], edi
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], ecx
mov eax, dword [eax + 4]
push dword [eax]
call fcn.1004fbf8
push edx
push str.ATTACH__Q_AS_vacuum_db
push dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x14]
push esi
mov dword [ebp - 0x1c], eax
call fcn.1004fbf8
mov edi, eax
add esp, 0x14
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x10049987
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [ebp - 8], eax
mov ebx, dword [eax + 4]
cmp dword [ebp + 0x14], edi
je 0x10049775
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x18], xmm0
cmp dword [eax], edi
je 0x10049771
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.1004fbf8
pop ecx
pop ecx
test eax, eax
jne 0x10049758
cmp dword [ebp - 0x14], eax
jl 0x10049771
jg 0x10049758
cmp dword [ebp - 0x18], eax
jbe 0x10049771
push str.output_file_already_exists
push esi
push dword [ebp + 8]
xor edi, edi
inc edi
call fcn.1004fbf8
add esp, 0xc
jmp 0x10049984
or dword [esi + 0x18], 8
mov edi, dword [ebp - 0xc]
push edi
call fcn.1004fbf8
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.1004fbf8
push 0
push edi
call fcn.1004fbf8
push eax
push ebx
call fcn.1004fbf8
push 0x21
push ebx
call fcn.1004fbf8
push str.BEGIN
push dword [ebp + 8]
push esi
call fcn.1004fbf8
mov edi, eax
add esp, 0x30
test edi, edi
jne 0x10049984
cmp dword [ebp + 0x14], eax
push eax
push 2
pop ecx
cmove eax, ecx
push eax
push dword [ebp - 0xc]
call fcn.1004fbf8
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x10049984
mov edi, dword [ebp - 0xc]
mov ecx, dword [edi + 4]
mov eax, dword [ecx]
cmp byte [eax + 5], 5
jne 0x10049801
cmp dword [ebp + 0x14], 0
jne 0x10049801
and dword [esi + 0x64], 0
mov ecx, dword [edi + 4]
push 0
push dword [ebp - 0x14]
push dword [ecx + 0x24]
push ebx
call fcn.1004fbf8
add esp, 0x10
test eax, eax
jne 0x10049981
cmp dword [ebp - 0x28], eax
jne 0x10049837
push eax
push dword [ebp - 0x14]
push dword [esi + 0x64]
push ebx
call fcn.1004fbf8
add esp, 0x10
test eax, eax
jne 0x10049981
cmp byte [esi + 0x57], 0
jne 0x10049981
mov al, byte [esi + 0x5a]
test al, al
js 0x1004984d
movsx eax, al
jmp 0x10049854
push edi
call fcn.1004fbf8
pop ecx
push eax
push ebx
call fcn.1004fbf8
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp + 8]
mov byte [esi + 0xb0], al
push esi
call fcn.1004fbf8
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x10049984
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push dword [ebp + 8]
push esi
call fcn.1004fbf8
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10049984
push dword [ebp - 0x10]
mov byte [esi + 0xb0], 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 dword [ebp + 8]
push esi
call fcn.1004fbf8
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10049984
push dword [ebp - 0x10]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp + 8]
push esi
call fcn.1004fbf8
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10049984
mov dword [ebp - 0x1c], edi
lea eax, [ebp - 0x28]
push eax
movzx eax, byte [edi + 0x10072784]
push eax
push dword [ebp - 0xc]
call fcn.1004fbf8
movzx eax, byte [edi + 0x10072785]
add eax, dword [ebp - 0x28]
push eax
movzx eax, byte [edi + 0x10072784]
push eax
push ebx
call fcn.1004fbf8
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x10049984
mov edi, dword [ebp - 0x1c]
add edi, 2
mov dword [ebp - 0x1c], edi
cmp edi, 0xa
jl 0x100498e9
cmp dword [ebp + 0x14], eax
jne 0x10049943
push ebx
push dword [ebp - 0xc]
call fcn.1004fbf8
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x10049984
push ebx
call fcn.1004fbf8
mov edi, eax
pop ecx
test edi, edi
jne 0x10049984
cmp dword [ebp + 0x14], eax
jne 0x10049984
push ebx
call fcn.1004fbf8
mov edi, dword [ebp - 0xc]
push eax
push edi
call fcn.1004fbf8
push ebx
call fcn.1004fbf8
mov ecx, dword [ebx + 4]
push 1
push eax
push dword [ecx + 0x24]
push edi
call fcn.1004fbf8
add esp, 0x20
mov edi, eax
jmp 0x10049984
push 7
pop edi
mov ebx, dword [ebp - 8]
mov eax, dword [ebp - 0x2c]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x6c], eax
mov eax, dword [ebp - 0x38]
push 1
mov dword [esi + 0x70], eax
mov eax, dword [ebp - 0x3c]
push 0
mov dword [esi + 0x74], eax
mov al, byte [ebp - 1]
push 0xffffffffffffffff
push dword [ebp - 0xc]
mov byte [esi + 0xb0], 0
mov byte [esi + 0x5e], al
call fcn.1004fbf8
add esp, 0x10
mov byte [esi + 0x55], 1
test ebx, ebx
je 0x100499e8
push dword [ebx + 4]
call fcn.1004fbf8
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
pop ecx
push esi
call fcn.1004fbf8
pop ecx
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret