Function at 0x4c4f1c
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [esi + 0xc]
mov ecx, dword [esi + 0x3c]
and dword [ebp - 0x10], 0
mov dword [ebp - 0x1c], eax
or eax, 0x2800
mov dword [esi + 0xc], eax
mov eax, dword [esi + 8]
push ebx
push edi
mov edi, dword [eax + 4]
mov eax, dword [edi + 4]
mov eax, dword [eax]
movzx eax, byte [eax + 0xd]
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x40]
push str.ATTACH__AS_vacuum_db_
push esi
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0xc], eax
call fcn.004c4e75
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
shl eax, 4
add eax, ecx
lea ecx, [eax - 0x10]
mov eax, dword [eax - 0xc]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 8], eax
call fcn.0049fe4c
mov eax, dword [edi + 4]
movzx ecx, word [eax + 0x16]
movzx ebx, word [eax + 0x14]
sub ebx, ecx
mov eax, edi
mov dword [ebp - 0x18], ebx
call fcn.0049feb0
mov eax, dword [edi + 4]
movzx eax, word [eax + 0x14]
push 0
push ebx
push dword [ebp - 8]
call fcn.004a13ba
add esp, 0xc
test eax, eax
jne 0x4c516b
cmp dword [ebp - 0xc], eax
jne 0x4c4fd9
push eax
mov eax, dword [esi + 0x24]
push ebx
push dword [ebp - 8]
call fcn.004a13ba
add esp, 0xc
test eax, eax
jne 0x4c516b
cmp byte [esi + 0x1e], 0
jne 0x4c516b
push str.PRAGMA_vacuum_db.synchronousOFF
push esi
call fcn.004c4e75
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
mov al, byte [esi + 0x21]
test al, al
jl 0x4c5007
movsx eax, al
jmp 0x4c500e
mov eax, edi
call fcn.004a149c
push eax
mov eax, dword [ebp - 8]
call fcn.004a144e
mov dword [esp], str.BEGIN_EXCLUSIVE_
push esi
call fcn.004c4e75
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name____FROM_sqlite_master_WHERE_type__table_AND_name_sqlite_sequence___AND_rootpage_0
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM___quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push esi
call fcn.004c4ebb
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
push str.INSERT_INTO_vacuum_db.sqlite_master___SELECT_type__name__tbl_name__rootpage__sql____FROM_sqlite_master___WHERE_typeview_OR_typetrigger______OR__typetable_AND_rootpage0_
push esi
call fcn.004c4e75
pop ecx
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
xor ebx, ebx
mov dword [ebp - 0xc], ebx
jmp 0x4c50e3
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 0x14]
push eax
movzx eax, byte [ebx + 0x5385d0]
push eax
mov eax, edi
call fcn.004a4fc5
movzx eax, byte [ebx + 0x5385d1]
add eax, dword [ebp - 0x14]
push eax
movzx eax, byte [ebx + 0x5385d0]
mov ebx, dword [ebp - 8]
push eax
call fcn.004a4ff3
add esp, 0x10
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 8
jl 0x4c50e0
push edi
call fcn.004a61b6
pop ecx
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
mov eax, ebx
call fcn.004a1fa7
mov dword [ebp - 4], eax
test eax, eax
jne 0x4c5172
mov eax, ebx
call fcn.004a149c
push eax
mov eax, edi
call fcn.004a144e
mov eax, dword [ebx + 4]
movzx eax, word [eax + 0x14]
pop ecx
push 1
push dword [ebp - 0x18]
push edi
call fcn.004a13ba
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x4c5172
mov dword [ebp - 4], 7
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x10]
mov dword [esi + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x3c], eax
mov eax, dword [ebp - 0x24]
mov dword [esi + 0x40], eax
mov byte [esi + 0x1c], 1
test edi, edi
je 0x4c519f
mov eax, dword [edi + 4]
call fcn.004a1288
and dword [edi + 4], 0
and dword [edi + 0xc], 0
xor eax, eax
mov ebx, esi
call fcn.004b50ad
mov eax, dword [ebp - 4]
pop edi
pop ebx
leave
ret