Function at 0x49e627
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x20
push edi
mov edi, dword [esp + 0x2c]
xor eax, eax
mov dword [esp + 8], eax
cmp byte [edi + 0x1c], al
jne 0x49e654
push str.cannot_VACUUM_from_within_a_transaction
push edi
push dword [esp + 0x30]
call fcn.004a006c
xor eax, eax
add esp, 0xc
inc eax
jmp 0x49e96a
cmp dword [edi + 0x8c], 1
jle 0x49e664
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x49e63f
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x3c]
mov dword [esp + 0x14], eax
and eax, 0xfaffffff
or eax, 0x10050000
mov dword [esp + 0x18], ecx
mov ecx, dword [edi + 0x40]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x98]
and dword [edi + 0x98], 0
mov eax, dword [eax + 4]
cmp byte [edi + 0x1d], 2
mov dword [esp + 0x2c], eax
push ebx
mov eax, dword [eax + 4]
push ebp
mov ebp, dword [esp + 0x30]
mov dword [esp + 0x28], ecx
mov ecx, str.ATTACH__AS_vacuum_db_
mov eax, dword [eax]
push esi
mov esi, dword [edi + 4]
movzx eax, byte [eax + 0xe]
mov dword [esp + 0x18], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
cmovne eax, ecx
push eax
push ebp
push edi
call fcn.0047f31f
mov ecx, dword [edi + 4]
add esp, 0xc
mov ebx, eax
cmp ecx, esi
jle 0x49e6ee
mov eax, dword [edi + 8]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x14], eax
test ebx, ebx
jne 0x49e90d
mov eax, dword [edi + 8]
add ecx, ecx
mov esi, dword [eax + ecx*8 - 0xc]
push esi
mov dword [esp + 0x20], esi
call fcn.0048e7e9
mov ebx, dword [esp + 0x3c]
push ebx
call fcn.0048ee29
mov eax, dword [ebx + 4]
push ebx
mov ecx, dword [eax + 0x24]
sub ecx, dword [eax + 0x28]
mov dword [esp + 0x1c], ecx
call fcn.0048f4ea
mov eax, dword [ebx + 4]
add esp, 0xc
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x49e738
and dword [edi + 0x24], 0
mov eax, dword [ebx + 4]
mov ebx, dword [esp + 0x10]
push 0
push ebx
push dword [eax + 0x24]
push esi
call fcn.004901f5
add esp, 0x10
test eax, eax
jne 0x49e90a
cmp dword [esp + 0x18], eax
jne 0x49e772
push eax
push ebx
push dword [edi + 0x24]
push esi
call fcn.004901f5
add esp, 0x10
test eax, eax
jne 0x49e90a
cmp byte [edi + 0x1e], 0
jne 0x49e90a
push str.PRAGMA_vacuum_db.synchronousOFF
push ebp
push edi
call fcn.0047f31f
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
mov al, byte [edi + 0x20]
test al, al
js 0x49e7a1
movsx eax, al
jmp 0x49e7ab
push dword [esp + 0x38]
call fcn.0048eefe
pop ecx
push eax
push esi
call fcn.0049014f
push str.BEGIN_EXCLUSIVE_
push ebp
push edi
call fcn.0047f31f
mov ebx, eax
add esp, 0x14
test ebx, ebx
jne 0x49e90d
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name____FROM_main.sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebp
push edi
call fcn.0047f2a5
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
push str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_main.sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
push ebp
push edi
call fcn.0047f31f
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x49e90d
mov ebp, dword [esp + 0x1c]
xor esi, esi
lea eax, [esp + 0x1c]
push eax
movzx eax, byte [esi + 0x4db9a8]
push eax
push dword [esp + 0x40]
call fcn.0048ef28
movzx eax, byte [esi + 0x4db9a9]
add eax, dword [esp + 0x28]
push eax
movzx eax, byte [esi + 0x4db9a8]
push eax
push ebp
call fcn.004903bf
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x49e90d
add esi, 2
cmp esi, 8
jl 0x49e880
push ebp
push dword [esp + 0x3c]
call fcn.0048e8f8
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
jne 0x49e90d
push ebp
call fcn.0048e7e9
mov ebx, eax
pop ecx
test ebx, ebx
jne 0x49e90d
push ebp
call fcn.0048eefe
mov ebx, dword [esp + 0x3c]
push eax
push ebx
call fcn.0049014f
mov eax, dword [ebp + 4]
push 1
push dword [esp + 0x20]
push dword [eax + 0x24]
push ebx
call fcn.004901f5
add esp, 0x1c
mov ebx, eax
jmp 0x49e90d
push 7
pop ebx
mov eax, dword [esp + 0x20]
push 1
mov dword [edi + 0xc], eax
mov eax, dword [esp + 0x28]
push 0xffffffffffffffff
mov dword [edi + 0x3c], eax
mov eax, dword [esp + 0x30]
push 0xffffffffffffffff
push dword [esp + 0x44]
mov dword [edi + 0x40], eax
mov eax, dword [esp + 0x3c]
mov dword [edi + 0x98], eax
call fcn.004901f5
mov ebp, dword [esp + 0x24]
add esp, 0x10
mov byte [edi + 0x1c], 1
test ebp, ebp
je 0x49e95b
push dword [ebp + 4]
call fcn.0048e6c3
and dword [ebp + 4], 0
and dword [ebp + 0xc], 0
pop ecx
push 0xffffffffffffffff
push edi
call fcn.0049dd6f
pop ecx
pop ecx
pop esi
pop ebp
mov eax, ebx
pop ebx
pop edi
add esp, 0x20
ret