Function at 0x140060956
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x98
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x10], 0xfffffffffffffffe
mov qword [rbp - 8], r9
mov r14, r8
mov rbx, rdx
mov rdi, rcx
mov eax, dword [rcx + 0x20]
mov r13d, dword [rdx + 0xc]
mov ecx, dword [rcx + 0xb4]
cmp ecx, eax
mov dword [rbp - 0xc], eax
jle 0x1400609a0
push 1
pop r8
jmp 0x1400609a6
cdq
idiv ecx
mov r8d, eax
lea rdx, [rbp - 0x30]
mov rcx, rbx
mov r9d, r13d
call fcn.14005fe02
test r14, r14
je 0x1400609da
mov rax, qword [rbp + 0x80]
mov eax, dword [rax]
mov dword [rsp + 0x20], eax
lea rcx, [rbp - 0x30]
mov rdx, r14
mov r8, qword [rbp - 8]
xor r9d, r9d
call fcn.140066744
mov eax, dword [rdi + 0xc0]
mov ecx, r13d
sub ecx, eax
mov dword [rbp + 8], ecx
jle 0x140060d76
cdqe
and dword [rdi + 0xc0], 0
imul rax, qword [rbp - 8]
add r14, rax
xor r13d, r13d
xor ebx, ebx
mov qword [rbp - 0x18], r14
cmp r13d, dword [rbp + 8]
jge 0x140060d81
mov eax, dword [rdi + 0xa0]
mov ecx, dword [rdi + 0xb0]
sub eax, ecx
cmp eax, 1
mov r14, qword [rbp - 0x18]
ja 0x140060a41
mov rcx, rdi
call fcn.140060412
cmp rax, 2
jb 0x140060d85
mov ecx, dword [rdi + 0xb0]
mov rax, qword [rdi + 0x98]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov esi, ecx
movzx r15d, byte [rax + rsi]
add ecx, 2
mov dword [rdi + 0xb0], ecx
mov r12b, byte [rax + rdx]
test r15d, r15d
je 0x140060b1d
add r15d, ebx
mov edx, dword [rbp - 0xc]
cmp r15d, edx
jl 0x140060a7c
mov r15d, edx
movzx edx, word [rdi + 0x70]
cmp dx, 0x18
jne 0x140060b63
mov edx, dword [rdi + 0xa0]
sub edx, ecx
cmp edx, 1
ja 0x140060ab6
mov rcx, rdi
call fcn.140060412
cmp rax, 2
jb 0x140060d85
mov rax, qword [rdi + 0x98]
mov ecx, dword [rdi + 0xb0]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov esi, ecx
mov r14b, byte [rax + rsi]
add ecx, 2
mov dword [rdi + 0xb0], ecx
cmp ebx, r15d
jge 0x140060a08
mov al, byte [rax + rdx]
mov byte [rbp + 4], al
mov rdx, qword [rbp - 0x18]
mov byte [rsp + 0x40], r12b
mov byte [rsp + 0x38], r14b
mov al, byte [rbp + 4]
mov byte [rsp + 0x30], al
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], ebx
inc ebx
mov rcx, rdi
mov rsi, rdx
mov r8, qword [rbp - 8]
lea r9, [rbp - 0x30]
call fcn.14006054e
mov rdx, rsi
cmp ebx, r15d
jl 0x140060ae1
jmp 0x140060a08
movzx r8d, r12b
cmp r8d, 2
je 0x140060d0b
cmp r8d, 1
je 0x140060d81
test r8d, r8d
je 0x140060d6c
movzx edx, word [rdi + 0x70]
cmp edx, 0xf
ja 0x140060bcc
mov al, 8
movzx eax, al
div dl
movzx esi, al
lea eax, [r8 + rsi]
dec eax
xor edx, edx
div esi
mov edx, eax
jmp 0x140060bd3
mov byte [rbp + 0xe], r12b
mov byte [rbp + 0xf], r12b
cmp dx, 4
jne 0x140060b82
mov eax, r12d
shr al, 4
mov byte [rbp + 0xe], al
and r12b, 0xf
mov byte [rbp + 0xf], r12b
cmp ebx, r15d
jge 0x140060a08
xor esi, esi
mov r14, qword [rbp - 8]
mov rdx, qword [rbp - 0x18]
mov eax, esi
mov al, byte [rbp + rax + 0xe]
mov byte [rsp + 0x30], al
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], ebx
mov rcx, rdi
mov r12, rdx
mov r8, r14
lea r9, [rbp - 0x30]
call fcn.140060472
mov rdx, r12
xor esi, 1
inc ebx
cmp ebx, r15d
jl 0x140060b95
jmp 0x140060a08
shr edx, 3
imul edx, r8d
add r8d, ebx
cmp r8d, dword [rbp - 0xc]
jg 0x140060d85
mov edx, edx
mov eax, dword [rdi + 0xa0]
sub eax, ecx
mov qword [rbp - 0x38], rdx
lea rsi, [rdx + 1]
and rsi, 0xfffffffffffffffe
cmp rsi, rax
jbe 0x140060c0c
mov rcx, rdi
call fcn.140060412
cmp rax, rsi
jb 0x140060d85
movzx eax, word [rdi + 0x70]
cmp eax, 4
je 0x140060c61
cmp eax, 8
jne 0x140060da5
mov rax, qword [rdi + 0x98]
mov ecx, dword [rdi + 0xb0]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov al, byte [rax + rcx]
mov byte [rsp + 0x30], al
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], ebx
mov rcx, rdi
mov rdx, r14
mov r8, qword [rbp - 8]
lea r9, [rbp - 0x30]
call fcn.140060472
mov al, 0xff
push 1
pop rcx
jmp 0x140060ce1
mov rax, qword [rdi + 0x98]
mov ecx, dword [rdi + 0xb0]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov sil, byte [rax + rcx]
mov eax, esi
shr al, 4
lea ecx, [rbx + 1]
mov dword [rbp + 4], ecx
mov byte [rsp + 0x30], al
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], ebx
mov rcx, rdi
mov rdx, r14
mov r15d, r13d
mov r13, qword [rbp - 8]
mov r8, r13
lea r9, [rbp - 0x30]
call fcn.140060472
cmp r12b, 1
je 0x140060cee
and sil, 0xf
mov byte [rsp + 0x30], sil
mov dword [rsp + 0x28], r15d
mov eax, dword [rbp + 4]
mov dword [rsp + 0x20], eax
mov rcx, rdi
mov rdx, r14
mov r8, r13
lea r9, [rbp - 0x30]
call fcn.140060472
mov al, 0xfe
push 2
pop rcx
mov r13d, r15d
add ebx, ecx
add r12b, al
jne 0x140060c0c
jmp 0x140060cf6
mov eax, dword [rbp + 4]
mov ebx, eax
mov r13d, r15d
test byte [rbp - 0x38], 1
je 0x140060a08
inc dword [rdi + 0xb0]
jmp 0x140060a08
mov edx, dword [rdi + 0xa0]
sub edx, ecx
cmp edx, 1
ja 0x140060d33
mov rcx, rdi
call fcn.140060412
cmp rax, 2
jb 0x140060d85
mov rax, qword [rdi + 0x98]
mov ecx, dword [rdi + 0xb0]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov esi, ecx
movzx esi, byte [rax + rsi]
add ecx, 2
mov dword [rdi + 0xb0], ecx
add ebx, esi
cmp ebx, dword [rbp - 0xc]
jg 0x140060d85
mov ecx, edx
movzx eax, byte [rax + rcx]
add r13d, eax
mov eax, r13d
sub eax, dword [rbp + 8]
jle 0x140060a08
jmp 0x140060e0a
inc r13d
xor ebx, ebx
jmp 0x140060a08
sub eax, r13d
mov dword [rdi + 0xc0], eax
jmp 0x140060d85
mov r13d, dword [rbp + 8]
lea rcx, [rbp - 0x30]
call fcn.140042d92
mov eax, r13d
add rsp, 0x98
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
cmp eax, 0x18
jne 0x140060d85
mov rax, qword [rdi + 0x98]
mov ecx, dword [rdi + 0xb0]
lea edx, [rcx + 1]
mov dword [rdi + 0xb0], edx
mov r8b, byte [rax + rcx]
lea esi, [rcx + 2]
mov dword [rdi + 0xb0], esi
mov dl, byte [rax + rdx]
add ecx, 3
mov dword [rdi + 0xb0], ecx
mov al, byte [rax + rsi]
mov byte [rsp + 0x40], r8b
mov byte [rsp + 0x38], dl
mov byte [rsp + 0x30], al
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], ebx
lea r9, [rbp - 0x30]
mov rcx, rdi
mov rdx, r14
mov r8, qword [rbp - 8]
call fcn.14006054e
jmp 0x140060d85
mov r13d, dword [rbp + 8]
jmp 0x140060d79