Function at 0x49adf0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x1c
push esi
mov esi, dword [esp + 0x28]
xor eax, eax
mov dword [esp + 8], eax
cmp byte [esi + 0x3f], al
jne 0x49ae1f
push str.cannot_VACUUM_from_within_a_transaction
push esi
push dword [esp + 0x2c]
call fcn.0049e560
add esp, 0xc
mov eax, 1
pop esi
add esp, 0x1c
ret
cmp dword [esi + 0x94], 1
jle 0x49ae2f
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x49ae08
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x50]
mov dword [esp + 0x10], eax
and eax, 0xfff5ffff
or eax, 0x202800
mov dword [esp + 0x14], ecx
cmp byte [esi + 0x40], 2
mov ecx, dword [esi + 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
push ebx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esi + 0xb0]
mov dword [esi + 0xb0], 0
push ebp
mov ebp, dword [eax + 4]
push edi
mov dword [esp + 0x28], ecx
mov eax, dword [ebp + 4]
mov eax, dword [eax]
movzx eax, byte [eax + 0xf]
mov dword [esp + 0x18], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 0x34], eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x49ae92
mov eax, str.ATTACH__AS_vacuum_db_
mov ebx, dword [esp + 0x30]
push eax
push ebx
push esi
call fcn.0044d9b0
mov ecx, dword [esi + 0x14]
add esp, 0xc
mov edi, eax
cmp ecx, dword [esp + 0x34]
jle 0x49aebd
mov eax, dword [esi + 0x10]
mov edx, ecx
shl edx, 4
add eax, 0xfffffff0
add eax, edx
mov dword [esp + 0x14], eax
test edi, edi
jne 0x49b0ef
mov eax, dword [esi + 0x10]
add ecx, ecx
mov eax, dword [eax + ecx*8 - 0xc]
push eax
mov dword [esp + 0x38], eax
call fcn.00479ca0
push ebp
call fcn.0047a780
push str.PRAGMA_vacuum_db.synchronousOFF
push ebx
push esi
mov dword [esp + 0x24], eax
call fcn.0044d9b0
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x49b0ef
push str.BEGIN_
push ebx
push esi
call fcn.0044d9b0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
push 2
push ebp
call fcn.004796b0
mov edi, eax
add esp, 8
test edi, edi
jne 0x49b0ef
mov eax, dword [ebp + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x49af37
mov dword [esi + 0x48], edi
mov eax, dword [ebp + 4]
mov edi, dword [esp + 0x34]
push 0
push dword [esp + 0x14]
push dword [eax + 0x20]
push edi
call fcn.0047c410
add esp, 0x10
test eax, eax
jne 0x49b0ea
cmp dword [esp + 0x18], eax
jne 0x49af77
push eax
push dword [esp + 0x14]
push dword [esi + 0x48]
push edi
call fcn.0047c410
add esp, 0x10
test eax, eax
jne 0x49b0ea
cmp byte [esi + 0x41], 0
jne 0x49b0ea
mov al, byte [esi + 0x43]
test al, al
js 0x49af8d
movsx eax, al
jmp 0x49af96
push ebp
call fcn.0047a6a0
add esp, 4
push eax
push edi
call fcn.0047c280
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.0044d900
mov edi, eax
add esp, 0x14
test edi, edi
jne 0x49b0ef
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebx
push esi
call fcn.0044d900
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebx
push esi
call fcn.0044d900
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
or dword [esi + 0x18], 0x8000000
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_coalesce_rootpage_1__0
push ebx
push esi
call fcn.0044d900
and dword [esi + 0x18], 0xf7ffffff
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebx
push esi
call fcn.0044d900
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebx
push esi
call fcn.0044d900
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
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 ebx
push esi
call fcn.0044d9b0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x49b0ef
xor ebx, ebx
lea esp, [esp]
lea eax, [esp + 0x18]
push eax
movzx eax, byte [ebx + 0x4d6a14]
push eax
push ebp
call fcn.0047a720
movzx eax, byte [ebx + 0x4d6a15]
add eax, dword [esp + 0x24]
push eax
movzx eax, byte [ebx + 0x4d6a14]
push eax
push dword [esp + 0x48]
call fcn.0047c7d0
mov edi, eax
add esp, 0x18
test edi, edi
jne 0x49b0ef
add ebx, 2
cmp ebx, 0xa
jl 0x49b060
mov ebx, dword [esp + 0x34]
push ebx
push ebp
call fcn.00479e40
mov edi, eax
add esp, 8
test edi, edi
jne 0x49b0ef
push ebx
call fcn.00479ca0
mov edi, eax
add esp, 4
test edi, edi
jne 0x49b0ef
push ebx
call fcn.0047a6a0
push eax
push ebp
call fcn.0047c280
mov eax, dword [ebx + 4]
push 1
push dword [esp + 0x20]
push dword [eax + 0x20]
push ebp
call fcn.0047c410
add esp, 0x1c
mov edi, eax
jmp 0x49b0ef
mov edi, 7
mov eax, dword [esp + 0x1c]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x20]
push 1
mov dword [esi + 0x50], eax
mov eax, dword [esp + 0x28]
push 0xffffffffffffffff
mov dword [esi + 0x54], eax
mov eax, dword [esp + 0x30]
push 0xffffffffffffffff
push ebp
mov dword [esi + 0xb0], eax
call fcn.0047c410
mov ebx, dword [esp + 0x24]
add esp, 0x10
mov byte [esi + 0x3f], 1
test ebx, ebx
je 0x49b142
push dword [ebx + 4]
call fcn.00479a70
add esp, 4
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
push esi
call fcn.00499d30
add esp, 4
mov eax, edi
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x1c
ret