Function at 0x1400040c0
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
mov rbp, rsp
sub rsp, 0x30
mov rbx, rcx
cmp qword [rcx + 0xa8], 0
je 0x1400043a0
lea rdi, [rcx + 0x90]
mov edx, dword [rdi]
test edx, edx
je 0x14000410c
sub edx, 1
je 0x1400041b8
sub edx, 1
je 0x14000410c
cmp edx, 1
jne 0x140004384
and qword [rbp + 0x10], 0
mov ecx, dword [0x14002dd70]
mov rax, qword gs:[0x58]
cmp dword [rdi], 2
jne 0x140004208
mov dword [rbp - 0x10], 0xad0091
mov dword [rbp - 0xc], 0xdf00f4
mov rdi, qword [rax + rcx*8]
mov ecx, 0x34
mov eax, dword [rcx + rdi]
mov esi, 0x28
test al, 1
jne 0x140004173
or eax, 1
mov dword [rcx + rdi], eax
mov byte [rdi + rsi + 0xa], 1
mov rax, qword [rbp - 0x10]
mov qword [rdi + rsi], rax
mov word [rdi + rsi + 8], 0xf3
lea rcx, [0x14001f9f8]
call fcn.14000e9f4
nop
lea r8, [rdi + rsi]
cmp byte [r8 + 0xa], 0
je 0x140004327
xor r10d, r10d
mov r9d, 0xff
mov cl, r10b
and cl, 7
shl cl, 3
movabs rdx, 0x4fb7d5f3ab95cfbf
shr rdx, cl
and dx, r9w
xor word [r8 + r10*2], dx
inc r10
cmp r10, 5
jb 0x14000418b
jmp 0x140004322
and qword [rbp + 0x10], 0
lea rax, [rcx + 0x98]
mov rcx, rax
cmp qword [rax + 0x18], 0xf
jbe 0x1400041d1
mov rcx, qword [rax]
mov qword [rbp - 0x10], rcx
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
movaps xmm0, xmmword [rbp - 0x10]
movdqa xmmword [rbp - 0x10], xmm0
lea rdx, [rbp + 0x10]
lea rcx, [rbp - 0x10]
call fcn.1400087a4
mov r8d, eax
mov edx, 3
mov rcx, rbx
call fcn.140003ef4
jmp 0x140004384
mov rsi, qword [rax + rcx*8]
cmp dword [rdi], 3
jne 0x1400042a0
mov dword [rbp - 0x10], 0x6a006f
mov dword [rbp - 0xc], 0x170096
mov ecx, 0x44
mov eax, dword [rcx + rsi]
mov edi, 0x38
test al, 1
jne 0x14000425b
or eax, 1
mov dword [rcx + rsi], eax
mov byte [rsi + rdi + 0xa], 1
mov rax, qword [rbp - 0x10]
mov qword [rsi + rdi], rax
mov word [rsi + rdi + 8], 0xa7
lea rcx, [0x14001fa28]
call fcn.14000e9f4
nop
lea r8, [rdi + rsi]
cmp byte [r8 + 0xa], 0
je 0x140004327
xor r10d, r10d
mov r9d, 0xff
mov cl, r10b
and cl, 7
shl cl, 3
movabs rdx, 0x297b45a773fb0941
shr rdx, cl
and dx, r9w
xor word [r8 + r10*2], dx
inc r10
cmp r10, 5
jb 0x140004273
jmp 0x140004322
mov dword [rbp - 0x10], 0xac0093
mov dword [rbp - 0xc], 0x1e0027
mov ecx, 0x54
mov eax, dword [rcx + rsi]
mov edi, 0x48
test al, 1
jne 0x1400042e6
or eax, 1
mov dword [rcx + rsi], eax
mov byte [rsi + rdi + 0xa], 1
mov rax, qword [rbp - 0x10]
mov qword [rsi + rdi], rax
mov word [rsi + rdi + 8], 0xcd
lea rcx, [0x14001fa58]
call fcn.14000e9f4
nop
lea r8, [rdi + rsi]
cmp byte [r8 + 0xa], 0
je 0x140004327
xor r10d, r10d
mov r9d, 0xff
mov cl, r10b
and cl, 7
shl cl, 3
movabs rdx, 0x7fad1dcd7b5fc9bd
shr rdx, cl
and dx, r9w
xor word [r8 + r10*2], dx
inc r10
cmp r10, 5
jb 0x1400042fa
mov byte [r8 + 0xa], 0
lea rax, [rbx + 0x98]
mov rcx, rax
cmp qword [rax + 0x18], 0xf
jbe 0x14000433b
mov rcx, qword [rax]
mov qword [rbp - 0x10], rcx
mov rax, qword [rax + 0x10]
mov qword [rbp - 8], rax
movaps xmm0, xmmword [rbp - 0x10]
movdqa xmmword [rbp - 0x10], xmm0
lea rdx, [rbp + 0x10]
lea rcx, [rbp - 0x10]
call fcn.140008df8
mov edi, eax
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x14000436d
call fcn.14000dc04
mov r8d, edi
mov edx, 3
mov rcx, rbx
call fcn.140003ef4
lea rdi, [rbx + 0x90]
or dword [rdi], 0xffffffff
lea rax, [rbx + 0x98]
and qword [rax + 0x10], 0
cmp qword [rax + 0x18], 0xf
jbe 0x14000439d
mov rax, qword [rax]
mov byte [rax], 0
mov rbx, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
mov rdi, qword [rsp + 0x58]
add rsp, 0x30
pop rbp
ret