Function at 0x4b7a00
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
push ebx
push esi
xor ecx, ecx
mov esi, eax
push edi
mov dword [ebp - 0xc], ecx
cmp byte [esi + 0x1c], cl
jne 0x4b7a31
mov esi, dword [ebp + 8]
push str.cannot_VACUUM_from_within_a_transaction
call fcn.0046c760
mov eax, 1
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 0xc]
mov edx, dword [esi + 0x3c]
mov dword [ebp - 0x18], eax
and eax, 0xfaffffff
or eax, 0x50000
cmp byte [esi + 0x1d], 2
mov dword [ebp - 0x1c], edx
mov edx, dword [esi + 0x40]
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
mov dword [ebp - 0x20], edx
mov edx, dword [esi + 0x94]
mov dword [esi + 0x94], ecx
mov edi, dword [eax + 4]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x24], edx
mov edx, dword [ecx]
movzx eax, byte [edx + 0xd]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], edi
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
je 0x4b7a84
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, dword [ebp + 8]
push ecx
push esi
call fcn.004b76b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
mov edx, dword [esi + 4]
mov eax, dword [esi + 8]
add edx, edx
lea ecx, [eax + edx*8 - 0x10]
mov eax, dword [eax + edx*8 - 0xc]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], eax
call fcn.00479db0
call fcn.004769e0
mov ebx, edi
mov eax, dword [ebx + 4]
movzx edx, word [eax + 0x18]
movzx edi, word [eax + 0x16]
sub edi, edx
cmp byte [ebx + 9], 0
mov dword [ebp - 0x14], edi
je 0x4b7aed
dec dword [ebx + 0xc]
jne 0x4b7aed
mov eax, dword [eax + 0x30]
test eax, eax
je 0x4b7ae9
push eax
call dword [0x5bd698]
add esp, 4
mov byte [ebx + 0xa], 0
mov eax, dword [ebx + 4]
movzx eax, word [eax + 0x16]
mov ebx, dword [ebp - 4]
push 0
push edi
push eax
call fcn.00478af0
add esp, 0xc
test eax, eax
jne 0x4b7cc9
cmp dword [ebp - 0x10], eax
jne 0x4b7b26
mov ecx, dword [esi + 0x24]
push eax
push edi
push ecx
call fcn.00478af0
add esp, 0xc
test eax, eax
jne 0x4b7cc9
cmp byte [esi + 0x1e], 0
jne 0x4b7cc9
mov edi, dword [ebp + 8]
push edi
push esi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.004b76b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
mov al, byte [esi + 0x21]
test al, al
js 0x4b7b58
movsx eax, al
jmp 0x4b7b60
mov eax, dword [ebp - 8]
call fcn.00478ce0
push eax
mov eax, dword [ebp - 4]
call fcn.00478c60
add esp, 4
push edi
push esi
mov eax, str.BEGIN_EXCLUSIVE_
call fcn.004b76b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
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.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
mov eax, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
call fcn.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
mov eax, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
call fcn.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
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.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
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.004b7760
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
push edi
push esi
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_
call fcn.004b76b0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b7cce
xor edi, edi
movzx eax, byte [edi + 0x58ef10]
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ebp - 8]
call fcn.0047e3d0
movzx ecx, byte [edi + 0x58ef11]
add ecx, dword [ebp - 0x10]
movzx edx, byte [edi + 0x58ef10]
mov eax, dword [ebp - 4]
push ecx
push edx
call fcn.0047e440
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4b7cce
add edi, 2
cmp edi, 8
jl 0x4b7c36
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 4]
push eax
mov ebx, edi
call fcn.004804c0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4b7cce
mov eax, edi
call fcn.00479db0
mov ebx, eax
test ebx, ebx
jne 0x4b7cce
mov eax, edi
call fcn.00478ce0
mov ebx, dword [ebp - 8]
push eax
mov eax, ebx
call fcn.00478c60
mov ecx, dword [edi + 4]
movzx eax, word [ecx + 0x16]
mov edx, dword [ebp - 0x14]
add esp, 4
push 1
push edx
push eax
call fcn.00478af0
add esp, 0xc
mov ebx, eax
jmp 0x4b7cce
mov ebx, 7
mov eax, dword [ebp - 0x18]
mov edi, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x20]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x3c], ecx
mov dword [esi + 0x40], edx
mov dword [esi + 0x94], eax
mov byte [esi + 0x1c], 1
test edi, edi
je 0x4b7d04
mov eax, dword [edi + 4]
call fcn.004788c0
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 0xc], eax
push 0
mov eax, esi
call fcn.00498490
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret