Function at 0x588598
Capabilities:
Reference sql statements

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffcc
mov ebx, edx
mov edi, eax
xor eax, eax
mov dword [esp + 0x14], eax
cmp byte [ebx + 0x36], 0
jne 0x5885c8
push str.cannot_VACUUM_from_within_a_transaction
push ebx
push edi
call fcn.00596f9c
add esp, 0xc
mov eax, 1
jmp 0x58891b
cmp dword [ebx + 0x84], 1
jle 0x5885ea
push str.cannot_VACUUM___SQL_statements_in_progress
push ebx
push edi
call fcn.00596f9c
add esp, 0xc
mov eax, 1
jmp 0x58891b
mov edx, dword [ebx + 0x18]
mov dword [esp + 4], edx
mov ecx, dword [ebx + 0x48]
mov dword [esp + 8], ecx
mov ecx, dword [ebx + 0x4c]
mov dword [esp + 0xc], ecx
mov eax, dword [ebx + 0x98]
mov dword [esp + 0x10], eax
or dword [ebx + 0x18], 0x100500
and dword [ebx + 0x18], 0xfffaffff
xor edx, edx
mov dword [ebx + 0x98], edx
mov ecx, dword [ebx + 0x10]
mov ebp, dword [ecx + 4]
mov eax, ebp
call fcn.0057c57c
call fcn.0058eb08
mov dword [esp + 0x18], eax
mov eax, ebx
mov edx, dword [ebx + 0x14]
mov dword [esp + 0x20], edx
call fcn.0056501c
test eax, eax
je 0x58864e
mov eax, str.ATTACH_:memory:_AS_vacuum_db_
jmp 0x588653
mov eax, str.ATTACH__AS_vacuum_db_
mov ecx, eax
mov edx, edi
mov eax, ebx
call fcn.005884a8
mov esi, eax
mov eax, dword [ebx + 0x14]
cmp eax, dword [esp + 0x20]
jle 0x588678
mov edx, eax
shl edx, 4
add edx, dword [ebx + 0x10]
add edx, 0xfffffff0
mov dword [esp + 0x14], edx
test esi, esi
jne 0x5888bb
shl eax, 4
mov ecx, dword [ebx + 0x10]
mov ecx, dword [ecx + eax - 0xc]
mov dword [esp], ecx
mov eax, dword [esp]
call fcn.005785b8
mov eax, ebp
call fcn.005776ec
mov dword [esp + 0x1c], eax
cmp dword [ebx + 0x40], 0
je 0x5886c4
lea edx, [esp + 0x24]
mov eax, ebx
push edx
xor edx, edx
lea ecx, [esp + 0x2c]
call fcn.0056775c
cmp dword [esp + 0x24], 0
je 0x5886c4
xor ecx, ecx
mov dword [ebx + 0x40], ecx
mov ecx, str.PRAGMA_vacuum_db.synchronousOFF
mov edx, edi
mov eax, ebx
call fcn.005884a8
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, str.BEGIN_
mov edx, edi
mov eax, ebx
call fcn.005884a8
mov esi, eax
test esi, esi
jne 0x5888bb
mov edx, 2
mov eax, ebp
call fcn.00577bdc
mov esi, eax
test esi, esi
jne 0x5888bb
mov eax, ebp
call fcn.0057c57c
call fcn.0058efc8
cmp eax, 5
jne 0x588720
xor edx, edx
mov dword [ebx + 0x40], edx
push 0
mov eax, ebp
call fcn.005776d8
mov edx, eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 4]
call fcn.00577644
test eax, eax
jne 0x58875f
cmp dword [esp + 0x18], 0
jne 0x588759
push 0
mov ecx, dword [esp + 0x20]
mov edx, dword [ebx + 0x40]
mov eax, dword [esp + 4]
call fcn.00577644
test eax, eax
jne 0x58875f
cmp byte [ebx + 0x38], 0
je 0x588769
mov esi, 7
jmp 0x5888bb
cmp byte [ebx + 0x3a], 0
jl 0x588775
movsx edx, byte [ebx + 0x3a]
jmp 0x58877e
mov eax, ebp
call fcn.005777e4
mov edx, eax
mov eax, dword [esp]
call fcn.00577780
mov ecx, str.SELECT_CREATE_TABLE_vacuum_db.__substr_sql_14____FROM_sqlite_master_WHERE_typetable_AND_name_sqlite_sequence___AND_rootpage_0
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, str.SELECT_CREATE_INDEX_vacuum_db.__substr_sql_14___FROM_sqlite_master_WHERE_sql_LIKE_CREATE_INDEX__
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, str.SELECT_CREATE_UNIQUE_INDEX_vacuum_db.__substr_sql_21____FROM_sqlite_master_WHERE_sql_LIKE_CREATE_UNIQUE_INDEX__
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, 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
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, str.SELECT_DELETE_FROM_vacuum_db.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, str.SELECT_INSERT_INTO_vacuum_db.__quote_name____SELECT__FROM_main.__quote_name_____FROM_vacuum_db.sqlite_master_WHERE_namesqlite_sequence_
mov edx, edi
mov eax, ebx
call fcn.00588504
mov esi, eax
test esi, esi
jne 0x5888bb
mov ecx, 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 edx, edi
mov eax, ebx
call fcn.005884a8
mov esi, eax
test esi, esi
jne 0x5888bb
xor eax, eax
mov edi, 0x5c8efc
mov dword [esp + 0x30], eax
lea ecx, [esp + 0x2c]
xor edx, edx
mov dl, byte [edi]
mov eax, ebp
call fcn.0057c3c8
xor ecx, ecx
mov eax, dword [esp]
mov cl, byte [edi + 1]
add ecx, dword [esp + 0x2c]
xor edx, edx
mov dl, byte [edi]
call fcn.0057c400
mov esi, eax
test esi, esi
jne 0x5888bb
add dword [esp + 0x30], 2
add edi, 2
cmp dword [esp + 0x30], 8
jl 0x588839
mov edx, dword [esp]
mov eax, ebp
call fcn.00589288
mov esi, eax
test esi, esi
jne 0x5888bb
mov eax, dword [esp]
call fcn.005785b8
mov esi, eax
test esi, esi
jne 0x5888bb
mov eax, dword [esp]
call fcn.005777e4
mov edx, eax
mov eax, ebp
call fcn.00577780
push 1
mov eax, dword [esp + 4]
call fcn.005776d8
mov edx, eax
mov ecx, dword [esp + 0x20]
mov eax, ebp
call fcn.00577644
mov esi, eax
mov eax, dword [esp + 4]
mov dword [ebx + 0x18], eax
mov edx, dword [esp + 8]
mov dword [ebx + 0x48], edx
mov ecx, dword [esp + 0xc]
mov dword [ebx + 0x4c], ecx
mov ecx, dword [esp + 0x10]
mov dword [ebx + 0x98], ecx
push 1
or ecx, 0xffffffff
or edx, 0xffffffff
mov eax, ebp
call fcn.00577644
mov byte [ebx + 0x36], 1
cmp dword [esp + 0x14], 0
je 0x588912
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + 4]
call fcn.00577518
mov edx, dword [esp + 0x14]
xor eax, eax
mov dword [edx + 4], eax
mov edx, dword [esp + 0x14]
xor ecx, ecx
mov dword [edx + 0xc], ecx
mov eax, ebx
call fcn.0054f2e8
mov eax, esi
add esp, 0x34
pop ebp
pop edi
pop esi
pop ebx
ret