Function at 0x490fb0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
cmp byte [esi + 0x43], 0
jne 0x490fdc
mov edi, dword [esp + 0x3c]
mov ebx, str.cannot_VACUUM_from_within_a_transaction
call fcn.00434480
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x9c], 1
jle 0x491000
mov edi, dword [esp + 0x3c]
mov ebx, str.cannot_VACUUM___SQL_statements_in_progress
call fcn.00434480
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x58]
mov dword [esp + 0x2c], ecx
and ecx, 0xffffaf7f
or ecx, 0x6000201
mov dword [esi + 0x18], ecx
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x30], edx
mov edx, dword [esi + 0x5c]
shl eax, 4
mov dword [esp + 0x34], edx
mov dl, byte [esi + 0x4c]
mov byte [esi + 0x4c], 0
mov ebx, dword [eax + ecx + 4]
mov dword [esp + 0x24], eax
add eax, ecx
mov byte [esp + 0x13], dl
mov edx, dword [eax]
mov eax, dword [ebx + 4]
mov ecx, dword [eax]
mov eax, dword [esi + 0x14]
mov dword [esp + 0x14], edx
movzx edx, byte [ecx + 0xd]
mov ecx, dword [esp + 0x3c]
push str.ATTACHAS_vacuum_db
push ecx
push esi
mov dword [esp + 0x34], edx
mov dword [esp + 0x28], eax
call fcn.00490dd0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912cc
mov eax, dword [esp + 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
mov edi, dword [eax + 4]
mov dword [esp + 0x18], eax
mov eax, edi
call fcn.004488c0
mov eax, ebx
call fcn.00447610
mov edx, dword [esi + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov ecx, dword [edx + eax + 0xc]
mov edx, dword [ecx + 0x50]
push edx
mov eax, edi
call fcn.00447410
add esp, 4
push ebp
mov eax, ebx
call fcn.00447460
add esp, 4
push eax
mov eax, edi
call fcn.00447460
add esp, 4
push 0x21
mov eax, edi
call fcn.00447500
mov eax, dword [esp + 0x40]
add esp, 4
push str.BEGIN
push eax
push esi
call fcn.00490dd0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912c8
push 2
push ebx
call fcn.00447b50
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4912c8
mov ecx, dword [ebx + 4]
mov edx, dword [ecx]
cmp byte [edx + 5], 5
jne 0x491114
mov dword [esi + 0x50], eax
mov eax, dword [ebx + 4]
mov eax, dword [eax + 0x20]
mov ebp, dword [esp + 0x20]
push 0
push eax
mov eax, ebp
mov ecx, edi
call fcn.00447550
add esp, 8
test eax, eax
jne 0x4912c3
cmp dword [esp + 0x28], eax
jne 0x491154
mov ecx, dword [esi + 0x50]
push eax
push ecx
mov eax, ebp
mov ecx, edi
call fcn.00447550
add esp, 8
test eax, eax
jne 0x4912c3
cmp byte [esi + 0x45], 0
jne 0x4912c3
mov al, byte [esi + 0x48]
test al, al
jl 0x49116a
movsx eax, al
jmp 0x491171
mov eax, ebx
call fcn.00447790
push eax
mov eax, edi
call fcn.00447710
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x40]
mov dl, byte [esp + 0x20]
add esp, 4
push eax
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ecx
mov eax, esi
mov byte [esi + 0x98], dl
call fcn.00490ea0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912c8
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x3c]
push edx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex_AND_length_sql__10
push eax
mov eax, esi
call fcn.00490ea0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912c8
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x3c]
push ecx
mov byte [esi + 0x98], 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 edx
mov eax, esi
call fcn.00490ea0
and dword [esi + 0x18], 0xfbffffff
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912c8
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x3c]
push eax
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ecx
mov eax, esi
call fcn.00490ea0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4912c8
mov dword [esp + 0x14], ebp
jmp 0x491234
mov ebp, dword [esp + 0x14]
movzx eax, byte [ebp + 0x5fdca0]
lea edx, [esp + 0x28]
push edx
push eax
mov eax, ebx
call fcn.0044dd90
movzx ecx, byte [ebp + 0x5fdca1]
add ecx, dword [esp + 0x30]
movzx edx, byte [ebp + 0x5fdca0]
push ecx
push edx
mov eax, edi
call fcn.0044ddf0
mov ebp, eax
add esp, 0x10
test ebp, ebp
jne 0x4912c8
mov eax, dword [esp + 0x14]
add eax, 2
cmp eax, 0xa
mov dword [esp + 0x14], eax
jl 0x491230
mov eax, edi
call fcn.00450320
mov ebp, eax
test ebp, ebp
jne 0x4912c8
mov eax, edi
call fcn.004488c0
mov ebp, eax
test ebp, ebp
jne 0x4912c8
mov eax, edi
call fcn.00447790
push eax
mov eax, ebx
call fcn.00447710
mov eax, dword [edi + 4]
mov eax, dword [eax + 0x20]
add esp, 4
push 1
push eax
mov eax, dword [esp + 0x28]
mov ecx, ebx
call fcn.00447550
add esp, 8
mov ebp, eax
jmp 0x4912c8
mov ebp, 7
mov edi, dword [esp + 0x18]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x30]
mov dword [esi + 0x18], ecx
mov cl, byte [esp + 0x13]
mov dword [esi + 0x5c], eax
mov byte [esi + 0x4c], cl
push 1
push 0xffffffffffffffff
or eax, 0xffffffff
mov ecx, ebx
mov byte [esi + 0x98], 0
mov dword [esi + 0x58], edx
call fcn.00447550
xor ebx, ebx
add esp, 8
mov byte [esi + 0x43], 1
cmp edi, ebx
je 0x491318
mov eax, dword [edi + 4]
call fcn.00447320
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
mov eax, esi
call fcn.0046ef90
pop edi
pop esi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x28
ret