Function at 0x4792f0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x28
push ebx
xor ecx, ecx
push ebp
push edi
mov edi, eax
mov dword [esp + 0x1c], ecx
cmp byte [esi + 0x3e], cl
jne 0x47931e
push str.cannot_VACUUM_from_within_a_transaction
mov eax, esi
call fcn.00421000
add esp, 4
mov eax, 1
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x94], 1
jle 0x479342
push str.cannot_VACUUM___SQL_statements_in_progress
mov eax, esi
call fcn.00421000
add esp, 4
mov eax, 1
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esi + 0x18]
mov edx, dword [esi + 0x50]
mov dword [esp + 0x24], eax
and eax, 0xfff5ffff
or eax, 0x202800
cmp byte [esi + 0x3f], 2
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0xac]
mov dword [esi + 0xac], ecx
mov ebx, dword [eax + 4]
mov ecx, dword [ebx + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
movzx eax, byte [edx + 0xf]
mov ecx, dword [esi + 0x14]
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], ebx
mov dword [esp + 0x18], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x4793a2
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, edi
mov edx, esi
call fcn.00479130
mov ebp, eax
mov eax, dword [esi + 0x14]
cmp eax, dword [esp + 0x18]
jle 0x4793c6
mov ecx, dword [esi + 0x10]
mov edx, eax
shl edx, 4
lea edx, [edx + ecx - 0x10]
mov dword [esp + 0x1c], edx
test ebp, ebp
jne 0x4795f9
mov ecx, dword [esi + 0x10]
shl eax, 4
mov eax, dword [eax + ecx - 0xc]
mov dword [esp + 0x14], eax
call fcn.004341e0
mov eax, ebx
call fcn.00432d00
mov dword [esp + 0x18], eax
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, edi
mov edx, esi
call fcn.00479130
mov ebp, eax
test ebp, ebp
jne 0x4795f9
mov eax, str.BEGIN_
mov ecx, edi
mov edx, esi
call fcn.00479130
mov ebp, eax
test ebp, ebp
jne 0x4795f9
push 2
push ebx
call fcn.00433280
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4795f9
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x47943f
mov dword [esi + 0x48], ebp
mov ecx, dword [ebx + 4]
mov edx, dword [esp + 0x18]
mov eax, dword [ecx + 0x20]
mov ebx, dword [esp + 0x14]
push 0
push edx
call fcn.00432c40
add esp, 8
test eax, eax
jne 0x4795f0
cmp dword [esp + 0x20], eax
jne 0x47947f
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esi + 0x48]
call fcn.00432c40
add esp, 8
test eax, eax
jne 0x4795f0
cmp byte [esi + 0x40], 0
jne 0x4795f0
mov al, byte [esi + 0x42]
test al, al
jl 0x479495
movsx eax, al
jmp 0x47949e
mov eax, dword [esp + 0x10]
call fcn.00432e70
push eax
mov eax, ebx
call fcn.00432df0
add esp, 4
push edi
mov eax, 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, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
push edi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov ecx, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
push edi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov ecx, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
push edi
mov eax, 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, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
push edi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov ecx, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
push edi
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov ecx, esi
call fcn.004791b0
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x4795f5
mov eax, 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, edi
mov edx, esi
call fcn.00479130
mov ebp, eax
test ebp, ebp
jne 0x4795f5
xor edi, edi
nop
movzx edx, byte [edi + 0x4d0900]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.00438c10
movzx eax, byte [edi + 0x4d0900]
movzx ebx, byte [edi + 0x4d0901]
add ebx, dword [esp + 0x28]
push eax
mov eax, dword [esp + 0x20]
call fcn.00438c80
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x4795f5
add edi, 2
cmp edi, 0xa
jl 0x479560
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
mov eax, edi
call fcn.0043b1e0
mov ebp, eax
test ebp, ebp
jne 0x4795f5
mov eax, edi
call fcn.004341e0
mov ebp, eax
test ebp, ebp
jne 0x4795f5
mov eax, edi
call fcn.00432e70
push eax
mov eax, ebx
call fcn.00432df0
mov ecx, dword [edi + 4]
mov edx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x20]
add esp, 4
push 1
push edx
call fcn.00432c40
add esp, 8
mov ebp, eax
jmp 0x4795f9
mov ebp, 7
mov ebx, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [esi + 0xac], eax
push 1
push 0xffffffffffffffff
or eax, 0xffffffff
mov dword [esi + 0x50], ecx
mov dword [esi + 0x54], edx
call fcn.00432c40
mov edi, dword [esp + 0x24]
xor ebx, ebx
add esp, 8
mov byte [esi + 0x3e], 1
cmp edi, ebx
je 0x479643
mov eax, dword [edi + 4]
call fcn.00432a40
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
mov eax, esi
call fcn.00456eb0
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x28
ret