Function at 0x4dd494
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffc8
xor eax, eax
push ebx
push esi
push edi
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
cmp byte [ebx + 0x3e], 0
jne 0x4dd4c7
push str.cannot_VACUUM_from_within_a_transaction
push ebx
push edi
call fcn.00499834
add esp, 0xc
mov eax, 1
jmp 0x4dd854
cmp dword [ebx + 0x8c], 1
jle 0x4dd4e9
push str.cannot_VACUUM___SQL_statements_in_progress
push ebx
push edi
call fcn.00499834
add esp, 0xc
mov eax, 1
jmp 0x4dd854
mov edx, dword [ebx + 0x18]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebx + 0x50]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebx + 0x54]
mov dword [ebp - 0x14], ecx
mov eax, dword [ebx + 0xa0]
mov dword [ebp - 0x18], eax
or dword [ebx + 0x18], 0x100500
and dword [ebx + 0x18], 0xfffaffff
xor edx, edx
mov dword [ebx + 0xa0], edx
mov ecx, dword [ebx + 0x10]
mov eax, dword [ecx + 4]
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.004ae894
pop ecx
push eax
call fcn.004a4b20
pop ecx
mov dword [ebp - 0x20], eax
mov ecx, dword [ebx + 0x14]
mov dword [ebp - 0x28], ecx
push ebx
call fcn.004e961c
pop ecx
test eax, eax
je 0x4dd54f
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jmp 0x4dd554
mov eax, str.ATTACH__AS_vacuum_db_
push eax
push edi
push ebx
call fcn.004dd374
add esp, 0xc
mov esi, eax
mov eax, dword [ebx + 0x14]
cmp eax, dword [ebp - 0x28]
jle 0x4dd577
mov edx, eax
shl edx, 4
add edx, dword [ebx + 0x10]
add edx, 0xfffffff0
mov dword [ebp - 0x1c], edx
test esi, esi
jne 0x4dd7f7
shl eax, 4
mov ecx, dword [ebx + 0x10]
mov ecx, dword [ecx + eax - 0xc]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
push eax
call fcn.004aa4d4
pop ecx
mov edx, dword [ebp - 4]
push edx
call fcn.004a9460
pop ecx
mov dword [ebp - 0x24], eax
cmp dword [ebx + 0x48], 0
je 0x4dd5c7
lea ecx, [ebp - 0x2c]
push ecx
lea eax, [ebp - 0x30]
push eax
push 0
push ebx
call fcn.004ffd44
add esp, 0x10
cmp dword [ebp - 0x2c], 0
je 0x4dd5c7
xor edx, edx
mov dword [ebx + 0x48], edx
push str.PRAGMA_vacuum_db.synchronousOFF
push edi
push ebx
call fcn.004dd374
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push str.BEGIN_
push edi
push ebx
call fcn.004dd374
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push 2
mov eax, dword [ebp - 4]
push eax
call fcn.004a99b8
add esp, 8
mov esi, eax
test esi, esi
jne 0x4dd7f7
mov eax, dword [ebp - 4]
push eax
call fcn.004ae894
pop ecx
push eax
call fcn.004a5070
pop ecx
cmp eax, 5
jne 0x4dd62c
xor edx, edx
mov dword [ebx + 0x48], edx
push 0
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 4]
push ecx
call fcn.004a943c
pop ecx
push eax
mov eax, dword [ebp - 8]
push eax
call fcn.004a93a8
add esp, 0x10
test eax, eax
jne 0x4dd673
cmp dword [ebp - 0x20], 0
jne 0x4dd66d
push 0
mov edx, dword [ebp - 0x24]
push edx
mov ecx, dword [ebx + 0x48]
push ecx
mov eax, dword [ebp - 8]
push eax
call fcn.004a93a8
add esp, 0x10
test eax, eax
jne 0x4dd673
cmp byte [ebx + 0x40], 0
je 0x4dd67d
mov esi, 7
jmp 0x4dd7f7
cmp byte [ebx + 0x42], 0
jl 0x4dd689
movsx eax, byte [ebx + 0x42]
jmp 0x4dd693
mov edx, dword [ebp - 4]
push edx
call fcn.004a9578
pop ecx
push eax
mov ecx, dword [ebp - 8]
push ecx
call fcn.004a9508
add esp, 8
push str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
push edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
push edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
push edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
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 edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
push str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
push edi
push ebx
call fcn.004dd3e0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
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_
push edi
push ebx
call fcn.004dd374
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
xor eax, eax
mov edi, 0x519bc7
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x34]
push eax
xor edx, edx
mov dl, byte [edi]
push edx
mov ecx, dword [ebp - 4]
push ecx
call fcn.004ae6d4
add esp, 0xc
xor ecx, ecx
mov cl, byte [edi + 1]
add ecx, dword [ebp - 0x34]
push ecx
xor eax, eax
mov al, byte [edi]
push eax
mov edx, dword [ebp - 8]
push edx
call fcn.004ae70c
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x4dd7f7
add dword [ebp - 0x38], 2
add edi, 2
cmp dword [ebp - 0x38], 0xa
jl 0x4dd759
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
call fcn.004b02dc
add esp, 8
mov esi, eax
test esi, esi
jne 0x4dd7f7
mov eax, dword [ebp - 8]
push eax
call fcn.004aa4d4
pop ecx
mov esi, eax
test esi, esi
jne 0x4dd7f7
mov eax, dword [ebp - 8]
push eax
call fcn.004a9578
pop ecx
push eax
mov edx, dword [ebp - 4]
push edx
call fcn.004a9508
add esp, 8
push 1
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp - 8]
push ecx
call fcn.004a943c
pop ecx
push eax
mov eax, dword [ebp - 4]
push eax
call fcn.004a93a8
add esp, 0x10
mov esi, eax
mov eax, dword [ebp - 0xc]
mov dword [ebx + 0x18], eax
mov edx, dword [ebp - 0x10]
mov dword [ebx + 0x50], edx
mov ecx, dword [ebp - 0x14]
mov dword [ebx + 0x54], ecx
mov ecx, dword [ebp - 0x18]
mov dword [ebx + 0xa0], ecx
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, dword [ebp - 4]
push eax
call fcn.004a93a8
add esp, 0x10
mov byte [ebx + 0x3e], 1
cmp dword [ebp - 0x1c], 0
je 0x4dd84b
mov edx, dword [ebp - 0x1c]
mov ecx, dword [edx + 4]
push ecx
call fcn.004a9230
pop ecx
mov eax, dword [ebp - 0x1c]
xor edx, edx
mov dword [eax + 4], edx
mov ecx, dword [ebp - 0x1c]
xor eax, eax
mov dword [ecx + 0xc], eax
push ebx
call fcn.004c67b4
pop ecx
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret