Function at 0x4c4fe7
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
and dword [ebp - 0x14], 0
push edi
mov edi, eax
cmp byte [edi + 0x1c], 0
jne 0x4c5012
push str.cannot_VACUUM_from_within_a_transaction
push edi
mov edi, dword [ebp + 8]
call fcn.004a71d0
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x4c5315
cmp dword [edi + 0x8c], 1
jle 0x4c5022
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4c4fff
mov eax, dword [edi + 0xc]
mov ecx, dword [edi + 0x3c]
mov dword [ebp - 0x1c], eax
and eax, 0xfaffffff
or eax, 0x10050000
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi + 0x40]
mov dword [edi + 0xc], eax
mov eax, dword [edi + 8]
mov dword [ebp - 0x24], ecx
mov ecx, dword [edi + 0x98]
and dword [edi + 0x98], 0
mov eax, dword [eax + 4]
push ebx
push esi
mov dword [ebp - 0x28], ecx
mov dword [ebp - 4], eax
call fcn.0049c590
call fcn.0049b3ee
mov ebx, dword [edi + 4]
mov ecx, edi
mov dword [ebp - 0xc], eax
call fcn.0049ffaf
test eax, eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jne 0x4c5081
mov eax, str.ATTACH__AS_vacuum_db_
push eax
mov eax, dword [ebp + 8]
mov esi, edi
call fcn.004c4f22
mov esi, eax
mov eax, dword [edi + 4]
cmp eax, ebx
pop ecx
jle 0x4c50a5
mov edx, dword [edi + 8]
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 0x14], ecx
xor ebx, ebx
cmp esi, ebx
jne 0x4c52bf
mov ecx, dword [edi + 8]
shl eax, 4
mov esi, dword [eax + ecx - 0xc]
mov eax, esi
mov dword [ebp - 8], esi
call fcn.004be35e
mov eax, dword [ebp - 4]
call fcn.0049c208
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
call fcn.0049c590
call fcn.0049b434
cmp eax, 5
jne 0x4c50e3
mov dword [edi + 0x24], ebx
mov eax, dword [ebp - 4]
push ebx
push dword [ebp - 0x10]
call fcn.0049c201
push esi
call fcn.004a2e08
add esp, 0xc
test eax, eax
jne 0x4c52bc
cmp dword [ebp - 0xc], ebx
jne 0x4c511d
mov eax, dword [edi + 0x24]
push ebx
push dword [ebp - 0x10]
push esi
call fcn.004a2e08
add esp, 0xc
test eax, eax
jne 0x4c52bc
cmp byte [edi + 0x1e], bl
jne 0x4c52bc
mov ebx, dword [ebp + 8]
push str.PRAGMA_vacuum_db.synchronousOFF
mov eax, ebx
mov esi, edi
call fcn.004c4f22
mov esi, eax
pop ecx
test esi, esi
jne 0x4c52bf
mov al, byte [edi + 0x20]
test al, al
jl 0x4c514e
movsx eax, al
jmp 0x4c5156
mov eax, dword [ebp - 4]
call fcn.0049c2cb
push eax
mov eax, dword [ebp - 8]
call fcn.0049c27d
mov eax, ebx
mov esi, edi
mov dword [esp], str.BEGIN_EXCLUSIVE_
call fcn.004c4f22
mov esi, eax
pop ecx
test esi, esi
jne 0x4c52bf
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push 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
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push ebx
mov eax, edi
call fcn.004c4f79
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x4c52bf
push 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 eax, ebx
mov esi, edi
call fcn.004c4f22
mov esi, eax
pop ecx
test esi, esi
jne 0x4c52bf
mov dword [ebp - 0xc], esi
jmp 0x4c5231
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push eax
movzx eax, byte [esi + 0x4ff4f8]
push eax
mov eax, dword [ebp - 4]
call fcn.0049c562
movzx eax, byte [esi + 0x4ff4f9]
add eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 8]
push eax
movzx eax, byte [esi + 0x4ff4f8]
push eax
call fcn.004b9418
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x4c52bf
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 8
jl 0x4c522e
mov esi, ebx
mov ebx, dword [ebp - 4]
call fcn.004bfe05
mov esi, eax
test esi, esi
jne 0x4c52bf
mov eax, dword [ebp - 8]
call fcn.004be35e
mov esi, eax
test esi, esi
jne 0x4c52bf
mov eax, dword [ebp - 8]
call fcn.0049c2cb
push eax
mov eax, ebx
call fcn.0049c27d
mov eax, dword [ebp - 8]
pop ecx
push 1
push dword [ebp - 0x10]
call fcn.0049c201
push ebx
call fcn.004a2e08
add esp, 0xc
mov esi, eax
jmp 0x4c52bf
push 7
pop esi
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x3c], eax
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x40], eax
mov eax, dword [ebp - 0x28]
mov dword [edi + 0x98], eax
push 1
or eax, 0xffffffff
push eax
push dword [ebp - 4]
call fcn.004a2e08
mov ebx, dword [ebp - 0x14]
add esp, 0xc
mov byte [edi + 0x1c], 1
test ebx, ebx
je 0x4c5307
push dword [ebx + 4]
call fcn.004c134c
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
pop ecx
push 0xffffffffffffffff
mov ebx, edi
call fcn.004abe92
pop ecx
mov eax, esi
pop esi
pop ebx
pop edi
leave
ret