Function at 0x56e6f0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x20
push ebp
mov ebp, dword [esp + 0x28]
xor ecx, ecx
cmp byte [ebp + 0x1c], cl
push edi
mov edi, eax
mov dword [esp + 0x10], ecx
jne 0x56e720
push str.cannot_VACUUM_from_within_a_transaction
mov eax, ebp
call fcn.0054ae70
add esp, 4
pop edi
mov eax, 1
pop ebp
add esp, 0x20
ret
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x3c]
mov dword [esp + 0x18], eax
and eax, 0xfaffffff
or eax, 0x10050000
cmp byte [ebp + 0x1d], 2
mov dword [esp + 0x1c], edx
mov edx, dword [ebp + 0x40]
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x20], edx
mov edx, dword [ebp + 0x94]
mov dword [ebp + 0x94], ecx
mov eax, dword [eax + 4]
mov ecx, dword [eax + 4]
mov dword [esp + 0x24], edx
mov edx, dword [ecx]
mov dword [esp + 0x2c], eax
movzx eax, byte [edx + 0xd]
push ebx
mov ebx, dword [ebp + 4]
mov dword [esp + 0x18], eax
push esi
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x56e77e
mov eax, str.ATTACH__AS_vacuum_db_
push edi
mov esi, ebp
call fcn.0056e4a0
mov esi, eax
mov eax, dword [ebp + 4]
add esp, 4
cmp eax, ebx
jle 0x56e7a2
mov edx, dword [ebp + 8]
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + edx - 0x10]
mov dword [esp + 0x18], ecx
test esi, esi
jne 0x56e9c7
mov edx, dword [ebp + 8]
shl eax, 4
mov ebx, dword [eax + edx - 0xc]
mov eax, ebx
mov dword [esp + 0x10], ebx
call fcn.0055cba0
mov esi, dword [esp + 0x34]
mov eax, esi
call fcn.00536900
mov ecx, eax
mov eax, dword [esi + 4]
mov edx, dword [eax]
cmp byte [edx + 5], 5
mov dword [esp + 0x14], ecx
jne 0x56e7e2
mov dword [ebp + 0x24], 0
mov eax, dword [esi + 4]
mov eax, dword [eax + 0x20]
push 0
push ecx
push ebx
call fcn.0053f1f0
add esp, 0xc
test eax, eax
jne 0x56e9c2
cmp dword [esp + 0x1c], eax
jne 0x56e81c
mov ecx, dword [esp + 0x14]
push eax
mov eax, dword [ebp + 0x24]
push ecx
push ebx
call fcn.0053f1f0
add esp, 0xc
test eax, eax
jne 0x56e9c2
cmp byte [ebp + 0x1e], 0
jne 0x56e9c2
push edi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
mov esi, ebp
call fcn.0056e4a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x56e9c7
mov al, byte [ebp + 0x20]
test al, al
jl 0x56e84c
movsx eax, al
jmp 0x56e855
mov eax, dword [esp + 0x34]
call fcn.00536a60
push eax
mov eax, ebx
call fcn.005369f0
push edi
mov eax, str.BEGIN_EXCLUSIVE_
mov esi, ebp
call fcn.0056e4a0
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
call fcn.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, 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.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
push ebp
mov eax, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
call fcn.0056e530
mov esi, eax
add esp, 8
test esi, esi
jne 0x56e9c7
push edi
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 esi, ebp
call fcn.0056e4a0
mov esi, eax
add esp, 4
test esi, esi
jne 0x56e9c7
xor edi, edi
lea esp, [esp]
movzx eax, byte [edi + 0x5f9938]
lea edx, [esp + 0x1c]
push edx
push eax
mov eax, dword [esp + 0x3c]
call fcn.00536e20
movzx ecx, byte [edi + 0x5f9939]
add ecx, dword [esp + 0x24]
movzx ebx, byte [edi + 0x5f9938]
mov eax, dword [esp + 0x18]
push ecx
call fcn.005533a0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x56e9c7
add edi, 2
cmp edi, 8
jl 0x56e930
mov ebx, dword [esp + 0x34]
mov edi, dword [esp + 0x10]
push ebx
mov esi, edi
call fcn.00563a00
mov esi, eax
add esp, 4
test esi, esi
jne 0x56e9c7
mov eax, edi
call fcn.0055cba0
mov esi, eax
test esi, esi
jne 0x56e9c7
mov eax, edi
call fcn.00536a60
push eax
mov eax, ebx
call fcn.005369f0
mov ecx, dword [esp + 0x18]
mov edx, dword [edi + 4]
mov eax, dword [edx + 0x20]
push 1
push ecx
push ebx
call fcn.0053f1f0
add esp, 0x10
mov esi, eax
jmp 0x56e9c7
mov esi, 7
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
mov dword [ebp + 0x3c], eax
mov eax, dword [esp + 0x34]
push 1
mov dword [ebp + 0xc], edx
mov edx, dword [esp + 0x30]
push 0xffffffffffffffff
push eax
or eax, 0xffffffff
mov dword [ebp + 0x40], ecx
mov dword [ebp + 0x94], edx
call fcn.0053f1f0
mov edi, dword [esp + 0x24]
xor ebx, ebx
add esp, 0xc
cmp edi, ebx
mov byte [ebp + 0x1c], 1
je 0x56ea16
mov eax, dword [edi + 4]
call fcn.005606f0
mov dword [edi + 4], ebx
mov dword [edi + 0xc], ebx
push ebx
mov ebx, ebp
call fcn.0054ed00
add esp, 4
mov eax, esi
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x20
ret