Function at 0x1401d9940
Capabilities:
Encode data using xor

Disassembly:
push rbx
push r12
push r14
push r15
mov eax, 0x58
call fcn.140215a20
sub rsp, rax
mov rax, qword [rcx + 0x180]
mov rbx, rcx
mov rcx, qword [rcx + 0x38]
mov r14, r9
mov qword [rsp + 0x30], rax
add rcx, r9
movabs rax, 0xfffffffe0
mov r12, r8
mov r15, rdx
cmp rcx, rax
ja 0x1401d9bde
cmp rcx, r9
jb 0x1401d9bde
cmp dword [rbx + 0x174], 0
mov qword [rsp + 0x88], rbp
mov qword [rsp + 0x50], rsi
mov qword [rbx + 0x38], rcx
je 0x1401d99c1
lea rdx, [rbx + 0x60]
lea rcx, [rbx + 0x40]
call fcn.1401da940
mov dword [rbx + 0x174], 0
movzx eax, byte [rbx + 0xd]
mov esi, dword [rbx + 0x170]
movzx ebp, byte [rbx + 0xc]
shl ebp, 8
or ebp, eax
mov dword [rsp + 0x80], esi
movzx eax, byte [rbx + 0xe]
shl ebp, 8
or ebp, eax
movzx eax, byte [rbx + 0xf]
shl ebp, 8
or ebp, eax
test esi, esi
je 0x1401d9a39
test r14, r14
je 0x1401d9a24
movzx edx, byte [r15]
dec r14
mov ecx, esi
inc r15
movzx eax, byte [rcx + rbx + 0x10]
xor al, dl
mov byte [r12], al
inc r12
xor byte [rcx + rbx + 0x40], dl
inc esi
and esi, 0xf
mov dword [rsp + 0x80], esi
jne 0x1401d99f1
jmp 0x1401d9a2c
test esi, esi
jne 0x1401d9bd4
lea rdx, [rbx + 0x60]
lea rcx, [rbx + 0x40]
call fcn.1401da940
mov qword [rsp + 0x48], rdi
mov qword [rsp + 0x40], r13
mov r13, qword [rsp + 0xa0]
cmp r14, 0xc00
jb 0x1401d9aec
movabs rax, 0xaaaaaaaaaaaaaaab
mul r14
mov rdi, rdx
shr rdi, 0xb
imul rax, rdi, 0xfffffffffffff400
add r14, rax
nop word [rax + rax]
mov r9d, 0xc00
lea rdx, [rbx + 0x60]
mov r8, r15
lea rcx, [rbx + 0x40]
call fcn.1401da770
mov r9, qword [rsp + 0x30]
mov r8d, 0xc0
mov rdx, r12
mov qword [rsp + 0x20], rbx
mov rcx, r15
call r13
add ebp, 0xc0
add r12, 0xc00
mov eax, ebp
mov byte [rbx + 0xf], bpl
shr eax, 0x18
add r15, 0xc00
mov byte [rbx + 0xc], al
mov eax, ebp
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, ebp
shr eax, 8
mov byte [rbx + 0xe], al
sub rdi, 1
jne 0x1401d9a80
mov esi, dword [rsp + 0x80]
mov r13, r14
and r13, 0xfffffffffffffff0
je 0x1401d9b50
mov rdi, r13
lea rdx, [rbx + 0x60]
lea rcx, [rbx + 0x40]
shr rdi, 4
mov r9, r13
mov r8, r15
call fcn.1401da770
mov r9, qword [rsp + 0x30]
mov r8, rdi
mov rdx, r12
mov qword [rsp + 0x20], rbx
mov rcx, r15
call qword [rsp + 0xa0]
add ebp, edi
add r12, r13
mov eax, ebp
mov byte [rbx + 0xf], bpl
shr eax, 0x18
add r15, r13
mov byte [rbx + 0xc], al
mov eax, ebp
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, ebp
shr eax, 8
mov byte [rbx + 0xe], al
sub r14, r13
mov r13, qword [rsp + 0x40]
test r14, r14
je 0x1401d9bae
mov r8, qword [rsp + 0x30]
lea rdx, [rbx + 0x10]
mov rcx, rbx
call qword [rbx + 0x178]
inc ebp
mov eax, ebp
mov byte [rbx + 0xf], bpl
shr eax, 0x18
mov byte [rbx + 0xc], al
mov eax, ebp
shr eax, 0x10
mov byte [rbx + 0xd], al
mov eax, ebp
shr eax, 8
mov byte [rbx + 0xe], al
nop word [rax + rax]
mov edx, esi
inc esi
movzx ecx, byte [rdx + r15]
movzx eax, byte [rbx + rdx + 0x10]
xor byte [rdx + rbx + 0x40], cl
xor al, cl
mov byte [rdx + r12], al
sub r14, 1
jne 0x1401d9b90
mov rdi, qword [rsp + 0x48]
xor eax, eax
mov dword [rbx + 0x170], esi
mov rbp, qword [rsp + 0x88]
mov rsi, qword [rsp + 0x50]
add rsp, 0x58
pop r15
pop r14
pop r12
pop rbx
ret
mov dword [rbx + 0x170], esi
xor eax, eax
jmp 0x1401d9bbb
or eax, 0xffffffff
add rsp, 0x58
pop r15
pop r14
pop r12
pop rbx
ret