Function at 0x1003b5d0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov eax, dword [edi + 8]
xor ebx, ebx
mov dword [esp + 0x18], eax
or eax, 0x2800
cmp byte [edi + 0x14], bl
mov dword [edi + 8], eax
jne 0x1003b60c
mov eax, dword [esp + 0x20]
push ebx
push str.cannot_VACUUM_from_within_a_transaction
push eax
call fcn.1000add0
add esp, 0xc
lea esi, [ebx + 1]
jmp 0x1003b7dd
mov ecx, dword [edi + 4]
mov ebp, dword [ecx + 4]
mov ecx, str.ATTACH__AS_vacuum_db_
mov eax, edi
mov dword [esp + 0x10], ebp
call fcn.1003b380
mov esi, eax
test esi, esi
jne 0x1003b7dd
mov eax, dword [edi]
lea edx, [eax + eax*2]
mov eax, dword [edi + 4]
mov ebx, dword [eax + edx*8 - 0x14]
lea eax, [eax + edx*8]
lea ecx, [eax - 0x18]
mov eax, dword [ebp + 4]
movzx edx, word [eax + 0x16]
mov dword [esp + 0x24], ecx
movzx ecx, word [eax + 0x14]
mov eax, ecx
sub eax, edx
push eax
push ecx
push ebx
call fcn.100119b0
add esp, 0xc
cmp dword [0x100593ac], esi
je 0x1003b676
cmp dword [0x100593b8], esi
jle 0x1003b676
mov esi, 7
jmp 0x1003b7d9
mov ecx, str.PRAGMA_vacuum_db.synchronousOFF
mov eax, edi
call fcn.1003b380
mov esi, eax
test esi, esi
jne 0x1003b7d9
mov ecx, dword [ebp + 4]
movzx edx, byte [ecx + 0x12]
push edx
push ebx
call fcn.10004f60
add esp, 8
mov ecx, str.BEGIN_EXCLUSIVE_
mov eax, edi
call fcn.1003b380
mov esi, eax
test esi, esi
jne 0x1003b7d9
push edi
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14_100000000____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push edi
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14_100000000___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push edi
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21_100000000____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push edi
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.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push edi
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push edi
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.1003b3d0
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
mov ecx, 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 eax, edi
call fcn.1003b380
mov esi, eax
test esi, esi
jne 0x1003b7d9
xor ebp, ebp
jmp 0x1003b760
movzx ecx, byte [ebp + 0x10050c78]
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
push eax
push ecx
push edx
call fcn.10021b70
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1003b7d9
movzx eax, byte [ebp + 0x10050c79]
add eax, dword [esp + 0x14]
movzx ecx, byte [ebp + 0x10050c78]
push eax
push ecx
push ebx
call fcn.10021bf0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1003b7d9
add ebp, 2
cmp ebp, 8
jb 0x1003b760
mov ebp, dword [esp + 0x10]
push ebx
push ebp
call fcn.1002d550
mov esi, eax
add esp, 8
test esi, esi
jne 0x1003b7d9
push ebx
call fcn.1002a970
mov esi, eax
add esp, 4
test esi, esi
jne 0x1003b7d9
push ebp
call fcn.1002a970
add esp, 4
mov esi, eax
mov ebx, dword [esp + 0x24]
mov edx, dword [esp + 0x18]
xor ebp, ebp
cmp ebx, ebp
mov dword [edi + 8], edx
mov byte [edi + 0x14], 1
je 0x1003b800
mov eax, dword [ebx + 4]
push eax
call fcn.1001e890
add esp, 4
mov dword [ebx + 4], ebp
mov dword [ebx + 0x14], ebp
push ebp
push edi
call fcn.1001a400
add esp, 8
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret