Function at 0x14021b7b0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov eax, dword [rsp + 0xc0]
mov esi, dword [rsp + 0xd0]
mov r12, qword [rsp + 0xc8]
mov ebx, dword [rcx + 0x14]
mov r14d, eax
mov qword [rsp + 0xa8], rdx
mov edx, esi
mov rdi, rcx
mov dword [rsp + 0x2c], eax
mov eax, dword [rcx]
sub edx, 1
mov dword [rsp + 0xb0], r8d
mov dword [rsp + 0xb8], r9d
mov dword [rsp + 0x34], eax
mov dword [rsp + 0x44], edx
js 0x14021bdb8
movsxd rbp, esi
movsxd rax, edx
mov edx, edx
lea r9, [r12 + rbp - 2]
add rax, r12
sub r9, rdx
mov edx, 0xd
nop dword [rax + rax]
movzx r8d, byte [rax]
lea ecx, [rdx*8]
sub rax, 1
xor ecx, r8d
xor edx, ecx
cmp r9, rax
jne 0x14021b830
lea eax, [rdx*8]
movzx ecx, byte [rsp + 0x2c]
xor eax, edx
xor edx, edx
xor eax, ecx
mov dword [rsp + 0x40], ecx
mov rcx, qword [rdi + 0x20]
div ebx
mov qword [rsp + 0x38], rcx
mov eax, edx
mov dword [rsp + 0x30], edx
mov r15, qword [rcx + rax*8]
lea r13, [rax*8]
test r15, r15
jne 0x14021b89c
jmp 0x14021ba10
mov r15, qword [r15]
test r15, r15
je 0x14021ba10
cmp byte [r15 + 0x30], r14b
jne 0x14021b890
cmp dword [r15 + 0x1c], esi
jne 0x14021b890
lea rcx, [r15 + 0x31]
mov r8, rbp
mov rdx, r12
call sub.msvcrt.dll_memcmp
test eax, eax
jne 0x14021b890
mov ebx, dword [r15 + 0x10]
mov esi, dword [r15 + 0x18]
mov r8d, eax
mov eax, ebx
sub eax, esi
cmp eax, 0x15
jle 0x14021bb8f
mov ebx, esi
mov rax, qword [r15 + 0x28]
neg ebx
cmp rax, qword [rsp + 0xa8]
je 0x14021bb48
mov r12, qword [rsp + 0xa8]
mov rcx, rdi
xor r8d, r8d
mov rdx, r15
sub r12, rax
call sym.fts5HashAddPoslistSize
movsxd rcx, dword [r15 + 0x18]
add rcx, r15
cmp r12, 0x7f
jbe 0x14021bdaa
cmp r12, 0x3fff
jbe 0x14021bd5b
mov rdx, r12
call sym.putVarint64
mov r8d, eax
add r8d, dword [r15 + 0x18]
mov rax, qword [rsp + 0xa8]
movd xmm0, r8d
pshufd xmm0, xmm0, 0
mov qword [r15 + 0x28], rax
movq qword [r15 + 0x14], xmm0
mov edx, dword [rdi]
cmp edx, 1
je 0x14021bd7a
add r8d, 1
xor eax, eax
test edx, edx
mov r10d, dword [rsp + 0xb0]
setne al
mov dword [r15 + 0x18], r8d
neg eax
mov dword [r15 + 0x24], 0
mov word [r15 + 0x22], ax
test r10d, r10d
js 0x14021bbff
cwde
mov esi, r8d
mov ebp, 1
cmp dword [rsp + 0xb0], eax
je 0x14021b9ba
test edx, edx
je 0x14021bdd7
movzx eax, word [rsp + 0xb0]
mov word [r15 + 0x22], ax
mov eax, dword [rsp + 0xb0]
mov dword [rsp + 0xb8], eax
mov edx, dword [rsp + 0xb8]
sub edx, dword [r15 + 0x24]
movsxd rcx, esi
add edx, 2
add rcx, r15
movsxd rdx, edx
cmp rdx, 0x7f
jbe 0x14021bdca
cmp rdx, 0x3fff
jbe 0x14021be1e
call sym.putVarint64
mov r8d, eax
mov eax, dword [rsp + 0xb8]
add r8d, dword [r15 + 0x18]
mov dword [r15 + 0x18], r8d
add r8d, ebx
mov dword [r15 + 0x24], eax
jmp 0x14021bc07
lea rax, [rbp + 0x72]
mov edx, pe_nt_image_headers64
cmp rax, 0x80
cmovge rdx, rax
mov eax, dword [rdi + 0x10]
add eax, eax
mov qword [rsp + 0x48], rdx
cmp ebx, eax
jle 0x14021bc12
call sym.sqlite3_initialize
mov ebx, eax
test eax, eax
jne 0x14021bbe9
mov r14, qword [rsp + 0x48]
mov rcx, r14
call sym.sqlite3Malloc
mov r15, rax
test rax, rax
je 0x14021bbe9
mov qword [rax + 0x10], 0
lea rcx, [r15 + 0x31]
mov rdx, r12
mov r8, rbp
mov qword [rax], 0
mov qword [rax + 8], 0
mov qword [rax + 0x18], 0
mov qword [rax + 0x20], 0
mov qword [rax + 0x28], 0
mov dword [rax + 0x10], r14d
movzx eax, byte [rsp + 0x2c]
mov byte [r15 + 0x30], al
call sym.memcpy
mov dword [r15 + 0x1c], esi
mov edx, dword [rsp + 0x30]
add esi, 0x32
mov byte [r15 + rbp + 0x31], 0
mov rax, qword [rdi + 0x20]
mov dword [r15 + 0x18], esi
movsxd rsi, esi
lea rax, [rax + rdx*8]
lea rcx, [r15 + rsi]
mov rdx, qword [rax]
mov qword [r15], rdx
mov qword [rax], r15
add dword [rdi + 0x10], 1
cmp qword [rsp + 0xa8], 0x7f
jbe 0x14021be3b
cmp qword [rsp + 0xa8], 0x3fff
jbe 0x14021be4f
mov rdx, qword [rsp + 0xa8]
call sym.putVarint64
mov esi, eax
add esi, dword [r15 + 0x18]
mov rax, qword [rsp + 0xa8]
movd xmm0, esi
pshufd xmm0, xmm0, 0
mov qword [r15 + 0x28], rax
movq qword [r15 + 0x14], xmm0
mov eax, dword [rdi]
cmp eax, 1
je 0x14021bb45
add esi, 1
test eax, eax
setne al
mov dword [r15 + 0x18], esi
movzx eax, al
neg eax
mov word [r15 + 0x22], ax
mov r8d, esi
mov r9d, dword [rsp + 0xb0]
test r9d, r9d
js 0x14021bc02
mov edx, dword [rdi]
cmp edx, 1
je 0x14021bd8c
mov ecx, dword [rsp + 0x34]
xor ebp, ebp
movsx eax, word [r15 + 0x22]
test ecx, ecx
sete bpl
cmp eax, dword [rsp + 0xb0]
jne 0x14021b997
lea r8d, [rbx + rsi]
test ebp, ebp
je 0x14021bc07
jmp 0x14021b9ba
mov dword [rsp + 0x2c], r8d
call sym.sqlite3_initialize
test eax, eax
jne 0x14021bbe9
add ebx, ebx
mov rcx, r15
movsxd rdx, ebx
call sym.sqlite3Realloc
mov rdx, rax
test rax, rax
je 0x14021bbe9
mov r14, qword [rdi + 0x20]
mov r8d, dword [rsp + 0x2c]
mov dword [rax + 0x10], ebx
add r14, r13
mov rax, qword [r14]
cmp rax, r15
je 0x14021bbdb
nop dword [rax]
mov r14, rax
mov rax, qword [rax]
cmp rax, r15
jne 0x14021bbd0
mov qword [r14], rdx
mov esi, dword [rdx + 0x18]
mov r15, rdx
jmp 0x14021b8d3
mov eax, 7
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
sub r8d, esi
mov byte [r15 + 0x20], 1
mov rax, qword [rdi + 8]
add dword [rax], r8d
xor eax, eax
jmp 0x14021bbee
call sym.sqlite3_initialize
test eax, eax
jne 0x14021bbe9
add ebx, ebx
movsxd r15, ebx
shl r15, 3
mov rcx, r15
call sym.sqlite3Malloc
mov r14, rax
test rax, rax
je 0x14021bbe9
mov r8, r15
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov eax, dword [rdi + 0x14]
test eax, eax
jle 0x14021bcef
mov rdx, qword [rsp + 0x38]
sub eax, 1
mov dword [rsp + 0xd0], esi
lea r13, [rdx + rax*8 + 8]
mov rsi, rdx
nop dword [rax + rax]
mov r15, qword [rsi]
test r15, r15
je 0x14021bcdb
mov rax, qword [r15]
lea rcx, [r15 + 0x30]
mov qword [rsi], rax
call sym.strlen
mov ecx, eax
sub ecx, 1
js 0x14021bda0
cdqe
movsxd rdx, ecx
mov ecx, ecx
lea r9, [r15 + rax - 2]
add rdx, r15
mov eax, 0xd
sub r9, rcx
nop dword [rax]
movzx r8d, byte [rdx + 0x30]
lea ecx, [rax*8]
sub rdx, 1
xor ecx, r8d
xor eax, ecx
cmp r9, rdx
jne 0x14021bca8
xor edx, edx
div ebx
lea rax, [r14 + rdx*8]
mov rdx, qword [rax]
mov qword [r15], rdx
mov qword [rax], r15
mov r15, qword [rsi]
test r15, r15
jne 0x14021bc70
add rsi, 8
cmp r13, rsi
jne 0x14021bc68
mov esi, dword [rsp + 0xd0]
mov rcx, qword [rsp + 0x38]
call sym.sqlite3_free
mov edx, dword [rsp + 0x44]
mov dword [rdi + 0x14], ebx
mov qword [rdi + 0x20], r14
test edx, edx
js 0x14021be78
movsxd rax, edx
lea r9, [r12 + rbp - 2]
mov edx, edx
sub r9, rdx
add rax, r12
mov edx, 0xd
nop dword [rax]
movzx r8d, byte [rax]
lea ecx, [rdx*8]
sub rax, 1
xor ecx, r8d
xor edx, ecx
cmp rax, r9
jne 0x14021bd28
lea eax, [rdx*8]
xor eax, edx
xor edx, edx
xor eax, dword [rsp + 0x40]
div ebx
mov dword [rsp + 0x30], edx
jmp 0x14021ba35
mov rax, r12
and r12d, 0x7f
mov r8d, 2
shr rax, 7
mov byte [rcx + 1], r12b
or eax, 0xffffff80
mov byte [rcx], al
jmp 0x14021b92b
mov eax, dword [rsp + 0xb0]
sub r8d, esi
test eax, eax
js 0x14021bc02
mov byte [r15 + 0x21], 1
jmp 0x14021bc07
mov eax, 0xd
jmp 0x14021bcc2
mov byte [rcx], r12b
mov r8d, 1
jmp 0x14021b92b
mov eax, 0x68
mov edx, 0xd
movsxd rbp, esi
jmp 0x14021b850
mov byte [rcx], dl
mov r8d, 1
jmp 0x14021b9f0
lea eax, [rsi + 1]
movsxd rsi, esi
movsxd rdx, dword [rsp + 0xb0]
mov dword [r15 + 0x18], eax
mov byte [r15 + rsi], 1
movsxd rcx, dword [r15 + 0x18]
add rcx, r15
call sym.sqlite3PutVarint
add eax, dword [r15 + 0x18]
mov dword [r15 + 0x24], 0
mov dword [r15 + 0x18], eax
mov esi, eax
movzx eax, word [rsp + 0xb0]
mov word [r15 + 0x22], ax
jmp 0x14021bb82
mov rax, rdx
and edx, 0x7f
mov r8d, 2
shr rax, 7
mov byte [rcx + 1], dl
or eax, 0xffffff80
mov byte [rcx], al
jmp 0x14021b9f0
movzx eax, byte [rsp + 0xa8]
mov esi, 1
mov byte [rcx], al
jmp 0x14021bb09
mov rax, qword [rsp + 0xa8]
mov esi, 2
shr rax, 7
or eax, 0xffffff80
mov byte [rcx], al
movzx eax, byte [rsp + 0xa8]
and eax, 0x7f
mov byte [rcx + 1], al
jmp 0x14021bb09
mov eax, 0x68
mov edx, 0xd
jmp 0x14021bd48