Function at 0x494e70
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x1c]
test ecx, ecx
jne 0x494eb5
push str.cannot_VACUUM_from_within_a_transaction
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00446da0
add esp, 0xc
mov eax, 1
jmp 0x4952c4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xc]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x3c]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x40]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x94]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
or ecx, 0x50000
mov edx, dword [ebp + 0xc]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0xc]
and ecx, 0xfaffffff
mov edx, dword [ebp + 0xc]
mov dword [edx + 0xc], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x94], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 8]
mov eax, dword [edx + 4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0045d4c0
add esp, 4
push eax
call fcn.004537c0
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp + 0xc]
push edx
call fcn.004a1860
add esp, 4
test eax, eax
je 0x494f4a
mov dword [ebp - 0x28], str.ATTACH_:memory:_AS_vacuum_db_
jmp 0x494f51
mov dword [ebp - 0x28], str.ATTACH__AS_vacuum_db_
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00494d20
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x494f73
jmp 0x49525c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
sub ecx, 1
shl ecx, 4
mov edx, dword [ebp + 0xc]
add ecx, dword [edx + 8]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 4]
sub ecx, 1
shl ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
mov ecx, dword [eax + ecx + 4]
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00457e30
add esp, 4
mov eax, dword [ebp - 0x18]
push eax
call fcn.00456a80
add esp, 4
mov dword [ebp - 0x1c], eax
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00456a70
add esp, 4
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.00456990
add esp, 0x10
test eax, eax
jne 0x49500d
cmp dword [ebp - 0x20], 0
jne 0x495002
push 0
mov ecx, dword [ebp - 0x1c]
push ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00456990
add esp, 0x10
test eax, eax
jne 0x49500d
mov edx, dword [ebp + 0xc]
movzx eax, byte [edx + 0x1e]
test eax, eax
je 0x495019
mov dword [ebp - 0xc], 7
jmp 0x49525c
push str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00494d20
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x49503c
jmp 0x49525c
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax + 0x21]
test ecx, ecx
jl 0x495053
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx + 0x21]
mov dword [ebp - 0x38], eax
jmp 0x495062
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00456bf0
add esp, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x38]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00456b60
add esp, 8
push str.BEGIN_EXCLUSIVE_
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00494d20
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x495095
jmp 0x49525c
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4950b8
jmp 0x49525c
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4950db
jmp 0x49525c
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4950fe
jmp 0x49525c
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
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x495121
jmp 0x49525c
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x495144
jmp 0x49525c
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00494da0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x495167
jmp 0x49525c
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_
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00494d20
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x49518a
jmp 0x49525c
mov dword [ebp - 0x30], 0
jmp 0x49519c
mov edx, dword [ebp - 0x30]
add edx, 2
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0x30], 8
jge 0x4951ef
lea eax, [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x30]
movzx edx, byte [ecx + 0x4ef534]
push edx
mov eax, dword [ebp - 0x18]
push eax
call fcn.0045d230
add esp, 0xc
mov ecx, dword [ebp - 0x30]
movzx edx, byte [ecx + 0x4ef535]
add edx, dword [ebp - 0x34]
push edx
mov eax, dword [ebp - 0x30]
movzx ecx, byte [eax + 0x4ef534]
push ecx
mov edx, dword [ebp - 4]
push edx
call fcn.0045d280
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4951ed
jmp 0x49525c
jmp 0x495193
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0045f380
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x49520a
jmp 0x49525c
mov edx, dword [ebp - 4]
push edx
call fcn.00457e30
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x495221
jmp 0x49525c
mov eax, dword [ebp - 4]
push eax
call fcn.00456bf0
add esp, 4
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00456b60
add esp, 8
push 1
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00456a70
add esp, 4
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00456990
add esp, 0x10
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x24]
mov dword [edx + 0xc], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
mov dword [ecx + 0x3c], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
mov dword [eax + 0x40], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x14]
mov dword [edx + 0x94], eax
mov ecx, dword [ebp + 0xc]
mov byte [ecx + 0x1c], 1
cmp dword [ebp - 0x2c], 0
je 0x4952b3
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
push eax
call fcn.004567a0
add esp, 4
mov ecx, dword [ebp - 0x2c]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x2c]
mov dword [edx + 0xc], 0
push 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00479eb0
add esp, 8
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret