Function at 0x4b4690
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 0x4b46c1
mov esi, dword [ebp + 8]
push str.cannot_VACUUM_from_within_a_transaction
call fcn.004693e0
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 0x4b4714
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, dword [ebp + 8]
push ecx
push esi
call fcn.004b4340
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.00476a30
call fcn.00473660
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 0x4b477d
dec dword [ebx + 0xc]
jne 0x4b477d
mov eax, dword [eax + 0x30]
test eax, eax
je 0x4b4779
push eax
call dword [0x567f48]
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.00475770
add esp, 0xc
test eax, eax
jne 0x4b4959
cmp dword [ebp - 0x10], eax
jne 0x4b47b6
mov ecx, dword [esi + 0x24]
push eax
push edi
push ecx
call fcn.00475770
add esp, 0xc
test eax, eax
jne 0x4b4959
cmp byte [esi + 0x1e], 0
jne 0x4b4959
mov edi, dword [ebp + 8]
push edi
push esi
mov eax, str.PRAGMA_vacuum_db.synchronousOFF
call fcn.004b4340
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
mov al, byte [esi + 0x21]
test al, al
js 0x4b47e8
movsx eax, al
jmp 0x4b47f0
mov eax, dword [ebp - 8]
call fcn.00475960
push eax
mov eax, dword [ebp - 4]
call fcn.004758e0
add esp, 4
push edi
push esi
mov eax, str.BEGIN_EXCLUSIVE_
call fcn.004b4340
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
push edi
push esi
mov eax, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
call fcn.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b43f0
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
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.004b4340
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b495e
xor edi, edi
movzx eax, byte [edi + 0x53c2b8]
lea edx, [ebp - 0x10]
push edx
push eax
mov eax, dword [ebp - 8]
call fcn.0047b050
movzx ecx, byte [edi + 0x53c2b9]
add ecx, dword [ebp - 0x10]
movzx edx, byte [edi + 0x53c2b8]
mov eax, dword [ebp - 4]
push ecx
push edx
call fcn.0047b0c0
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x4b495e
add edi, 2
cmp edi, 8
jl 0x4b48c6
mov eax, dword [ebp - 8]
mov edi, dword [ebp - 4]
push eax
mov ebx, edi
call fcn.0047d140
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4b495e
mov eax, edi
call fcn.00476a30
mov ebx, eax
test ebx, ebx
jne 0x4b495e
mov eax, edi
call fcn.00475960
mov ebx, dword [ebp - 8]
push eax
mov eax, ebx
call fcn.004758e0
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.00475770
add esp, 0xc
mov ebx, eax
jmp 0x4b495e
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 0x4b4994
mov eax, dword [edi + 4]
call fcn.00475540
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 0xc], eax
push 0
mov eax, esi
call fcn.00495120
add esp, 4
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret