Function at 0x1008c0f4
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x44]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x18], eax
or eax, 0x2800
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
push ebx
mov ebx, dword [eax + 4]
mov eax, dword [ebx + 4]
mov eax, dword [eax]
mov eax, dword [eax + 0x38]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [edi + 0x48]
mov dword [ebp - 0x20], ecx
xor ecx, ecx
cmp dword [eax], ecx
push esi
sete cl
push str.ATTACH__AS_vacuum_db_
push edi
mov dword [ebp - 8], ecx
call fcn.1008c048
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
mov eax, dword [edi + 4]
mov ecx, dword [edi + 8]
imul eax, eax, 0x18
add eax, ecx
lea ecx, [eax - 0x18]
mov eax, dword [eax - 0x14]
mov dword [ebp - 4], eax
mov eax, ebx
mov dword [ebp - 0x10], ecx
call fcn.10067625
mov eax, dword [ebx + 4]
movzx ecx, word [eax + 0x18]
movzx eax, word [eax + 0x16]
sub eax, ecx
mov esi, ebx
mov dword [ebp - 0xc], eax
call fcn.1006769d
mov eax, dword [ebx + 4]
push dword [ebp - 0xc]
movzx eax, word [eax + 0x16]
push dword [ebp - 4]
call fcn.10068b48
pop ecx
pop ecx
test eax, eax
jne 0x1008c36b
cmp dword [ebp - 8], eax
jne 0x1008c1b7
push dword [ebp - 0xc]
mov eax, dword [edi + 0x24]
push dword [ebp - 4]
call fcn.10068b48
pop ecx
pop ecx
test eax, eax
jne 0x1008c36b
cmp byte [edi + 0x1e], 0
jne 0x1008c36b
push str.PRAGMA_vacuum_db.synchronousOFF
push edi
call fcn.1008c048
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
mov al, byte [edi + 0x21]
test al, al
jl 0x1008c1e4
movsx eax, al
jmp 0x1008c1eb
mov eax, ebx
call fcn.10068c05
push eax
mov eax, dword [ebp - 4]
call fcn.10068bc5
mov dword [esp], str.BEGIN_EXCLUSIVE_
push edi
call fcn.1008c048
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push 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
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push edi
call fcn.1008c093
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
push 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_
push edi
call fcn.1008c048
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
and dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 8]
movzx eax, byte [eax + 0x10103eb4]
push eax
push ebx
call fcn.1006cce3
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1008c36e
mov eax, dword [ebp - 8]
movzx ecx, byte [eax + 0x10103eb5]
add ecx, dword [ebp - 0x14]
movzx eax, byte [eax + 0x10103eb4]
push ecx
push eax
mov eax, dword [ebp - 4]
call fcn.1006cd88
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1008c36e
add dword [ebp - 8], 2
cmp dword [ebp - 8], 8
jl 0x1008c2b1
mov eax, dword [ebp - 4]
call fcn.1006e00c
mov esi, eax
test esi, esi
jne 0x1008c36e
mov esi, dword [ebp - 4]
mov eax, esi
call fcn.10067625
push 0
mov eax, esi
call fcn.10069570
pop ecx
mov dword [ebp - 8], eax
test eax, eax
jne 0x1008c336
push esi
call fcn.100695c4
pop ecx
mov dword [ebp - 8], eax
call fcn.1006769d
mov esi, dword [ebp - 8]
test esi, esi
jne 0x1008c36e
mov esi, dword [ebp - 4]
mov eax, esi
call fcn.10068c05
push eax
mov eax, ebx
call fcn.10068bc5
mov eax, dword [esi + 4]
movzx eax, word [eax + 0x16]
pop ecx
push dword [ebp - 0xc]
push ebx
call fcn.10068b48
pop ecx
pop ecx
mov esi, eax
jmp 0x1008c36e
push 7
pop esi
mov eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 0x10]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x44], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x48], eax
mov byte [edi + 0x1c], 1
test ebx, ebx
je 0x1008c39c
push dword [ebx + 4]
call fcn.10068a13
and dword [ebx + 4], 0
and dword [ebx + 0x14], 0
pop ecx
xor eax, eax
mov ebx, edi
call fcn.1007bd04
mov eax, esi
pop esi
pop ebx
leave
ret