Function at 0x140059718
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 ebp, dword [rcx + 0xe8]
mov r10d, dword [rsp + 0xb0]
mov edi, r8d
mov r11d, ebp
mov r12, rdx
xor r8d, r8d
sub r11d, dword [rsp + 0xa0]
xor edx, edx
mov rbx, rcx
mov ecx, dword [rsp + 0xa8]
sub r11d, r10d
test r9d, r9d
jns 0x140059776
mov r8d, r9d
add ecx, r9d
neg r8d
xor r9d, r9d
test r11d, r11d
jns 0x140059786
mov edx, r11d
add r10d, r11d
neg edx
xor r11d, r11d
mov esi, dword [rbx + 0xe4]
lea eax, [r9 + rcx]
cmp eax, esi
jle 0x140059799
mov ecx, esi
sub ecx, r9d
lea eax, [r11 + r10]
cmp eax, ebp
jle 0x1400597a7
mov r10d, ebp
sub r10d, r11d
test ecx, ecx
jle 0x140059a90
test r10d, r10d
jle 0x140059a90
test r12, r12
je 0x140059a90
mov eax, dword [rbx + 0x13c]
test al, al
jns 0x140059800
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.140059514
jmp 0x140059a90
test al, 2
je 0x140059878
movsxd r13, dword [rbx + 0x138]
mov eax, r8d
shl eax, 2
movsxd r14, eax
mov eax, r13d
imul eax, r9d
imul edx, edi
movsxd r15, eax
mov eax, r11d
movsxd r9, edx
add r9, r14
imul eax, dword [rbx + 0x130]
add r9, r12
movsxd r8, eax
add r8, r15
add r8, qword [rbx + 0x128]
test ecx, ecx
jle 0x140059869
mov esi, ecx
mov al, byte [r9 + 2]
xor byte [r8 + 2], al
mov al, byte [r9 + 1]
xor byte [r8 + 1], al
mov al, byte [r9]
add r9, 4
xor byte [r8], al
add r8, r13
dec rsi
jne 0x140059847
add edx, edi
inc r11d
dec r10d
jne 0x140059821
jmp 0x140059a90
cmp dword [rbx + 0x138], 4
jne 0x1400599e2
bt eax, 8
jae 0x1400598c0
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.140058ab4
jmp 0x140059a90
test al, 8
je 0x1400598f9
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.1400593ac
jmp 0x140059a90
test al, 0x10
jne 0x140059940
test al, 0x20
je 0x140059936
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.140059028
jmp 0x140059a90
cmp dword [rsp + 0xc0], 0
je 0x140059975
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.140058c48
jmp 0x140059a90
mov eax, r8d
shl eax, 2
movsxd rbp, eax
mov eax, r9d
shl eax, 2
movsxd r13, eax
imul edx, edi
mov eax, r11d
movsxd r8, edx
add r8, rbp
imul eax, dword [rbx + 0x130]
add r8, r12
movsxd r9, eax
add r9, r13
add r9, qword [rbx + 0x128]
test ecx, ecx
jle 0x1400599d3
mov esi, ecx
mov al, byte [r8 + 2]
mov byte [r9 + 2], al
mov al, byte [r8 + 1]
mov byte [r9 + 1], al
mov al, byte [r8]
add r8, 4
mov byte [r9], al
add r9, 4
dec rsi
jne 0x1400599b0
add edx, edi
inc r11d
dec r10d
jne 0x14005998a
jmp 0x140059a90
test al, 8
jne 0x140059a90
cmp dword [rsp + 0xc0], 0
jne 0x140059a60
test al, 0x30
jne 0x140059a60
mov eax, r8d
shl eax, 2
movsxd rbp, eax
lea eax, [r9 + r9*2]
imul edx, edi
movsxd r13, eax
mov eax, dword [rbx + 0x130]
movsxd r8, edx
add r8, rbp
add r8, r12
imul eax, r11d
movsxd r9, eax
add r9, r13
add r9, qword [rbx + 0x128]
test ecx, ecx
jle 0x140059a54
mov esi, ecx
mov al, byte [r8 + 2]
mov byte [r9 + 2], al
mov al, byte [r8 + 1]
mov byte [r9 + 1], al
mov al, byte [r8]
add r8, 4
mov byte [r9], al
add r9, 3
dec rsi
jne 0x140059a31
add edx, edi
inc r11d
dec r10d
jne 0x140059a0b
jmp 0x140059a90
mov eax, dword [rsp + 0xb8]
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x40], r10d
mov dword [rsp + 0x38], ecx
mov dword [rsp + 0x30], edx
mov dword [rsp + 0x28], r8d
mov rcx, rbx
mov r8d, edi
mov rdx, r12
mov dword [rsp + 0x20], r11d
call fcn.140058730
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