Function at 0x1401d4010
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r12
mov eax, 0x50
call fcn.1402563f0
sub rsp, rax
mov r12, qword [rsp + 0xa8]
mov r10, r9
mov rdi, r8
mov ebx, dword [r12]
mov rsi, rdx
mov rbp, rcx
test ebx, ebx
jns 0x1401d4057
mov dword [r12], 0xffffffff
add rsp, 0x50
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
cmp dword [rsp + 0xb0], 0
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r14
mov qword [rsp + 0x38], r15
je 0x1401d41cd
mov r14, qword [rsp + 0xa0]
test ebx, ebx
je 0x1401d40a9
test rdi, rdi
je 0x1401d40a9
movzx eax, byte [rbp]
mov edx, ebx
inc rsi
movzx ecx, byte [rdx + r14]
inc rbp
dec rdi
xor ecx, eax
inc ebx
and ebx, 0xf
mov byte [rdx + r14], cl
mov byte [rsi - 1], cl
jne 0x1401d4080
mov r9, qword [rsp + 0xb8]
movsxd r15, ebx
cmp rdi, 0x10
jb 0x1401d4185
mov r12, rsi
mov r13, rbp
mov rcx, rdi
shr rcx, 4
sub r12, r14
sub r13, r14
mov rax, rcx
imul rax, rax, 0xfffffffffffffff0
add rdi, rax
mov rax, rcx
shl rax, 4
add rsi, rax
add rbp, rax
mov qword [rsp + 0x80], rbp
mov rbp, qword [rsp + 0x98]
mov qword [rsp + 0x88], rsi
mov rsi, rcx
mov r8, rbp
mov rdx, r14
mov rcx, r14
call r9
cmp ebx, 0x10
jae 0x1401d414b
mov edx, reloc.WS2_32.dll_ntohs
lea rcx, [r15 + r14]
sub edx, ebx
shr edx, 3
inc edx
nop word [rax + rax]
mov rax, qword [r13 + rcx]
add rcx, 8
xor qword [rcx - 8], rax
dec rdx
mov rax, qword [rcx - 8]
mov qword [r12 + rcx - 8], rax
jne 0x1401d4130
mov r9, qword [rsp + 0xb8]
add r12, 0x10
add r13, 0x10
xor ebx, ebx
xor r15d, r15d
dec rsi
jne 0x1401d4103
mov rsi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
mov r10, qword [rsp + 0x98]
mov r12, qword [rsp + 0xa8]
test rdi, rdi
je 0x1401d431d
mov r8, r10
mov rdx, r14
mov rcx, r14
call r9
movsxd rdx, ebx
sub rbp, r14
add rdx, r14
sub rsi, r14
add ebx, edi
nop dword [rax + rax]
movzx ecx, byte [rdx + rbp]
movzx eax, byte [rdx]
inc rdx
xor ecx, eax
dec rdi
mov byte [rdx - 1], cl
mov byte [rdx + rsi - 1], cl
jne 0x1401d41b0
jmp 0x1401d431d
mov r13, qword [rsp + 0xa0]
test ebx, ebx
je 0x1401d4209
nop dword [rax]
test rdi, rdi
je 0x1401d4209
movzx edx, byte [rbp]
mov ecx, ebx
inc rsi
movzx eax, byte [rcx + r13]
inc rbp
dec rdi
xor al, dl
inc ebx
and ebx, 0xf
mov byte [rsi - 1], al
mov byte [rcx + r13], dl
jne 0x1401d41e0
mov r9, qword [rsp + 0xb8]
movsxd r14, ebx
cmp rdi, 0x10
jb 0x1401d42d4
mov r15, rdi
mov r12, rsi
shr r15, 4
sub r12, r13
mov rax, r15
imul rax, rax, 0xfffffffffffffff0
add rdi, rax
mov qword [rsp + 0x90], rdi
mov rdi, qword [rsp + 0x98]
nop word [rax + rax]
mov r8, rdi
mov rdx, r13
mov rcx, r13
call r9
cmp ebx, 0x10
jae 0x1401d429e
mov r9d, reloc.WS2_32.dll_ntohs
mov r10, rbp
lea r8, [r14 + r13]
sub r9d, ebx
sub r10, rsi
shr r9d, 3
inc r9d
nop dword [rax + rax]
mov rax, qword [r8]
lea rcx, [r12 + r8]
add r8, 8
mov rdx, qword [rcx + r10]
xor rax, rdx
dec r9
mov qword [rcx], rax
mov qword [r8 - 8], rdx
jne 0x1401d4280
mov r9, qword [rsp + 0xb8]
add rsi, 0x10
add r12, 0x10
add rbp, 0x10
xor ebx, ebx
xor r14d, r14d
dec r15
jne 0x1401d4250
mov rdi, qword [rsp + 0x90]
mov r10, qword [rsp + 0x98]
mov r12, qword [rsp + 0xa8]
test rdi, rdi
je 0x1401d431d
mov r8, r10
mov rdx, r13
mov rcx, r13
call r9
movsxd r8, ebx
sub rbp, rsi
add r8, r13
sub rsi, r13
add ebx, edi
nop word [rax + rax]
lea rcx, [r8 + rsi]
inc r8
movzx edx, byte [rcx + rbp]
movzx eax, dl
xor al, byte [r8 - 1]
dec rdi
mov byte [rcx], al
mov byte [r8 - 1], dl
jne 0x1401d4300
mov r14, qword [rsp + 0x40]
mov r13, qword [rsp + 0x48]
mov r15, qword [rsp + 0x38]
mov dword [r12], ebx
add rsp, 0x50
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret