Function at 0x491c57
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
mov edi, eax
mov esi, edx
sub esp, 0xac
cmp byte [edx + 0x55], 0
jne 0x491c74
mov ecx, str.cannot_VACUUM_from_within_a_transaction
jmp 0x491c82
cmp dword [edx + 0xbc], 1
jle 0x491c95
mov ecx, str.cannot_VACUUM___SQL_statements_in_progress
mov eax, edi
mov edx, esi
call fcn.0041b46a
mov eax, 1
jmp 0x4921f0
cmp dword [ebp + 8], 0
mov eax, dword [edx + 0x3c]
mov ebx, ecx
mov dword [ebp - 0x5c], eax
je 0x491cd3
mov eax, dword [ebp + 8]
mov ecx, str.non_text_filename
mov eax, dword [eax + 0x10]
and eax, 0x3f
cmp byte [eax + 0x4fe9a0], 3
jne 0x491c82
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.0041fd1b
mov edx, dword [esi + 0x3c]
and edx, 0xfffffffe
or edx, 6
mov dword [esi + 0x3c], edx
jmp 0x491cd8
mov eax, 0x4f222e
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x68]
shl ebx, 4
mov dword [ebp - 0x68], ebx
mov dword [ebp - 0x80], 1
mov dword [ebp - 0x84], ecx
mov ecx, dword [esi + 0x24]
mov dword [ebp - 0x90], edx
mov edx, dword [esi + 0x70]
mov dword [ebp - 0x88], ecx
mov ecx, dword [esi + 0x18]
mov dword [ebp - 0x98], edx
mov dword [ebp - 0x74], ecx
mov ecx, dword [esi + 0x6c]
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x8c], ecx
mov ecx, dword [esi + 0x74]
or edx, 6
mov dword [esi + 0x18], edx
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x94], ecx
mov cl, byte [esi + 0x5e]
mov byte [esi + 0x5e], 0
and edx, 0xefffafff
or edx, 0x201
mov byte [ebp - 0x99], cl
mov ecx, dword [ebp - 0x88]
mov dword [esi + 0x20], edx
mov edx, dword [esi + 0x10]
and ecx, 0xfffffffe
add edx, ebx
mov dword [esi + 0x24], ecx
mov ecx, dword [edx]
mov dword [ebp - 0x70], ecx
mov ecx, dword [edx + 4]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x60], ecx
mov edx, dword [edx]
cmp byte [edx + 0xc], 0
jne 0x491d7f
xor ecx, ecx
cmp byte [edx + 0x10], 0
setne cl
mov dword [ebp - 0x80], ecx
mov ecx, dword [esi + 0x14]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str.ATTACH__Q_AS_vacuum_db
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [ebp - 0x78], ecx
call fcn.00491c0f
mov ebx, eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x64], 0
test ebx, ebx
mov dword [esi + 0x3c], eax
jne 0x492161
mov eax, dword [ebp - 0x78]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 8], 0
mov dword [ebp - 0x64], eax
mov eax, dword [eax + 4]
mov dword [ebp - 0x5c], eax
je 0x491e32
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 0
cmp dword [eax], 0
je 0x491e19
lea edx, [ebp - 0x48]
call fcn.0040162e
test eax, eax
jne 0x491e01
cmp dword [ebp - 0x44], 0
jl 0x491e19
jg 0x491e01
cmp dword [ebp - 0x48], 0
jbe 0x491e19
mov ecx, str.output_file_already_exists
mov edx, esi
mov eax, edi
call fcn.0041b46a
mov ebx, 1
jmp 0x492161
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x68]
or dword [esi + 0x18], 8
movzx ebx, byte [eax + ecx + 8]
mov eax, dword [esi + 0x20]
and eax, 0x38
or ebx, eax
jmp 0x491e37
mov ebx, 1
mov eax, dword [ebp - 0x60]
or ebx, 0x20
call fcn.0040357a
mov ecx, dword [ebp - 0x68]
mov dword [ebp - 0x7c], eax
mov eax, dword [esi + 0x10]
mov eax, dword [eax + ecx + 0xc]
mov edx, dword [eax + 0x50]
mov eax, dword [ebp - 0x5c]
call fcn.004034de
mov eax, dword [ebp - 0x60]
xor edx, edx
call fcn.0040351b
mov edx, eax
mov eax, dword [ebp - 0x5c]
call fcn.0040351b
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x5c]
mov edx, dword [ecx]
mov eax, dword [eax + 4]
mov dword [eax + 4], edx
mov eax, dword [eax]
mov edx, ebx
call fcn.00402a28
mov ecx, 0x4f6532
mov edx, edi
mov eax, esi
call fcn.00491b26
test eax, eax
mov ebx, eax
jne 0x492161
cmp dword [ebp + 8], 1
mov eax, dword [ebp - 0x60]
sbb edx, edx
xor ecx, ecx
and edx, 2
call fcn.0044ddd0
test eax, eax
mov ebx, eax
jne 0x492161
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov edx, dword [eax]
cmp byte [edx + 5], 5
jne 0x491ed5
cmp dword [ebp + 8], 0
jne 0x491ed5
mov dword [esi + 0x64], 0
mov edx, dword [eax + 0x24]
mov ecx, dword [ebp - 0x7c]
mov ebx, 7
mov eax, dword [ebp - 0x5c]
mov dword [esp], 0
call fcn.00415d88
test eax, eax
jne 0x492161
cmp dword [ebp - 0x80], 0
je 0x491f0e
cmp byte [esi + 0x57], 0
mov ebx, 7
jne 0x492161
jmp 0x491f2d
mov edx, dword [esi + 0x64]
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x5c]
mov dword [esp], 0
call fcn.00415d88
test eax, eax
jne 0x492161
jmp 0x491efd
movsx eax, byte [esi + 0x5a]
test al, al
jns 0x491f3d
mov eax, dword [ebp - 0x60]
call fcn.004ec386
mov edx, eax
mov eax, dword [ebp - 0x5c]
call fcn.004035ca
mov al, byte [ebp - 0x78]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
mov dword [esp + 4], edi
mov dword [esp], esi
mov byte [esi + 0xb0], al
mov eax, dword [ebp - 0x70]
mov dword [esp + 0xc], eax
call fcn.00491c0f
test eax, eax
mov ebx, eax
jne 0x492161
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.00491c0f
test eax, eax
mov ebx, eax
jne 0x492161
mov eax, dword [ebp - 0x70]
mov byte [esi + 0xb0], 0
mov dword [esp + 8], str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.00491c0f
and dword [esi + 0x18], 0xfffffffb
test eax, eax
mov ebx, eax
jne 0x492161
mov eax, dword [ebp - 0x70]
mov dword [esp + 8], str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
mov dword [esp + 4], edi
mov dword [esp], esi
mov dword [esp + 0xc], eax
call fcn.00491c0f
test eax, eax
mov ebx, eax
jne 0x492161
mov edi, 0x4fcf48
movzx ebx, byte [edi]
mov eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x4c]
mov edx, ebx
call fcn.0040a3f7
movzx ecx, byte [edi + 1]
mov eax, dword [ebp - 0x5c]
mov edx, ebx
add ecx, dword [ebp - 0x4c]
call fcn.0044e421
test eax, eax
mov ebx, eax
jne 0x492161
add edi, 2
mov eax, 0x4fcf52
cmp eax, edi
jne 0x491ff4
cmp dword [ebp + 8], 0
je 0x492048
mov eax, dword [ebp - 0x5c]
call fcn.0045484d
test eax, eax
mov ebx, eax
jne 0x492161
jmp 0x492125
mov edi, dword [ebp - 0x60]
mov eax, dword [ebp - 0x60]
mov edx, dword [edi]
mov eax, dword [eax + 4]
mov edi, dword [ebp - 0x5c]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x5c]
mov edx, dword [edi]
mov eax, dword [eax + 4]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
mov eax, dword [eax]
mov ebx, dword [eax + 0x40]
cmp dword [ebx], 0
je 0x4920b2
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x24]
mov eax, dword [eax + 0x30]
mov edi, ecx
mov dword [ebp - 0x70], ecx
sar edi, 0x1f
mov dword [ebp - 0x6c], edi
mov edi, dword [ebp - 0x6c]
imul edi, eax
mul ecx
lea ecx, [ebp - 0x48]
add edx, edi
mov dword [ebp - 0x48], eax
mov eax, ebx
mov dword [ebp - 0x44], edx
mov edx, 0xb
call fcn.00401642
test eax, eax
mov ebx, eax
je 0x4920b2
cmp eax, 0xc
jne 0x49211c
lea ebx, [ebp - 0x48]
xor eax, eax
mov ecx, 0xc
mov edi, ebx
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax]
mov dword [esp], ebx
mov dword [esp + 4], 0x7fffffff
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x44], eax
call fcn.00454879
mov dword [esp], ebx
call fcn.00457ba9
test eax, eax
mov ebx, eax
jne 0x492109
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 4]
and word [eax + 0x18], 0xfffd
jmp 0x492031
mov eax, dword [ebp - 0x44]
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x49211c
call fcn.00413c31
test ebx, ebx
jne 0x492161
jmp 0x492031
cmp dword [ebp + 8], 0
jne 0x492161
mov eax, dword [ebp - 0x5c]
call fcn.004ec386
mov edx, eax
mov eax, dword [ebp - 0x60]
call fcn.004035ca
mov eax, dword [ebp - 0x5c]
call fcn.0040357a
mov edi, dword [ebp - 0x5c]
mov ecx, eax
mov eax, dword [ebp - 0x60]
mov edx, dword [edi + 4]
mov edx, dword [edx + 0x24]
mov dword [esp], 1
call fcn.00415d88
mov ebx, eax
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x8c]
xor ecx, ecx
mov byte [esi + 0xb0], 0
mov dword [esp], 1
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x84]
mov dword [esi + 0x6c], edx
mov edx, dword [ebp - 0x94]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x88]
mov dword [esi + 0x74], edx
or edx, 0xffffffff
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x90]
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x98]
mov dword [esi + 0x70], eax
mov al, byte [ebp - 0x99]
mov byte [esi + 0x5e], al
mov eax, dword [ebp - 0x60]
call fcn.00415d88
cmp dword [ebp - 0x64], 0
mov byte [esi + 0x55], 1
je 0x4921e7
mov eax, dword [ebp - 0x64]
mov eax, dword [eax + 4]
call fcn.00457914
mov eax, dword [ebp - 0x64]
mov dword [eax + 4], 0
mov dword [eax + 0xc], 0
mov eax, esi
call fcn.0041712f
mov eax, ebx
add esp, 0xac
pop ebx
pop esi
pop edi
pop ebp
ret