Function at 0x14005ba8c
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x50
mov ebx, dword [rsp + 0xb0]
mov rdi, rcx
mov ecx, dword [rcx + 0xe8]
mov r10d, ecx
movsxd rsi, r8d
xor r11d, r11d
sub r10d, dword [rsp + 0xa0]
xor r8d, r8d
mov rbp, rdx
mov edx, dword [rsp + 0xa8]
sub r10d, ebx
test r9d, r9d
jns 0x14005baea
mov r8d, r9d
add edx, r9d
neg r8d
xor r9d, r9d
test r10d, r10d
jns 0x14005bafb
mov r11d, r10d
add ebx, r10d
neg r11d
xor r10d, r10d
mov r12d, dword [rdi + 0xe4]
lea eax, [r9 + rdx]
cmp eax, r12d
jle 0x14005bb11
mov edx, r12d
sub edx, r9d
lea eax, [r10 + rbx]
cmp eax, ecx
jle 0x14005bb1e
mov ebx, ecx
sub ebx, r10d
test edx, edx
jle 0x14005be50
test ebx, ebx
jle 0x14005be50
test rbp, rbp
je 0x14005be50
mov eax, dword [rdi + 0x13c]
test al, al
jns 0x14005bb76
mov eax, dword [rsp + 0xb8]
mov rcx, rdi
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], r8d
mov rdx, rbp
mov r8d, esi
mov dword [rsp + 0x20], r10d
call fcn.14005b8b8
jmp 0x14005be50
test al, 2
je 0x14005bbeb
movsxd r13, dword [rdi + 0x138]
lea eax, [r8 + r8*2]
movsxd r14, eax
mov eax, r13d
imul eax, r9d
imul r11d, esi
movsxd r15, eax
mov eax, r10d
movsxd r8, r11d
add r8, r14
imul eax, dword [rdi + 0x130]
add r8, rbp
movsxd rcx, eax
add rcx, r15
add rcx, qword [rdi + 0x128]
test edx, edx
jle 0x14005bbdc
mov r9d, edx
mov al, byte [r8 + 2]
xor byte [rcx + 2], al
mov al, byte [r8 + 1]
xor byte [rcx + 1], al
mov al, byte [r8]
add r8, 3
xor byte [rcx], al
add rcx, r13
dec r9
jne 0x14005bbbd
add r11d, esi
inc r10d
dec ebx
jne 0x14005bb96
jmp 0x14005be50
cmp dword [rdi + 0x138], 4
jne 0x14005bdb3
bt eax, 8
jae 0x14005bc74
mov r12d, dword [rsp + 0xb8]
lea eax, [r8 + r8*2]
movsxd r13, eax
mov eax, r9d
shl eax, 2
movsxd r14, eax
imul r11d, esi
mov eax, r10d
movsxd r8, r11d
add r8, r13
imul eax, dword [rdi + 0x130]
add r8, rbp
movsxd rcx, eax
add rcx, r14
add rcx, qword [rdi + 0x128]
test edx, edx
jle 0x14005bc65
mov r9d, edx
mov al, byte [r8 + 2]
mov byte [rcx + 2], al
mov al, byte [r8 + 1]
mov byte [rcx + 1], al
mov al, byte [r8]
mov byte [rcx + 3], r12b
mov byte [rcx], al
add rcx, 4
add r8, 3
dec r9
jne 0x14005bc41
add r11d, esi
inc r10d
dec ebx
jne 0x14005bc1a
jmp 0x14005be50
test al, 8
je 0x14005bcc3
mov eax, r9d
mov r9d, dword [rsp + 0xb8]
shl eax, 2
movsxd r11, eax
mov eax, dword [rdi + 0x130]
imul eax, r10d
movsxd rcx, eax
mov rax, qword [rdi + 0x128]
add rcx, r11
lea r8, [rcx + rax + 3]
test edx, edx
jle 0x14005bcb7
mov eax, edx
mov byte [r8], r9b
add r8, 4
dec rax
jne 0x14005bcab
inc r10d
dec ebx
jne 0x14005bc89
jmp 0x14005be50
test al, 0x10
je 0x14005bcd3
mov eax, dword [rsp + 0xb8]
jmp 0x14005bd85
test al, 0x20
mov eax, dword [rsp + 0xb8]
je 0x14005bd0c
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], r8d
mov rdx, rbp
mov r8d, esi
mov rcx, rdi
mov dword [rsp + 0x20], r10d
call fcn.14005b688
jmp 0x14005be50
cmp eax, 0xff
jne 0x14005bd7d
lea eax, [r8 + r8*2]
movsxd r12, eax
mov eax, r9d
shl eax, 2
movsxd r13, eax
imul r11d, esi
mov eax, dword [rdi + 0x130]
movsxd rcx, r11d
add rcx, r12
add rcx, rbp
imul eax, r10d
movsxd r8, eax
add r8, r13
add r8, qword [rdi + 0x128]
test edx, edx
jle 0x14005bd6e
mov r9d, edx
mov al, byte [rcx + 2]
mov byte [r8 + 2], al
mov al, byte [rcx + 1]
mov byte [r8 + 1], al
mov al, byte [rcx]
add rcx, 3
mov byte [r8], al
add r8, 4
dec r9
jne 0x14005bd4e
add r11d, esi
inc r10d
dec ebx
jne 0x14005bd27
jmp 0x14005be50
test eax, eax
je 0x14005be50
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], r8d
mov rdx, rbp
mov r8d, esi
mov rcx, rdi
mov dword [rsp + 0x20], r10d
call fcn.14005b4ac
jmp 0x14005be50
test al, 8
jne 0x14005be50
mov eax, dword [rsp + 0xb8]
cmp eax, 0xff
jne 0x14005be23
imul r11d, esi
lea eax, [r8 + r8*2]
movsxd r12, eax
movsxd rcx, r11d
lea rax, [rcx + rbp]
add r12, rax
mov eax, dword [rdi + 0x130]
imul eax, r10d
movsxd rbp, eax
lea eax, [r9 + r9*2]
movsxd rcx, eax
lea eax, [rdx + rdx*2]
add rbp, rcx
movsxd r13, eax
add rbp, qword [rdi + 0x128]
mov r8, r13
mov rdx, r12
mov rcx, rbp
call sub.msvcrt.dll_memcpy
movsxd rax, dword [rdi + 0x130]
add r12, rsi
add rbp, rax
dec ebx
jne 0x14005be02
jmp 0x14005be50
test eax, eax
je 0x14005be50
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], ebx
mov dword [rsp + 0x38], edx
mov dword [rsp + 0x30], r11d
mov dword [rsp + 0x28], r8d
mov rdx, rbp
mov r8d, esi
mov rcx, rdi
mov dword [rsp + 0x20], r10d
call fcn.14005b23c
lea r11, [rsp + 0x50]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret