Function at 0x5b9d330
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x2c], 0
push edi
mov ebx, ecx
mov dword [ebp - 0x18], 1
cmp byte [esi + 0x55], 0
jne 0x5b9d37a
mov edx, str.cannot_VACUUM_from_within_a_transaction
mov ecx, esi
call fcn.05c204b0
mov edx, dword [ebx]
mov edi, eax
test edx, edx
je 0x5b9d36c
mov ecx, esi
call fcn.05c20b20
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xbc], 1
jle 0x5b9d38a
mov edx, str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x5b9d356
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x20], eax
test ecx, ecx
je 0x5b9d3c7
movzx eax, word [ecx + 0x10]
and eax, 0x3f
cmp byte [eax + 0x5c46c68], 3
je 0x5b9d3ae
mov edx, str.non_text_filename
jmp 0x5b9d356
push ecx
call fcn.05bf3ac0
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x5b9d3cc
mov edx, 0x5c37db0
mov ecx, dword [esi + 0x24]
mov edi, dword [esi + 0x18]
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x28], ecx
mov ecx, dword [esi + 0x68]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [esi + 0x6c]
mov dword [ebp - 0x40], ecx
mov ecx, dword [esi + 0x70]
mov dword [ebp - 0x38], eax
or eax, 0x201
mov dword [ebp - 0x34], edi
or edi, 6
mov dword [esi + 0x18], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x44], ecx
mov ecx, dword [esi + 0x74]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
and dword [esi + 0x20], 0xefffafff
mov dword [ebp - 0x48], ecx
mov cl, byte [esi + 0x5e]
shl edi, 4
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x28]
mov dword [esi + 0x24], ecx
and dword [esi + 0x24], 0xfffffffe
mov byte [esi + 0x5e], 0
mov ecx, dword [edi + eax]
mov eax, dword [edi + eax + 4]
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ecx
mov eax, dword [eax + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x5b9d450
cmp byte [eax + 0x10], 0
mov dword [ebp - 0x1c], 0
je 0x5b9d457
mov dword [ebp - 0x1c], 1
mov eax, dword [esi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push ebx
push esi
mov dword [ebp - 0x24], eax
call fcn.05b9d8e0
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x5b9d742
mov eax, dword [ebp - 0x24]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x2c], eax
mov edi, dword [eax + 4]
mov dword [ebp - 0x10], edi
je 0x5b9d4fd
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [ebp - 0x50], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x5b9d4e3
lea edx, [ebp - 0x50]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x5b9d4c8
cmp dword [ebp - 0x4c], eax
jl 0x5b9d4e3
jg 0x5b9d4c8
cmp dword [ebp - 0x50], eax
jbe 0x5b9d4e3
push str.output_file_already_exists
mov edx, esi
mov ecx, ebx
mov edi, 1
call fcn.05c203a0
add esp, 4
jmp 0x5b9d742
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x14]
or dword [esi + 0x18], 8
movzx ecx, byte [ecx + eax + 8]
mov eax, dword [esi + 0x20]
and eax, 0x38
or ecx, eax
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 8]
call fcn.05c06810
cmp dword [esi + 0x64], 0
mov dword [ebp - 0x20], eax
je 0x5b9d530
mov edx, dword [ebp + 8]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x4c]
mov ecx, esi
push eax
call fcn.05b428e0
add esp, 8
cmp dword [ebp - 0x30], 0
je 0x5b9d530
mov dword [esi + 0x64], 0
mov eax, dword [esi + 0x10]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ecx + eax + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.05c06a50
mov ecx, dword [ebp - 8]
xor edx, edx
call fcn.05c06a00
mov edx, eax
mov ecx, edi
call fcn.05c06a00
mov edx, dword [ebp - 0x18]
mov ecx, edi
or edx, 0x20
call fcn.05c06970
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.05b9d930
mov edi, eax
add esp, 4
test edi, edi
jne 0x5b9d742
mov ecx, dword [ebp - 8]
xor edx, edx
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.05c05f90
mov edi, eax
add esp, 4
test edi, edi
jne 0x5b9d742
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x5b9d5b8
cmp dword [ebp + 0xc], edi
jne 0x5b9d5b8
mov dword [esi + 0x64], edi
mov eax, dword [ecx + 4]
mov edi, dword [ebp - 0x10]
mov ecx, edi
push 0
push dword [ebp - 0x20]
mov edx, dword [eax + 0x24]
call fcn.05c06880
add esp, 8
test eax, eax
jne 0x5b9d73d
cmp dword [ebp - 0x1c], eax
jne 0x5b9d5f6
mov edx, dword [esi + 0x64]
mov ecx, edi
push eax
push dword [ebp - 0x20]
call fcn.05c06880
add esp, 8
test eax, eax
jne 0x5b9d73d
cmp byte [esi + 0x57], 0
jne 0x5b9d73d
mov al, byte [esi + 0x5a]
test al, al
js 0x5b9d60c
movsx eax, al
jmp 0x5b9d614
mov ecx, dword [ebp - 8]
call fcn.05c06680
mov edx, eax
mov ecx, edi
call fcn.05c066d0
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x24]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0xb0], al
call fcn.05b9d8e0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5b9d742
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebx
push esi
call fcn.05b9d8e0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5b9d742
push dword [ebp - 0xc]
mov byte [esi + 0xb0], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_schema_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.05b9d8e0
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5b9d742
push dword [ebp - 0xc]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.05b9d8e0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x5b9d742
xor ebx, ebx
movzx edx, byte [ebx + 0x5c45c64]
lea eax, [ebp - 0x30]
mov ecx, dword [ebp - 8]
push eax
call fcn.05bfe4e0
movzx eax, byte [ebx + 0x5c45c65]
add esp, 4
add eax, dword [ebp - 0x30]
movzx edx, byte [ebx + 0x5c45c64]
mov ecx, dword [ebp - 0x10]
push eax
call fcn.05bfe410
mov edi, eax
add esp, 4
test edi, edi
jne 0x5b9d742
add ebx, 2
cmp ebx, 0xa
jl 0x5b9d6a2
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0xc], eax
jne 0x5b9d6fb
mov ecx, dword [ebp - 8]
mov edx, ebx
call fcn.05bfbe00
mov edi, eax
test edi, edi
jne 0x5b9d742
mov ecx, ebx
call fcn.05c052f0
mov edi, eax
test edi, edi
jne 0x5b9d742
cmp dword [ebp + 0xc], eax
jne 0x5b9d742
mov ecx, ebx
call fcn.05c06680
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.05c066d0
mov ecx, ebx
call fcn.05c06810
mov ecx, dword [ebx + 4]
push 1
push eax
mov edx, dword [ecx + 0x24]
mov ecx, dword [ebp - 8]
call fcn.05c06880
add esp, 8
mov edi, eax
jmp 0x5b9d742
mov edi, 7
mov eax, dword [ebp - 0x34]
or edx, 0xffffffff
mov ecx, dword [ebp - 8]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0x68], eax
mov eax, dword [ebp - 0x40]
mov dword [esi + 0x6c], eax
mov eax, dword [ebp - 0x44]
mov dword [esi + 0x70], eax
mov eax, dword [ebp - 0x48]
mov dword [esi + 0x74], eax
mov al, byte [ebp - 1]
push 1
push 0
mov byte [esi + 0xb0], 0
mov byte [esi + 0x5e], al
call fcn.05c06880
mov ebx, dword [ebp - 0x2c]
add esp, 8
mov byte [esi + 0x55], 1
test ebx, ebx
je 0x5b9d7ac
mov ecx, dword [ebx + 4]
call fcn.05c06af0
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, esi
call fcn.05bce5e0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret