Function at 0x1012f9f0
Capabilities:
Reference sql statements

Disassembly:
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, dword [esp + 0x4c]
xor ebp, ebp
push edi
cmp byte [esi + 0x55], 0
jne 0x1012fa5a
push ebp
push 0x28
push esi
call fcn.10112e00
mov edi, eax
add esp, 0xc
test edi, edi
je 0x1012fa37
movups xmm0, xmmword [str.cannot_VACUUM_from_within_a_transaction]
movups xmmword [edi], xmm0
movups xmm0, xmmword [0x101960ac]
movups xmmword [edi + 0x10], xmm0
movq xmm0, qword [0x101960bc]
movq qword [edi + 0x20], xmm0
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
test eax, eax
je 0x1012fa4b
push eax
push esi
call fcn.10112cf0
add esp, 8
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
cmp dword [esi + 0xbc], 1
jle 0x1012facd
push 0
push 0x2b
push esi
call fcn.10112e00
mov edi, eax
add esp, 0xc
test edi, edi
je 0x1012faaa
movups xmm0, xmmword [str.cannot_VACUUM___SQL_statements_in_progress]
movups xmmword [edi], xmm0
movups xmm0, xmmword [0x101960d4]
movups xmmword [edi + 0x10], xmm0
movq xmm0, qword [0x101960e4]
movq qword [edi + 0x20], xmm0
mov ax, word [0x101960ec]
mov word [edi + 0x28], ax
mov al, byte [0x101960ee]
mov byte [edi + 0x2a], al
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
test eax, eax
je 0x1012fa4b
push eax
push esi
call fcn.10112cf0
add esp, 8
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov ecx, dword [esp + 0x58]
mov eax, dword [esi + 0x3c]
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x1012fb96
movzx edx, word [ecx + 0x10]
mov eax, edx
and eax, 0x3f
cmp byte [eax + 0x1018e9e8], 3
je 0x1012fb41
push 0
push 0x12
push esi
call fcn.10112e00
mov edi, eax
add esp, 0xc
test edi, edi
je 0x1012fb1a
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [edi], xmm0
mov cx, word [0x10196100]
mov word [edi + 0x10], cx
mov ebx, dword [esp + 0x4c]
mov eax, dword [ebx]
test eax, eax
je 0x1012fa4b
push eax
push esi
call fcn.10112cf0
add esp, 8
mov dword [ebx], edi
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
mov eax, edx
and eax, 0x202
cmp eax, 0x202
jne 0x1012fb66
cmp byte [ecx + 0x12], 1
jne 0x1012fb66
mov edx, dword [ecx + 8]
mov ecx, dword [esi + 0x3c]
and ecx, 0xfffffffe
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x1012fb9b
test dl, 1
je 0x1012fb7b
mov ecx, dword [esi + 0x3c]
xor edx, edx
and ecx, 0xfffffffe
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x1012fb9b
push 1
push ecx
call fcn.10155890
mov ecx, dword [esi + 0x3c]
add esp, 8
and ecx, 0xfffffffe
mov edx, eax
or ecx, 6
mov dword [esi + 0x3c], ecx
jmp 0x1012fb9b
mov edx, 0x10183be2
mov ebx, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x20]
mov edi, dword [esi + 0x68]
mov dword [esp + 0x24], ebx
mov bl, byte [esi + 0x5e]
mov byte [esp + 0x50], bl
mov ebx, dword [esp + 0x24]
and ebx, 0xfffffffe
mov dword [esp + 0x30], eax
mov dword [esi + 0x24], ebx
or eax, 6
mov ebx, dword [esp + 0x54]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov dword [esp + 0x38], edi
mov edi, dword [esi + 0x6c]
mov dword [esp + 0x34], ecx
and ecx, 0xefffafff
shl ebx, 4
or ecx, 0x201
mov dword [esp + 0x3c], edi
mov edi, dword [esi + 0x70]
mov dword [esi + 0x20], ecx
mov byte [esi + 0x5e], 0
mov ecx, dword [ebx + eax]
mov dword [esp + 0x40], edi
mov edi, dword [esi + 0x74]
mov dword [esp + 0x44], edi
mov edi, dword [ebx + eax + 4]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x14], ecx
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 0xc], 0
jne 0x1012fc24
cmp byte [eax + 0x10], 0
mov dword [esp + 0x1c], ebp
je 0x1012fc2c
mov dword [esp + 0x1c], 1
mov eax, dword [esi + 0x14]
push edx
push str.ATTACH__Q_AS_vacuum_db
push dword [esp + 0x54]
mov dword [esp + 0x2c], eax
push esi
call fcn.100e6930
mov ebx, eax
add esp, 0x10
mov eax, dword [esp + 0x18]
mov dword [esi + 0x3c], eax
test ebx, ebx
jne 0x1012ff9d
mov eax, dword [esp + 0x20]
shl eax, 4
add eax, dword [esi + 0x10]
mov dword [esp + 0x10], eax
mov ebp, dword [eax + 4]
mov dword [esp + 0x18], ebp
cmp dword [esp + 0x58], ebx
je 0x1012fd2d
mov eax, dword [ebp + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x40]
movlpd qword [esp + 0x28], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x1012fd13
lea edx, [esp + 0x28]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x1012fcb1
cmp dword [esp + 0x2c], eax
jl 0x1012fd13
jg 0x1012fcb1
cmp dword [esp + 0x28], eax
jbe 0x1012fd13
push 0
push 0x1b
push esi
mov ebx, 1
call fcn.10112e00
mov ebp, eax
add esp, 0xc
test ebp, ebp
je 0x1012fcf4
movups xmm0, xmmword [str.output_file_already_exists]
movups xmmword [ebp], xmm0
movq xmm0, qword [0x1019612c]
movq qword [ebp + 0x10], xmm0
mov cx, word [0x10196134]
mov word [ebp + 0x18], cx
mov al, byte [0x10196136]
mov byte [ebp + 0x1a], al
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
test ecx, ecx
je 0x1012fd0c
push ecx
push esi
call fcn.10112cf0
mov eax, dword [esp + 0x54]
add esp, 8
mov dword [eax], ebp
jmp 0x1012ff99
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x54]
or dword [esi + 0x18], 8
movzx ebx, byte [eax + ecx + 8]
mov eax, dword [esi + 0x20]
and eax, 0x38
or ebx, eax
jmp 0x1012fd32
mov ebx, 1
push edi
call fcn.1010bc10
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x58]
mov ecx, dword [ecx + eax + 0xc]
push dword [ecx + 0x50]
push ebp
call fcn.1010da10
push 0
push edi
call fcn.1010dc80
push eax
push ebp
call fcn.1010dc80
or ebx, 0x20
push ebx
push ebp
call fcn.1010db90
push str.BEGIN
push dword [esp + 0x74]
push esi
call fcn.100e6760
mov ebx, eax
add esp, 0x30
test ebx, ebx
jne 0x1012ff99
cmp dword [esp + 0x58], eax
mov ecx, 2
push eax
cmove eax, ecx
push eax
push edi
call fcn.1010a980
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1012ff99
mov eax, dword [edi + 4]
mov eax, dword [eax]
cmp byte [eax + 5], 5
jne 0x1012fdba
cmp dword [esp + 0x58], ebx
jne 0x1012fdba
mov dword [esi + 0x64], ebx
mov eax, dword [edi + 4]
mov ebx, dword [esp + 0x28]
push 0
push ebx
push dword [eax + 0x24]
push ebp
call fcn.1010dab0
add esp, 0x10
test eax, eax
jne 0x1012ff94
cmp dword [esp + 0x1c], eax
jne 0x1012fdf4
push eax
push ebx
push dword [esi + 0x64]
push ebp
call fcn.1010dab0
add esp, 0x10
test eax, eax
jne 0x1012ff94
cmp byte [esi + 0x57], 0
jne 0x1012ff94
mov al, byte [esi + 0x5a]
test al, al
js 0x1012fe0a
movsx eax, al
jmp 0x1012fe13
push edi
call fcn.1010bb60
add esp, 4
push eax
push ebp
call fcn.1010d990
push dword [esp + 0x1c]
mov ebp, dword [esp + 0x58]
mov eax, dword [esp + 0x2c]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push ebp
push esi
mov byte [esi + 0xb0], al
call fcn.100e6930
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x1012ff99
push dword [esp + 0x14]
push str.SELECT_sql_FROM___w_.sqlite_schema_WHERE_typeindex
push ebp
push esi
call fcn.100e6930
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1012ff99
push dword [esp + 0x14]
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 ebp
push esi
call fcn.100e6930
and dword [esi + 0x18], 0xfffffffb
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1012ff99
push dword [esp + 0x14]
push str.INSERT_INTO_vacuum_db.sqlite_schema_SELECTFROM___w_.sqlite_schema_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push ebp
push esi
call fcn.100e6930
mov ebx, eax
add esp, 0x10
test ebx, ebx
jne 0x1012ff99
xor ebp, ebp
nop dword [eax + eax]
mov cl, byte [edi + 9]
mov eax, dword [edi + 4]
movzx ebx, byte [ebp + 0x1018e97c]
mov dword [esp + 0x28], eax
test cl, cl
je 0x1012fede
inc dword [edi + 0xc]
cmp byte [edi + 0xa], 0
jne 0x1012fede
push edi
call fcn.100dea30
mov cl, byte [edi + 9]
add esp, 4
mov eax, dword [esp + 0x28]
cmp ebx, 0xf
jne 0x1012feed
mov eax, dword [eax]
mov ebx, dword [eax + 0x6c]
add ebx, dword [edi + 0x14]
jmp 0x1012fef9
mov eax, dword [eax + 0xc]
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + ebx*4 + 0x24]
bswap ebx
test cl, cl
je 0x1012ff0c
add dword [edi + 0xc], 0xffffffff
jne 0x1012ff0c
push edi
call fcn.10153430
add esp, 4
movzx eax, byte [ebp + 0x1018e97d]
add eax, ebx
push eax
movzx eax, byte [ebp + 0x1018e97c]
push eax
push dword [esp + 0x20]
call fcn.1010e5c0
mov ebx, eax
add esp, 0xc
test ebx, ebx
jne 0x1012ff99
add ebp, 2
cmp ebp, 0xa
jl 0x1012feb0
mov ebp, dword [esp + 0x18]
cmp dword [esp + 0x58], eax
jne 0x1012ff56
push ebp
push edi
call fcn.1010b370
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1012ff99
push ebp
call fcn.1010b1a0
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x1012ff99
cmp dword [esp + 0x58], eax
jne 0x1012ff99
push ebp
call fcn.1010bb60
push eax
push edi
call fcn.1010d990
push ebp
call fcn.1010bc10
mov ecx, dword [ebp + 4]
push 1
push eax
push dword [ecx + 0x24]
push edi
call fcn.1010dab0
add esp, 0x20
mov ebx, eax
jmp 0x1012ff99
mov ebx, 7
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x30]
mov dword [esi + 0x18], eax
mov eax, dword [esp + 0x34]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x24]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x38]
mov dword [esi + 0x68], eax
mov eax, dword [esp + 0x3c]
mov dword [esi + 0x6c], eax
mov eax, dword [esp + 0x40]
push 1
mov dword [esi + 0x70], eax
mov eax, dword [esp + 0x48]
push 0
mov dword [esi + 0x74], eax
mov al, byte [esp + 0x58]
push 0xffffffffffffffff
push edi
mov byte [esi + 0xb0], 0
mov byte [esi + 0x5e], al
call fcn.1010dab0
add esp, 0x10
mov byte [esi + 0x55], 1
test ebp, ebp
je 0x1013000c
push dword [ebp + 4]
call fcn.1010adb0
add esp, 4
mov dword [ebp + 4], 0
mov dword [ebp + 0xc], 0
push esi
call fcn.1012e8e0
add esp, 4
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret