Function at 0x5bd7b0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x14]
push ebp
push esi
mov eax, dword [ebx + 8]
push edi
mov ecx, eax
or ah, 8
mov dword [ebx + 8], eax
mov al, byte [ebx + 0x11]
and ecx, 0x800
mov dword [esp + 0x10], 0
test al, al
mov dword [esp + 0x14], ecx
jne 0x5bd7fd
mov eax, dword [esp + 0x1c]
push 0
push str.cannot_VACUUM_from_within_a_transaction
push eax
call fcn.005a76e0
add esp, 0xc
mov esi, 1
jmp 0x5bda79
mov ecx, dword [ebx + 4]
mov eax, dword [ecx + 4]
push eax
mov dword [esp + 0x20], eax
call fcn.005b8ec0
mov esi, eax
add esp, 4
cmp byte [esi], 0
jne 0x5bd821
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea edx, [ebp + 0x64]
push edx
call fcn.005a7570
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x10], edx
jne 0x5bd84f
mov esi, 7
jmp 0x5bda79
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [edx + ebp + 1]
push esi
mov byte [edx + ebp], 0x2d
call fcn.005bdae0
mov ecx, dword [esp + 0x14]
push ecx
call fcn.005af2e0
mov edx, dword [esp + 0x18]
add esp, 8
test eax, eax
jne 0x5bd872
push edx
push str.ATTACH__q_AS_vacuum_db_
call fcn.005bbf60
mov edi, eax
add esp, 8
test edi, edi
jne 0x5bd8af
mov esi, 7
jmp 0x5bda79
push edi
push ebx
call fcn.005bdb20
push edi
mov esi, eax
call fcn.005a75f0
add esp, 0xc
test esi, esi
jne 0x5bda79
mov eax, dword [ebx]
mov edx, dword [ebx + 4]
mov ebp, dword [esp + 0x1c]
lea ecx, [eax*8]
push ebp
sub ecx, eax
shl ecx, 4
mov edi, dword [ecx + edx - 0x6c]
mov dword [esp + 0x24], edi
call fcn.005b3c70
add esp, 4
push eax
push ebp
call fcn.005b3c60
add esp, 4
push eax
push edi
call fcn.005b3bf0
push str.PRAGMA_vacuum_db.synchronousOFF
push ebx
call fcn.005bdb20
push ebp
call fcn.005b3cb0
push eax
push edi
call fcn.005b3c90
push str.BEGIN_
push ebx
call fcn.005bdb20
mov esi, eax
add esp, 0x28
test esi, esi
jne 0x5bda79
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14_100000000____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14_100000000___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21_100000000____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_CREATE_VIEW_vacuum_db.__substr_sql_13_100000000____FROM_sqlite_master_WHERE_typeview
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence_
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push str.SELECT_CREATE_TRIGGER__vacuum_db.__substr_sql__16__1000000__FROM_sqlite_master_WHERE_typetrigger
push ebx
call fcn.005bdb80
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push edi
call fcn.005b9030
add esp, 4
test eax, eax
je 0x5bda79
push 1
push ebp
call fcn.005b3cc0
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
xor edi, edi
xor ecx, ecx
lea eax, [esp + 0x1c]
mov cl, byte [edi + 0x61bd20]
push eax
push ecx
push ebp
call fcn.005b8360
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x5bda79
mov eax, dword [esp + 0x1c]
xor edx, edx
mov dl, byte [edi + 0x61bd21]
mov ecx, dword [esp + 0x20]
add edx, eax
xor eax, eax
mov al, byte [edi + 0x61bd20]
push edx
push eax
push ecx
call fcn.005b83b0
add edi, 2
add esp, 0xc
cmp edi, 8
jb 0x5bda10
mov edx, dword [esp + 0x20]
push edx
push ebp
call fcn.005b8ef0
mov esi, eax
add esp, 8
test esi, esi
jne 0x5bda79
push ebp
call fcn.005b4190
add esp, 4
mov esi, eax
mov eax, dword [ebx + 8]
mov ecx, dword [esp + 0x14]
and ah, 0xf7
push str.DETACH_vacuum_db_
or eax, ecx
mov byte [ebx + 0x11], 1
test esi, esi
mov dword [ebx + 8], eax
push ebx
jne 0x5bdaa2
call fcn.005bdb20
add esp, 8
mov esi, eax
jmp 0x5bdaaa
call fcn.005bdb20
add esp, 8
mov edi, dword [esp + 0x10]
test edi, edi
je 0x5bdac1
push edi
call fcn.005af2d0
push edi
call fcn.005a75f0
add esp, 8
push 0
push ebx
call fcn.005b04f0
add esp, 8
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret