Function at 0x4b1870
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x2c], 0
push edi
mov edi, ecx
mov dword [ebp - 8], edi
cmp byte [esi + 0x4f], 0
jne 0x4b18cc
mov edx, dword [edi]
test edx, edx
je 0x4b189a
mov ecx, esi
call fcn.0043acb0
push 0
push 0x28
mov ecx, esi
call fcn.0043b020
mov esi, eax
add esp, 8
test esi, esi
je 0x4b18be
push 0x28
push str.cannot_VACUUM_from_within_a_transaction
push esi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [edi], esi
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0xb0], 1
jle 0x4b18ff
mov edx, dword [edi]
test edx, edx
je 0x4b18e2
mov ecx, esi
call fcn.0043acb0
push 0
push 0x2b
mov ecx, esi
call fcn.0043b020
mov esi, eax
add esp, 8
test esi, esi
je 0x4b18be
push 0x2b
push str.cannot_VACUUM___SQL_statements_in_progress
jmp 0x4b18b5
mov ecx, dword [ebp + 0xc]
mov ebx, dword [esi + 0x3c]
mov dword [ebp - 0x1c], ebx
test ecx, ecx
je 0x4b19b3
movzx edx, word [ecx + 8]
mov eax, edx
and eax, 0x3f
cmp byte [eax + 0x51ec78], 3
je 0x4b1964
mov edx, dword [edi]
test edx, edx
je 0x4b192f
mov ecx, esi
call fcn.0043acb0
push 0
push 0x12
mov ecx, esi
call fcn.0043b020
add esp, 8
test eax, eax
je 0x4b1956
movups xmm0, xmmword [str.non_text_filename]
movups xmmword [eax], xmm0
mov cx, word [0x526b7c]
mov word [eax + 0x10], cx
mov dword [edi], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, edx
and eax, 0x202
cmp eax, 0x202
jne 0x4b1988
cmp byte [ecx + 0xa], 1
jne 0x4b1988
mov edx, dword [ecx + 0x10]
mov eax, ebx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x4b19b8
test dl, 1
je 0x4b199c
mov eax, ebx
xor edx, edx
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x4b19b8
mov dl, 1
call fcn.0045fb00
mov edx, eax
mov eax, dword [esi + 0x3c]
and eax, 0xfffffffe
or eax, 6
mov dword [esi + 0x3c], eax
jmp 0x4b19b8
mov edx, 0x517749
mov ecx, dword [esi + 0x20]
mov ebx, dword [esi + 0x24]
mov eax, dword [esi + 0x18]
mov edi, dword [esi + 0x64]
mov dword [ebp - 0x28], ecx
mov cl, byte [esi + 0x58]
mov dword [ebp - 0x30], eax
or eax, 6
mov dword [ebp - 0x34], ebx
and ebx, 0xfffffffe
mov dword [esi + 0x24], ebx
mov ebx, dword [ebp + 8]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x10]
mov byte [ebp - 2], cl
mov ecx, dword [ebp - 0x28]
and ecx, 0xefffafff
shl ebx, 4
mov byte [esi + 0x58], 0
or ecx, 0x201
mov dword [esi + 0x20], ecx
mov dword [ebp + 8], ebx
mov ecx, dword [eax + ebx]
mov ebx, dword [eax + ebx + 4]
push edx
mov dword [ebp - 0x38], edi
mov edi, dword [esi + 0x68]
mov eax, dword [ebx + 4]
push str.ATTACH__Q_AS_vacuum_db
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 8]
mov eax, dword [eax]
push edi
push esi
mov dword [ebp - 0x10], ecx
mov al, byte [eax + 0xc]
mov byte [ebp - 1], al
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x24], eax
call fcn.004b1740
mov edi, eax
add esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x3c], eax
test edi, edi
jne 0x4b1d32
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 - 0xc], edi
je 0x4b1ae1
mov eax, dword [edi + 4]
xorps xmm0, xmm0
mov eax, dword [eax]
mov eax, dword [eax + 0x3c]
movlpd qword [ebp - 0x20], xmm0
mov ecx, dword [eax]
test ecx, ecx
je 0x4b1add
lea edx, [ebp - 0x20]
push edx
push eax
mov eax, dword [ecx + 0x18]
call eax
add esp, 8
test eax, eax
jne 0x4b1a96
cmp dword [ebp - 0x1c], eax
jl 0x4b1add
jg 0x4b1a96
cmp dword [ebp - 0x20], eax
jbe 0x4b1add
mov eax, dword [ebp - 8]
mov edi, 1
mov edx, dword [eax]
test edx, edx
je 0x4b1aab
mov ecx, esi
call fcn.0043acb0
push 0
push 0x1b
mov ecx, esi
call fcn.0043b020
add esp, 8
mov dword [ebp - 0x24], eax
test eax, eax
je 0x4b1ad0
push 0x1b
push str.output_file_already_exists
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
jmp 0x4b1d32
or dword [esi + 0x18], 8
mov cl, byte [ebx + 9]
test cl, cl
je 0x4b1afb
inc dword [ebx + 0xc]
cmp byte [ebx + 0xa], 0
jne 0x4b1afb
mov ecx, ebx
call fcn.004509e0
mov cl, byte [ebx + 9]
mov eax, dword [ebx + 4]
mov edx, dword [eax + 0x20]
sub edx, dword [eax + 0x24]
mov dword [ebp - 0x1c], edx
test cl, cl
je 0x4b1b18
add dword [ebx + 0xc], 0xffffffff
jne 0x4b1b18
mov ecx, ebx
call fcn.004509a0
mov eax, dword [esi + 0x10]
mov ecx, edi
mov edx, dword [ebp + 8]
mov edx, dword [eax + edx + 0xc]
mov edx, dword [edx + 0x50]
call fcn.004537d0
xor edx, edx
mov ecx, ebx
call fcn.00453850
mov edx, eax
mov ecx, edi
call fcn.00453850
mov edx, 0x21
mov ecx, edi
call fcn.00453950
mov edx, dword [ebp - 8]
mov ecx, esi
push str.BEGIN
call fcn.004b1640
mov edi, eax
add esp, 4
test edi, edi
jne 0x4b1d32
xor edx, edx
mov ecx, ebx
cmp dword [ebp + 0xc], edx
push eax
mov eax, 2
cmove edx, eax
call fcn.00454160
mov edi, eax
add esp, 4
test edi, edi
jne 0x4b1d32
mov edx, dword [ebx + 4]
mov eax, dword [edx]
cmp byte [eax + 5], 5
jne 0x4b1b99
mov dword [esi + 0x5c], edi
mov edx, dword [ebx + 4]
mov edi, dword [ebp - 0xc]
mov ecx, edi
mov edx, dword [edx + 0x20]
push 0
push dword [ebp - 0x1c]
call fcn.00453a20
add esp, 8
test eax, eax
jne 0x4b1d28
cmp byte [ebp - 1], al
jne 0x4b1bd4
mov edx, dword [esi + 0x5c]
mov ecx, edi
push eax
push dword [ebp - 0x1c]
call fcn.00453a20
add esp, 8
test eax, eax
jne 0x4b1d28
cmp byte [esi + 0x51], 0
jne 0x4b1d28
mov al, byte [esi + 0x54]
test al, al
js 0x4b1bea
movsx eax, al
jmp 0x4b1bf1
mov ecx, ebx
call fcn.00453c90
mov edx, eax
mov ecx, edi
call fcn.00453c10
push dword [ebp - 0x10]
mov eax, dword [ebp - 0x24]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typetableAND_name__sqlite_sequence_AND_coalesce_rootpage_1__0
push dword [ebp - 8]
mov byte [esi + 0xa4], al
push esi
call fcn.004b1740
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b1d32
push dword [ebp - 0x10]
push str.SELECT_sql_FROM___w_.sqlite_master_WHERE_typeindex
push dword [ebp - 8]
push esi
call fcn.004b1740
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b1d32
push dword [ebp - 0x10]
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 dword [ebp - 8]
push esi
call fcn.004b1740
and dword [esi + 0x18], 0xfffffffb
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b1d32
push dword [ebp - 0x10]
push str.INSERT_INTO_vacuum_db.sqlite_master_SELECTFROM___w_.sqlite_master_WHERE_type_IN_view_trigger__OR_typetableAND_rootpage0_
push dword [ebp - 8]
push esi
call fcn.004b1740
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x4b1d32
xor ebx, ebx
nop word [eax + eax]
movzx edx, byte [ebx + 0x517ba4]
lea eax, [ebp - 0x24]
mov ecx, dword [ebp - 0x14]
push eax
call fcn.0045c1b0
movzx eax, byte [ebx + 0x517ba5]
add esp, 4
add eax, dword [ebp - 0x24]
movzx edx, byte [ebx + 0x517ba4]
mov ecx, dword [ebp - 0xc]
push eax
call fcn.0045c210
mov edi, eax
add esp, 4
test edi, edi
jne 0x4b1d2f
add ebx, 2
cmp ebx, 0xa
jl 0x4b1c90
mov ebx, dword [ebp - 0x14]
cmp dword [ebp + 0xc], eax
jne 0x4b1ce9
mov edx, dword [ebp - 0xc]
mov ecx, ebx
call fcn.0045e550
mov edi, eax
test edi, edi
jne 0x4b1d32
mov ecx, dword [ebp - 0xc]
call fcn.004552e0
mov edi, eax
test edi, edi
jne 0x4b1d32
cmp dword [ebp + 0xc], eax
jne 0x4b1d32
mov edi, dword [ebp - 0xc]
mov ecx, edi
call fcn.00453c90
mov edx, eax
mov ecx, ebx
call fcn.00453c10
mov eax, dword [edi + 4]
mov ecx, ebx
push 1
push dword [ebp - 0x1c]
mov edx, dword [eax + 0x20]
call fcn.00453a20
add esp, 8
mov edi, eax
jmp 0x4b1d32
mov edi, 7
jmp 0x4b1d32
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x30]
or edx, 0xffffffff
mov dword [esi + 0x18], eax
mov ecx, ebx
mov eax, dword [ebp - 0x28]
mov dword [esi + 0x20], eax
mov eax, dword [ebp - 0x34]
mov dword [esi + 0x24], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 0x64], eax
mov eax, dword [ebp - 0x3c]
mov dword [esi + 0x68], eax
mov al, byte [ebp - 2]
push 1
push 0xffffffffffffffff
mov byte [esi + 0xa4], 0
mov byte [esi + 0x58], al
call fcn.00453a20
mov ebx, dword [ebp - 0x2c]
add esp, 8
mov byte [esi + 0x4f], 1
test ebx, ebx
je 0x4b1d8f
mov ecx, dword [ebx + 4]
call fcn.00453650
mov dword [ebx + 4], 0
mov dword [ebx + 0xc], 0
mov ecx, esi
call fcn.00485f00
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret