Function at 0x54b55c
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 + 0x36], 0
jne 0x54b587
push str.cannot_VACUUM_from_within_a_transaction
push edi
mov edi, dword [ebp + 8]
call fcn.005313d1
pop ecx
xor eax, eax
pop ecx
inc eax
jmp 0x54b89f
cmp dword [edi + 0x84], 1
jle 0x54b597
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x54b574
mov eax, dword [edi + 0x18]
mov ecx, dword [edi + 0x48]
mov dword [ebp - 0x1c], eax
and eax, 0xfffaffff
or eax, 0x100500
mov dword [ebp - 0x20], ecx
mov ecx, dword [edi + 0x4c]
mov dword [edi + 0x18], eax
mov eax, dword [edi + 0x10]
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.00520fdb
call fcn.0051fd0e
mov ebx, dword [edi + 0x14]
mov ecx, edi
mov dword [ebp - 0xc], eax
call fcn.00524f90
test eax, eax
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jne 0x54b5f6
mov eax, str.ATTACH__AS_vacuum_db_
push eax
mov eax, dword [ebp + 8]
mov esi, edi
call fcn.0054b497
mov esi, eax
mov eax, dword [edi + 0x14]
cmp eax, ebx
pop ecx
jle 0x54b61a
mov edx, dword [edi + 0x10]
mov ecx, eax
shl ecx, 4
lea ecx, [ecx + edx - 0x10]
mov dword [ebp - 0x14], ecx
test esi, esi
jne 0x54b84c
mov ecx, dword [edi + 0x10]
shl eax, 4
mov eax, dword [eax + ecx - 0xc]
mov dword [ebp - 8], eax
call fcn.005457c4
mov eax, dword [ebp - 4]
call fcn.00520be9
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x10], eax
push str.PRAGMA_vacuum_db.synchronousOFF
mov eax, ebx
mov esi, edi
call fcn.0054b497
mov esi, eax
pop ecx
test esi, esi
jne 0x54b84c
push str.BEGIN_
mov eax, ebx
mov esi, edi
call fcn.0054b497
mov esi, eax
pop ecx
test esi, esi
jne 0x54b84c
push 2
push dword [ebp - 4]
call fcn.00545242
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
mov eax, dword [ebp - 4]
call fcn.00520fdb
call fcn.0051fd48
cmp eax, 5
jne 0x54b69f
and dword [edi + 0x40], esi
mov eax, dword [ebp - 4]
push 0
push dword [ebp - 0x10]
call fcn.00520be2
push dword [ebp - 8]
call fcn.0052798e
add esp, 0xc
test eax, eax
jne 0x54b849
cmp dword [ebp - 0xc], eax
jne 0x54b6de
push eax
push dword [ebp - 0x10]
mov eax, dword [edi + 0x40]
push dword [ebp - 8]
call fcn.0052798e
add esp, 0xc
test eax, eax
jne 0x54b849
cmp byte [edi + 0x38], 0
jne 0x54b849
mov al, byte [edi + 0x3a]
test al, al
jl 0x54b6f4
movsx eax, al
jmp 0x54b6fc
mov eax, dword [ebp - 4]
call fcn.00520cc3
push eax
mov eax, dword [ebp - 8]
call fcn.00520c76
mov dword [esp], 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.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
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.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
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.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
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.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
push str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
push ebx
mov eax, edi
call fcn.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
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.0054b4ee
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x54b84c
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.0054b497
mov esi, eax
pop ecx
test esi, esi
jne 0x54b84c
mov dword [ebp - 0xc], esi
jmp 0x54b7be
mov esi, dword [ebp - 0xc]
lea eax, [ebp - 0x18]
push eax
movzx eax, byte [esi + 0x614e9c]
push eax
mov eax, dword [ebp - 4]
call fcn.00520fad
movzx eax, byte [esi + 0x614e9d]
add eax, dword [ebp - 0x18]
mov ebx, dword [ebp - 8]
push eax
movzx eax, byte [esi + 0x614e9c]
push eax
call fcn.00537339
mov esi, eax
add esp, 0x10
test esi, esi
jne 0x54b84c
add dword [ebp - 0xc], 2
cmp dword [ebp - 0xc], 8
jl 0x54b7bb
mov esi, ebx
mov ebx, dword [ebp - 4]
call fcn.005498e8
mov esi, eax
test esi, esi
jne 0x54b84c
mov eax, dword [ebp - 8]
call fcn.005457c4
mov esi, eax
test esi, esi
jne 0x54b84c
mov eax, dword [ebp - 8]
call fcn.00520cc3
push eax
mov eax, ebx
call fcn.00520c76
mov eax, dword [ebp - 8]
pop ecx
push 1
push dword [ebp - 0x10]
call fcn.00520be2
push ebx
call fcn.0052798e
add esp, 0xc
mov esi, eax
jmp 0x54b84c
push 7
pop esi
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 0x48], eax
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x4c], eax
mov eax, dword [ebp - 0x28]
mov dword [edi + 0x98], eax
push 1
or eax, 0xffffffff
push eax
push dword [ebp - 4]
call fcn.0052798e
mov ebx, dword [ebp - 0x14]
add esp, 0xc
mov byte [edi + 0x36], 1
test ebx, ebx
je 0x54b894
push dword [ebx + 4]
call fcn.00547df8
and dword [ebx + 4], 0
and dword [ebx + 0xc], 0
pop ecx
mov eax, edi
call fcn.00533ca4
mov eax, esi
pop esi
pop ebx
pop edi
leave
ret