Function at 0x498740
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp + 0xc]
movzx ecx, byte [eax + 0x43]
test ecx, ecx
jne 0x498785
push str.cannot_VACUUM_from_within_a_transaction
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00430f90
add esp, 0xc
mov eax, 1
jmp 0x498c47
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x98], 1
jle 0x4987b0
push str.cannot_VACUUM___SQL_statements_in_progress
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00430f90
add esp, 0xc
mov eax, 1
jmp 0x498c47
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x54]
mov dword [ebp - 0x10], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x58]
mov dword [ebp - 8], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0xb4]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
or ecx, 0x202800
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
and ecx, 0xfff5ffff
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
mov eax, dword [ebp + 0xc]
mov dword [eax + 0xb4], 0
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x10]
mov eax, dword [edx + 4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00451ca0
add esp, 4
push eax
call fcn.00442b10
add esp, 4
mov dword [ebp - 0x20], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004acd40
add esp, 4
test eax, eax
je 0x49884e
mov dword [ebp - 0x2c], str.ATTACH_:memory:_AS_vacuum_db_
jmp 0x498855
mov dword [ebp - 0x2c], str.ATTACH__AS_vacuum_db_
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.004985e0
add esp, 0xc
mov dword [ebp - 0xc], eax
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 0x14]
cmp eax, dword [ebp - 0x24]
jle 0x49888c
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
sub edx, 1
shl edx, 4
mov eax, dword [ebp + 0xc]
add edx, dword [eax + 0x10]
mov dword [ebp - 0x30], edx
cmp dword [ebp - 0xc], 0
je 0x498897
jmp 0x498bcf
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x14]
sub edx, 1
shl edx, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x10]
mov edx, dword [ecx + edx + 4]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
call fcn.0044b460
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00449dd0
add esp, 4
mov dword [ebp - 0x1c], eax
push str.PRAGMA_vacuum_db.synchronousOFF
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004985e0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4988ee
jmp 0x498bcf
push str.BEGIN_
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004985e0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498911
jmp 0x498bcf
push 2
mov eax, dword [ebp - 0x18]
push eax
call fcn.0044a510
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x49892d
jmp 0x498bcf
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00451ca0
add esp, 4
push eax
call fcn.00443250
add esp, 4
cmp eax, 5
jne 0x498951
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x4c], 0
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00449da0
add esp, 4
push eax
mov edx, dword [ebp - 4]
push edx
call fcn.00449cb0
add esp, 0x10
test eax, eax
jne 0x4989a2
cmp dword [ebp - 0x20], 0
jne 0x498997
push 0
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x4c]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00449cb0
add esp, 0x10
test eax, eax
jne 0x4989a2
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx + 0x45]
test edx, edx
je 0x4989ae
mov dword [ebp - 0xc], 7
jmp 0x498bcf
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax + 0x48]
test ecx, ecx
jl 0x4989c5
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx + 0x48]
mov dword [ebp - 0x3c], eax
jmp 0x4989d4
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00449f60
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00449ed0
add esp, 8
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_coalesce_rootpage_1__0
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498a07
jmp 0x498bcf
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498a2a
jmp 0x498bcf
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498a4d
jmp 0x498bcf
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + 0x18]
or edx, 0x8000000
mov eax, dword [ebp + 0xc]
mov dword [eax + 0x18], edx
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
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 0x18]
and ecx, 0xf7ffffff
mov edx, dword [ebp + 0xc]
mov dword [edx + 0x18], ecx
cmp dword [ebp - 0xc], 0
je 0x498a94
jmp 0x498bcf
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498ab7
jmp 0x498bcf
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__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.00498660
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498ada
jmp 0x498bcf
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 ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp + 0xc]
push edx
call fcn.004985e0
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498afd
jmp 0x498bcf
mov dword [ebp - 0x34], 0
jmp 0x498b0f
mov eax, dword [ebp - 0x34]
add eax, 2
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0xa
jge 0x498b62
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x54a984]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.004519f0
add esp, 0xc
mov edx, dword [ebp - 0x34]
movzx eax, byte [edx + 0x54a985]
add eax, dword [ebp - 0x38]
push eax
mov ecx, dword [ebp - 0x34]
movzx edx, byte [ecx + 0x54a984]
push edx
mov eax, dword [ebp - 4]
push eax
call fcn.00451a60
add esp, 0xc
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498b60
jmp 0x498bcf
jmp 0x498b06
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00454060
add esp, 8
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498b7d
jmp 0x498bcf
mov eax, dword [ebp - 4]
push eax
call fcn.0044b460
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x498b94
jmp 0x498bcf
mov ecx, dword [ebp - 4]
push ecx
call fcn.00449f60
add esp, 4
push eax
mov edx, dword [ebp - 0x18]
push edx
call fcn.00449ed0
add esp, 8
push 1
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 4]
push ecx
call fcn.00449da0
add esp, 4
push eax
mov edx, dword [ebp - 0x18]
push edx
call fcn.00449cb0
add esp, 0x10
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x28]
mov dword [eax + 0x18], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x10]
mov dword [edx + 0x54], eax
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp - 8]
mov dword [ecx + 0x58], edx
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
mov dword [eax + 0xb4], ecx
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov edx, dword [ebp - 0x18]
push edx
call fcn.00449cb0
add esp, 0x10
mov eax, dword [ebp + 0xc]
mov byte [eax + 0x43], 1
cmp dword [ebp - 0x30], 0
je 0x498c38
mov ecx, dword [ebp - 0x30]
mov edx, dword [ecx + 4]
push edx
call fcn.00449a60
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [eax + 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ecx + 0xc], 0
mov edx, dword [ebp + 0xc]
push edx
call fcn.00476e80
add esp, 4
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret