Function at 0x10077300
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x10
mov eax, dword [edi + 0xc]
push ebx
push ebp
mov dword [esp + 0x14], eax
or eax, 0x2800
xor ebp, ebp
cmp byte [edi + 0x1c], 0
push esi
mov dword [edi + 0xc], eax
jne 0x10077338
mov eax, dword [esp + 0x20]
push ebp
push str.cannot_VACUUM_from_within_a_transaction
push eax
call fcn.1004c130
add esp, 0xc
lea esi, [ebp + 1]
jmp 0x100774e7
mov ecx, dword [edi + 8]
mov ebx, dword [ecx + 4]
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, edi
mov dword [esp + 0x10], ebx
call fcn.10077220
mov esi, eax
test esi, esi
jne 0x100774e7
mov eax, dword [edi + 4]
lea edx, [eax + eax*2]
mov eax, dword [edi + 8]
mov ebp, dword [eax + edx*8 - 0x14]
lea eax, [eax + edx*8]
lea ecx, [eax - 0x18]
mov eax, ebx
mov dword [esp + 0xc], ecx
call fcn.10047ea0
push eax
mov eax, ebx
call fcn.10047e90
push eax
mov eax, ebp
call fcn.1004d730
add esp, 8
cmp byte [edi + 0x1e], 0
je 0x10077399
mov esi, 7
jmp 0x100774e3
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov ecx, edi
call fcn.10077220
mov esi, eax
test esi, esi
jne 0x100774e3
mov al, byte [edi + 0x1f]
test al, al
jl 0x100773bb
movsx eax, al
jmp 0x100773c2
mov eax, ebx
call fcn.10047f30
push eax
mov eax, ebp
call fcn.10047ed0
add esp, 4
mov eax, str.BEGIN_EXCLUSIVE_
mov ecx, edi
call fcn.10077220
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov ebx, edi
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.10077280
mov esi, eax
test esi, esi
jne 0x100774e3
mov eax, str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
mov ecx, edi
call fcn.10077220
mov esi, eax
test esi, esi
jne 0x100774e3
xor ebx, ebx
movzx eax, byte [ebx + 0x100bfab0]
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x18]
call fcn.1005d410
mov esi, eax
add esp, 8
test esi, esi
jne 0x100774e3
movzx ecx, byte [ebx + 0x100bfab1]
add ecx, dword [esp + 0x14]
movzx edx, byte [ebx + 0x100bfab0]
push ecx
push edx
mov eax, ebp
call fcn.1005d4b0
mov esi, eax
add esp, 8
test esi, esi
jne 0x100774e3
add ebx, 2
cmp ebx, 8
jb 0x10077471
mov ebx, dword [esp + 0x10]
mov eax, ebp
call fcn.10066a90
mov esi, eax
test esi, esi
jne 0x100774e3
mov eax, ebp
call fcn.10062030
mov esi, eax
test esi, esi
jne 0x100774e3
mov eax, ebx
call fcn.10062030
mov esi, eax
mov ebp, dword [esp + 0xc]
mov eax, dword [esp + 0x18]
xor ebx, ebx
mov dword [edi + 0xc], eax
mov byte [edi + 0x1c], 1
cmp ebp, ebx
je 0x10077506
mov eax, dword [ebp + 4]
call fcn.1006c860
mov dword [ebp + 4], ebx
mov dword [ebp + 0x14], ebx
push ebx
mov ebx, edi
call fcn.1005f450
add esp, 4
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret