Function at 0x470060
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 + 0x1c], cl
jne 0x47008e
push str.cannot_VACUUM_from_within_a_transaction
mov eax, esi
call fcn.00423dc0
mov eax, 1
add esp, 4
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
cmp dword [esi + 0x8c], 1
jle 0x4700b2
push str.cannot_VACUUM___SQL_statements_in_progress
mov eax, esi
call fcn.00423dc0
mov eax, 1
add esp, 4
pop edi
pop ebp
pop ebx
add esp, 0x28
ret
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x3c]
mov dword [esp + 0x24], eax
and eax, 0xfaffffff
or eax, 0x10050000
cmp byte [esi + 0x1d], 2
mov dword [esp + 0x28], edx
mov edx, dword [esi + 0x40]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov dword [esp + 0x2c], edx
mov edx, dword [esi + 0x94]
mov dword [esi + 0x94], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov edx, dword [ecx]
mov ecx, dword [esi + 4]
mov dword [esp + 0x10], eax
movzx eax, byte [edx + 0xd]
mov dword [esp + 0x20], eax
mov dword [esp + 0x18], ecx
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x470112
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, edi
mov ebx, esi
call fcn.0046fde0
mov ebp, eax
mov eax, dword [esi + 4]
cmp eax, dword [esp + 0x18]
jle 0x470136
mov ecx, dword [esi + 8]
mov edx, eax
shl edx, 4
lea edx, [edx + ecx - 0x10]
mov dword [esp + 0x1c], edx
test ebp, ebp
jne 0x470358
mov ecx, dword [esi + 8]
shl eax, 4
mov ebx, dword [eax + ecx - 0xc]
mov eax, ebx
mov dword [esp + 0x14], ebx
call fcn.004346b0
mov ebp, dword [esp + 0x10]
mov eax, ebp
call fcn.00433070
mov edx, dword [ebp + 4]
mov ecx, eax
mov eax, dword [edx]
cmp byte [eax + 5], 5
mov dword [esp + 0x18], ecx
jne 0x470176
mov dword [esi + 0x24], 0
mov edx, dword [ebp + 4]
mov eax, dword [edx + 0x24]
push 0
push ecx
push ebx
call fcn.00432fa0
add esp, 0xc
test eax, eax
jne 0x470353
cmp dword [esp + 0x20], eax
jne 0x4701b0
push eax
mov eax, dword [esp + 0x1c]
push eax
mov eax, dword [esi + 0x24]
push ebx
call fcn.00432fa0
add esp, 0xc
test eax, eax
jne 0x470353
cmp byte [esi + 0x1e], 0
jne 0x470353
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, edi
mov ebx, esi
call fcn.0046fde0
mov ebp, eax
test ebp, ebp
jne 0x470358
mov al, byte [esi + 0x20]
test al, al
jl 0x4701de
movsx eax, al
jmp 0x4701e7
mov eax, dword [esp + 0x10]
call fcn.004331d0
push eax
mov eax, dword [esp + 0x18]
call fcn.00433160
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
mov ecx, edi
call fcn.0046fde0
mov ebp, eax
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, 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
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
push edi
push esi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.0046fe70
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x470358
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
call fcn.0046fde0
mov ebp, eax
test ebp, ebp
jne 0x470358
xor edi, edi
jmp 0x4702c0
movzx edx, byte [edi + 0x4bb718]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x20]
push ecx
push edx
call fcn.00439130
movzx eax, byte [edi + 0x4bb719]
add eax, dword [esp + 0x28]
movzx ebx, byte [edi + 0x4bb718]
push eax
mov eax, dword [esp + 0x20]
call fcn.004391a0
mov ebp, eax
add esp, 0xc
test ebp, ebp
jne 0x470358
add edi, 2
cmp edi, 8
jl 0x4702c0
mov edi, dword [esp + 0x14]
mov ebx, dword [esp + 0x10]
push edi
call fcn.0043b890
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x470358
mov eax, edi
call fcn.004346b0
mov ebp, eax
test ebp, ebp
jne 0x470358
mov eax, edi
call fcn.004331d0
push eax
mov eax, ebx
call fcn.00433160
mov edx, dword [esp + 0x1c]
mov ecx, dword [edi + 4]
mov eax, dword [ecx + 0x24]
add esp, 4
push 1
push edx
push ebx
call fcn.00432fa0
add esp, 0xc
mov ebp, eax
jmp 0x470358
mov ebp, 7
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 0x30]
push 1
mov dword [esi + 0x3c], ecx
mov ecx, dword [esp + 0x14]
mov dword [esi + 0x94], eax
push 0xffffffffffffffff
push ecx
or eax, 0xffffffff
mov dword [esi + 0x40], edx
call fcn.00432fa0
mov edi, dword [esp + 0x28]
xor ebx, ebx
add esp, 0xc
mov byte [esi + 0x1c], 1
cmp edi, ebx
je 0x4703a7
mov eax, dword [edi + 4]
call fcn.00432d80
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
push ebx
mov ebx, esi
call fcn.00452680
add esp, 4
pop edi
mov eax, ebp
pop ebp
pop ebx
add esp, 0x28
ret