Function at 0x48aa90
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x2c
cmp byte [esi + 0x47], 0
mov dword [esp + 0xc], 0
jne 0x48aabe
mov eax, dword [esp + 0x30]
push str.cannot_VACUUM_from_within_a_transaction
push eax
mov eax, esi
call fcn.004317a0
add esp, 8
mov eax, 1
add esp, 0x2c
ret
cmp dword [esi + 0xa4], 1
jle 0x48aae4
mov ecx, dword [esp + 0x30]
push str.cannot_VACUUM___SQL_statements_in_progress
push ecx
mov eax, esi
call fcn.004317a0
add esp, 8
mov eax, 1
add esp, 0x2c
ret
movzx edx, word [esi + 0x18]
mov ecx, dword [esi + 0x1c]
or dword [esi + 0x18], 6
mov dword [esp + 0x20], ecx
mov dword [esp + 0x1c], edx
mov edx, dword [esi + 0x5c]
and ecx, 0xffffaf7f
mov dword [esp + 0x24], edx
mov edx, dword [esi + 0x60]
or ecx, 0x201
mov dword [esi + 0x1c], ecx
mov ecx, dword [esi + 0x10]
shl eax, 4
push ebx
mov ebx, dword [esi + 0x14]
mov dword [esp + 0x2c], edx
mov dl, byte [esi + 0x50]
mov byte [esi + 0x50], 0
mov dword [esp + 0x14], eax
add eax, ecx
push ebp
mov ebp, dword [eax + 4]
mov byte [esp + 0xb], dl
mov edx, dword [eax]
mov eax, dword [ebp + 4]
mov ecx, dword [eax]
mov eax, dword [esp + 0x38]
push edi
mov dword [esp + 0x10], edx
movzx edx, byte [ecx + 0xc]
push str.ATTACHAS_vacuum_db
push eax
push esi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x30], ebx
call fcn.0048a910
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x48ad9b
mov eax, ebx
shl eax, 4
add eax, dword [esi + 0x10]
mov ebx, dword [eax + 4]
mov dword [esp + 0x18], eax
mov eax, ebx
call fcn.0046b920
mov eax, ebp
call fcn.0042ce10
mov ecx, dword [esi + 0x10]
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x14], eax
mov eax, dword [edx + ecx + 0xc]
mov ecx, dword [eax + 0x50]
push ecx
mov eax, ebx
call fcn.0042cd20
push edi
mov eax, ebp
call fcn.0042cd70
push eax
mov eax, ebx
call fcn.0042cd70
push 0x21
mov eax, ebx
call fcn.0042cdc0
mov edx, dword [esp + 0x4c]
push str.BEGIN
push edx
push esi
call fcn.0048a910
mov edi, eax
add esp, 0x1c
test edi, edi
jne 0x48ad9b
push 2
push ebp
call fcn.004703c0
mov edi, eax
add esp, 8
test edi, edi
jne 0x48ad9b
mov eax, dword [ebp + 4]
mov ecx, dword [eax]
cmp byte [ecx + 5], 5
jne 0x48abf8
mov dword [esi + 0x54], edi
mov edx, dword [ebp + 4]
mov eax, dword [edx + 0x20]
mov edi, dword [esp + 0x14]
push 0
push edi
push eax
mov eax, ebx
call fcn.0046d7c0
add esp, 0xc
test eax, eax
jne 0x48ad96
cmp dword [esp + 0x20], eax
jne 0x48ac36
push eax
mov eax, dword [esi + 0x54]
push edi
push eax
mov eax, ebx
call fcn.0046d7c0
add esp, 0xc
test eax, eax
jne 0x48ad96
cmp byte [esi + 0x49], 0
jne 0x48ad96
mov al, byte [esi + 0x4c]
test al, al
jl 0x48ac4c
movsx eax, al
jmp 0x48ac53
mov eax, ebp
call fcn.0042cf90
push eax
mov eax, ebx
call fcn.0042cf10
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x40]
mov cl, byte [esp + 0x28]
push edx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push eax
mov eax, esi
mov byte [esi + 0x9c], cl
call fcn.0048aa00
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x48ad9b
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x3c]
push ecx
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push edx
mov eax, esi
call fcn.0048aa00
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x48ad9b
mov ecx, dword [esp + 0x3c]
mov byte [esi + 0x9c], al
mov eax, dword [esp + 0x10]
push eax
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ecx
mov eax, esi
call fcn.0048aa00
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x48ad9b
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x3c]
push edx
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push eax
mov eax, esi
call fcn.0048aa00
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x48ad9b
mov dword [esp + 0x10], edi
jmp 0x48ad05
mov edi, dword [esp + 0x10]
movzx edx, byte [edi + 0x4b8b80]
lea ecx, [esp + 0x24]
push ecx
push edx
mov eax, ebp
call fcn.0042d100
movzx eax, byte [edi + 0x4b8b81]
add eax, dword [esp + 0x2c]
movzx ecx, byte [edi + 0x4b8b80]
push eax
push ecx
mov eax, ebx
call fcn.00465c50
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x48ad9b
mov eax, dword [esp + 0x10]
add eax, 2
cmp eax, 0xa
mov dword [esp + 0x10], eax
jl 0x48ad01
push ebp
mov eax, ebx
call fcn.00471700
mov edi, eax
add esp, 4
test edi, edi
jne 0x48ad9b
mov eax, ebx
call fcn.0046b920
mov edi, eax
test edi, edi
jne 0x48ad9b
mov eax, ebx
call fcn.0042cf90
push eax
mov eax, ebp
call fcn.0042cf10
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x18]
mov eax, dword [edx + 0x20]
push 1
push ecx
push eax
mov eax, ebp
call fcn.0046d7c0
add esp, 0x10
mov edi, eax
jmp 0x48ad9b
mov edi, 7
mov eax, dword [esp + 0x2c]
movzx edx, word [esp + 0x28]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x1c], eax
mov al, byte [esp + 0xf]
push 1
mov dword [esi + 0x18], edx
mov edx, dword [esp + 0x38]
mov byte [esi + 0x50], al
push 0xffffffffffffffff
push 0xffffffffffffffff
mov eax, ebp
mov byte [esi + 0x9c], 0
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], edx
call fcn.0046d7c0
mov ebx, dword [esp + 0x24]
xor ebp, ebp
add esp, 0xc
mov byte [esi + 0x47], 1
cmp ebx, ebp
je 0x48adf2
mov eax, dword [ebx + 4]
call fcn.0046d680
mov dword [ebx + 4], ebp
mov dword [ebx + 0xc], ebp
mov eax, esi
call fcn.0043ae20
mov eax, edi
pop edi
pop ebp
pop ebx
add esp, 0x2c
ret