Function at 0x10086a40
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x24], 0
push edi
mov ebx, ecx
cmp byte [esi + 0x4f], 0
jne 0x10086a81
mov edx, dword [ebx]
test edx, edx
je 0x10086a67
mov ecx, esi
call fcn.100191e0
mov edx, str.cannot_VACUUM_from_within_a_transaction
mov ecx, esi
call fcn.10019780
mov dword [ebx], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x10086ab1
mov edx, dword [ebx]
test edx, edx
je 0x10086a97
mov ecx, esi
call fcn.100191e0
mov edx, str.cannot_VACUUM___SQL_statements_in_progress
mov ecx, esi
call fcn.10019780
mov dword [ebx], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x10086b0e
movzx eax, word [ecx + 8]
and eax, 0x3f
cmp byte [eax + 0x100bd1b0], 3
je 0x10086af5
mov edx, dword [ebx]
test edx, edx
je 0x10086adb
mov ecx, esi
call fcn.100191e0
mov edx, str.non_text_filename
mov ecx, esi
call fcn.10019780
mov dword [ebx], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
call fcn.1003f480
mov ecx, dword [esi + 0x3c]
add esp, 4
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x10086b13
mov edx, 0x100d0000
mov ecx, dword [esi + 0x24]
mov edi, dword [esi + 0x18]
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x30], eax
or eax, 0x201
mov dword [ebp - 0x20], ecx
mov ecx, dword [esi + 0x64]
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0x10]
and dword [esi + 0x20], 0xefffafff
mov dword [ebp - 0x2c], edi
or edi, 6
mov dword [esi + 0x18], edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x34], ecx
mov ecx, dword [esi + 0x68]
mov dword [ebp - 0x38], ecx
mov cl, byte [esi + 0x58]
shl edi, 4
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x20]
mov dword [esi + 0x24], ecx
and dword [esi + 0x24], 0xfffffffe
mov byte [esi + 0x58], 0
mov ecx, dword [eax + edi]
mov eax, dword [eax + edi + 4]
mov dword [ebp - 8], eax
push edx
push str.ATTACH__Q_AS_vacuum_db
mov eax, dword [eax + 4]
push ebx
push esi
mov dword [ebp + 8], edi
mov eax, dword [eax]
mov dword [ebp - 0xc], ecx
movzx eax, byte [eax + 0xc]
mov dword [ebp - 0x28], eax
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x1c], eax
call fcn.10086910
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x14]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x10086e2b
mov eax, dword [ebp - 0x1c]
shl eax, 4
add eax, dword [esi + 0x10]
cmp dword [ebp + 0xc], 0
mov dword [ebp - 0x24], eax
mov edi, dword [eax + 4]
mov dword [ebp - 0x10], edi
je 0x10086c0f
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x18], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x10086c0b
lea edx, [ebp - 0x18]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x10086bf0
cmp dword [ebp - 0x14], eax
jl 0x10086c0b
jg 0x10086bf0
cmp dword [ebp - 0x18], eax
jbe 0x10086c0b
push str.output_file_already_exists
mov edx, esi
mov ecx, ebx
mov edi, 1
call fcn.100198d0
add esp, 4
jmp 0x10086e2b
or dword [esi + 0x18], 8
mov ecx, dword [ebp - 8]
call fcn.1002ea20
mov ecx, dword [esi + 0x10]
mov edx, dword [ebp + 8]
mov dword [ebp - 0x14], eax
mov edx, dword [ecx + edx + 0xc]
mov ecx, edi
mov edx, dword [edx + 0x50]
call fcn.1002e7e0
mov ecx, dword [ebp - 8]
xor edx, edx
call fcn.1002e870
mov edx, eax
mov ecx, edi
call fcn.1002e870
mov edx, 0x21
mov ecx, edi
call fcn.1002e910
push str.BEGIN
mov edx, ebx
mov ecx, esi
call fcn.10086800
mov edi, eax
add esp, 4
test edi, edi
jne 0x10086e2b
mov ecx, dword [ebp - 8]
xor edx, edx
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.1002ef30
mov edi, eax
add esp, 4
test edi, edi
jne 0x10086e2b
mov ecx, dword [ebp - 8]
mov eax, dword [ecx + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x10086c9c
mov dword [esi + 0x5c], edi
mov eax, dword [ecx + 4]
mov edi, dword [ebp - 0x10]
mov ecx, edi
push 0
push dword [ebp - 0x14]
mov edx, dword [eax + 0x20]
call fcn.1002e950
add esp, 8
test eax, eax
jne 0x10086e26
cmp dword [ebp - 0x28], eax
jne 0x10086cda
mov edx, dword [esi + 0x5c]
mov ecx, edi
push eax
push dword [ebp - 0x14]
call fcn.1002e950
add esp, 8
test eax, eax
jne 0x10086e26
cmp byte [esi + 0x51], 0
jne 0x10086e26
mov al, byte [esi + 0x54]
test al, al
js 0x10086cf0
movsx eax, al
jmp 0x10086cf8
mov ecx, dword [ebp - 8]
call fcn.1002eb90
mov edx, eax
mov ecx, edi
call fcn.1002eb20
push dword [ebp - 0xc]
mov eax, dword [ebp - 0x1c]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebx
push esi
mov byte [esi + 0xa4], al
call fcn.10086910
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10086e2b
push dword [ebp - 0xc]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push ebx
push esi
call fcn.10086910
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10086e2b
push dword [ebp - 0xc]
mov byte [esi + 0xa4], al
push str.SELECTINSERT_INTO_vacuum_db.quote_name__SELECTFROM__w_.quote_name_FROM_vacuum_db.sqlite_master_WHERE_typetableAND_coalesce_rootpage_1__0
push ebx
push esi
call fcn.10086910
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10086e2b
push dword [ebp - 0xc]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebx
push esi
call fcn.10086910
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x10086e2b
xor ebx, ebx
jmp 0x10086d90
movzx edx, byte [ebx + 0x100ba834]
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 8]
push eax
call fcn.10035f80
movzx eax, byte [ebx + 0x100ba835]
add esp, 4
add eax, dword [ebp - 0x28]
movzx edx, byte [ebx + 0x100ba834]
mov ecx, dword [ebp - 0x10]
push eax
call fcn.10035fe0
mov edi, eax
add esp, 4
test edi, edi
jne 0x10086e2b
add ebx, 2
cmp ebx, 0xa
jl 0x10086d90
mov ebx, dword [ebp - 0x10]
cmp dword [ebp + 0xc], eax
jne 0x10086de9
mov ecx, dword [ebp - 8]
mov edx, ebx
call fcn.10038320
mov edi, eax
test edi, edi
jne 0x10086e2b
mov ecx, ebx
call fcn.1002fd40
mov edi, eax
test edi, edi
jne 0x10086e2b
cmp dword [ebp + 0xc], eax
jne 0x10086e2b
mov ecx, ebx
call fcn.1002eb90
mov ecx, dword [ebp - 8]
mov edx, eax
call fcn.1002eb20
mov eax, dword [ebx + 4]
mov ecx, dword [ebp - 8]
push 1
push dword [ebp - 0x14]
mov edx, dword [eax + 0x20]
call fcn.1002e950
add esp, 8
mov edi, eax
jmp 0x10086e2b
mov edi, 7
mov eax, dword [ebp - 0x2c]
or edx, 0xffffffff
mov ecx, dword [ebp - 8]
mov dword [esi + 0x18], eax
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x68], eax
mov al, byte [ebp - 1]
push 1
push 0xffffffffffffffff
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.1002e950
mov ebx, dword [ebp - 0x24]
add esp, 8
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x10086e89
mov ecx, dword [ebx + 4]
call fcn.1002e700
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, esi
call fcn.1005c9f0
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret