Function at 0x140058494
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 0x1400584f2
mov r8d, r9d
add ecx, r9d
neg r8d
xor r9d, r9d
test r11d, r11d
jns 0x140058502
mov edx, r11d
add r10d, r11d
neg edx
xor r11d, r11d
mov esi, dword [rbx + 0xe4]
lea eax, [r9 + rcx]
cmp eax, esi
jle 0x140058515
mov ecx, esi
sub ecx, r9d
lea eax, [r11 + r10]
cmp eax, ebp
jle 0x140058523
mov r10d, ebp
sub r10d, r11d
test ecx, ecx
jle 0x14005880c
test r10d, r10d
jle 0x14005880c
test r12, r12
je 0x14005880c
mov eax, dword [rbx + 0x13c]
test al, al
jns 0x14005857c
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.140058290
jmp 0x14005880c
test al, 2
je 0x1400585f4
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 0x1400585e5
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 0x1400585c3
add edx, edi
inc r11d
dec r10d
jne 0x14005859d
jmp 0x14005880c
cmp dword [rbx + 0x138], 4
jne 0x14005875e
bt eax, 8
jae 0x14005863c
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.140057830
jmp 0x14005880c
test al, 8
je 0x140058675
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.140058128
jmp 0x14005880c
test al, 0x10
jne 0x1400586bc
test al, 0x20
je 0x1400586b2
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.140057da4
jmp 0x14005880c
cmp dword [rsp + 0xc0], 0
je 0x1400586f1
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.1400579c4
jmp 0x14005880c
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 0x14005874f
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 0x14005872c
add edx, edi
inc r11d
dec r10d
jne 0x140058706
jmp 0x14005880c
test al, 8
jne 0x14005880c
cmp dword [rsp + 0xc0], 0
jne 0x1400587dc
test al, 0x30
jne 0x1400587dc
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 0x1400587d0
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 0x1400587ad
add edx, edi
inc r11d
dec r10d
jne 0x140058787
jmp 0x14005880c
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.1400574ac
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