Function at 0x14005a46c
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 0x14005a4ca
mov r8d, r9d
add edx, r9d
neg r8d
xor r9d, r9d
test r10d, r10d
jns 0x14005a4db
mov r11d, r10d
add ebx, r10d
neg r11d
xor r10d, r10d
mov r12d, dword [rdi + 0xe4]
lea eax, [r9 + rdx]
cmp eax, r12d
jle 0x14005a4f1
mov edx, r12d
sub edx, r9d
lea eax, [r10 + rbx]
cmp eax, ecx
jle 0x14005a4fe
mov ebx, ecx
sub ebx, r10d
test edx, edx
jle 0x14005a830
test ebx, ebx
jle 0x14005a830
test rbp, rbp
je 0x14005a830
mov eax, dword [rdi + 0x13c]
test al, al
jns 0x14005a556
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.14005a298
jmp 0x14005a830
test al, 2
je 0x14005a5cb
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 0x14005a5bc
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 0x14005a59d
add r11d, esi
inc r10d
dec ebx
jne 0x14005a576
jmp 0x14005a830
cmp dword [rdi + 0x138], 4
jne 0x14005a793
bt eax, 8
jae 0x14005a654
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 0x14005a645
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 0x14005a621
add r11d, esi
inc r10d
dec ebx
jne 0x14005a5fa
jmp 0x14005a830
test al, 8
je 0x14005a6a3
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 0x14005a697
mov eax, edx
mov byte [r8], r9b
add r8, 4
dec rax
jne 0x14005a68b
inc r10d
dec ebx
jne 0x14005a669
jmp 0x14005a830
test al, 0x10
je 0x14005a6b3
mov eax, dword [rsp + 0xb8]
jmp 0x14005a765
test al, 0x20
mov eax, dword [rsp + 0xb8]
je 0x14005a6ec
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.14005a068
jmp 0x14005a830
cmp eax, 0xff
jne 0x14005a75d
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 0x14005a74e
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 0x14005a72e
add r11d, esi
inc r10d
dec ebx
jne 0x14005a707
jmp 0x14005a830
test eax, eax
je 0x14005a830
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.140059e8c
jmp 0x14005a830
test al, 8
jne 0x14005a830
mov eax, dword [rsp + 0xb8]
cmp eax, 0xff
jne 0x14005a803
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 0x14005a7e2
jmp 0x14005a830
test eax, eax
je 0x14005a830
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.140059c1c
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