Function at 0x140124c10
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov rdi, r9
mov r9, rcx
mov r13d, edx
mov r12d, 1
cmp edx, 3
jne 0x140124c43
mov eax, r12d
jmp 0x140124c56
mov rcx, r8
xor edx, edx
mov r8, r12
mov eax, 0x400000
shl r8, cl
div r8
lea r15, [rax + rax*4]
mov qword [rbp - 0x38], rax
shl r15, 4
add r15, 0x17f
and r15, 0xffffffffffffff00
mov qword [rbp - 0x28], r15
mov qword [rbp - 0x20], r15
test r9, r9
jne 0x140124c85
mov r14d, 0x400000
jmp 0x140124c96
lea r14, [r9 + 0x3ffff]
add r14, r15
and r14, 0xfffffffffffc0000
mov ecx, 0xb
call fcn.140129340
mov rcx, qword [rdi + 0x20]
cdqe
mov qword [rbp - 0x30], rax
mov qword [rbp + 0x58], rcx
cmp rcx, rax
jb 0x140124cc1
mov ecx, 3
call fcn.140129520
test al, al
jne 0x140124ccb
cmp r13d, 1
jg 0x140124ccb
xor al, al
jmp 0x140124ccd
mov al, 1
xor esi, esi
mov qword [rsp + 0x78], rbx
mov byte [rbp + 0x40], al
mov byte [rbp + 0x48], 0
test r14, 0xffffffffffbfffff
jne 0x140124d91
mov rbx, qword [rdi + 0x50]
test rbx, rbx
je 0x140124d91
dec qword [rdi + 0x40]
mov rdx, r12
mov rax, qword [rbx + 0x10]
mov qword [rdi + 0x50], rax
mov qword [rbx + 0x10], rsi
mov rcx, qword [rdi + 0x58]
add rcx, 0x1e0
call fcn.140129730
cmp byte [rbx + 9], sil
jne 0x140124d3c
cmp r13d, 1
jle 0x140124d3c
mov r9, qword [rdi + 0x58]
lea r8, [rbp + 0x48]
mov rdx, qword [rbx + 0x40]
mov rcx, rbx
call fcn.140126f00
mov byte [rbx + 9], 1
cmp byte [rbx + 8], sil
jne 0x140124e25
mov ecx, 9
call fcn.140129520
test al, al
jne 0x140124d66
mov ecx, 8
call fcn.140129520
test al, al
je 0x140124e25
mov r9, qword [rdi + 0x58]
lea r8, [rbp + 0x58]
mov rdx, qword [rbx + 0x40]
mov rcx, rbx
mov byte [rbp + 0x58], sil
call fcn.1401270b0
cmp byte [rbp + 0x58], sil
je 0x140124e25
mov byte [rbp + 0x48], 1
jmp 0x140124e25
mov rax, qword [rbp + 0x58]
lea r9, [rbp - 0x3f]
cmp rax, qword [rbp - 0x30]
lea r8, [rbp + 0x40]
mov rax, qword [rbp + 0x60]
mov edx, 0x400000
mov qword [rsp + 0x30], rax
mov rcx, r14
lea rax, [rbp - 0x30]
setae byte [rbp - 0x3f]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x48]
mov qword [rsp + 0x20], rax
call fcn.140126ba0
mov rbx, rax
test rax, rax
je 0x140124eda
cmp byte [rbp + 0x40], sil
jne 0x140124e05
mov r9, qword [rdi + 0x58]
lea r8, [rbp - 0x40]
mov rdx, r15
mov byte [rbp - 0x40], sil
mov rcx, rbx
call fcn.140126f00
movzx eax, byte [rbp + 0x48]
cmp byte [rbp - 0x40], sil
cmovne eax, r12d
mov byte [rbp + 0x48], al
mov rax, qword [rbp - 0x30]
mov rdx, rdi
mov qword [rbx], rax
mov ecx, r14d
movzx eax, byte [rbp - 0x3f]
mov byte [rbx + 8], al
movzx eax, byte [rbp + 0x40]
mov byte [rbx + 9], al
call fcn.1401253e0
lea r8, [r15 - 0x10]
xor edx, edx
lea rcx, [rbx + 0x10]
call fcn.140260ab0
mov rax, qword [rbp - 0x38]
mov rcx, rbx
mov qword [rbx + 0x38], rax
mov rax, qword [rbp + 0x50]
mov qword [rbx + 0x58], rax
mov dword [rbx + 0x68], r13d
mov qword [rbx + 0x40], r14
mov qword [rbx + 0x48], r15
mov rax, qword gs:[0x30]
mov qword [rbx + 0x60], rax
call fcn.140126580
xor r8b, r8b
mov qword [rbx + 0x50], rax
cmp qword [rbx + 0x38], rsi
jbe 0x140124ec3
nop dword [rax]
nop word [rax + rax]
lea rdx, [rsi + rsi*4]
shl rdx, 4
add rdx, rbx
and byte [rdx + 0x71], 0xfd
mov byte [rdx + 0x70], r8b
inc r8b
movzx ecx, byte [rbp + 0x40]
shl cl, 2
xor cl, byte [rdx + 0x71]
and cl, 4
movzx esi, r8b
xor cl, byte [rdx + 0x71]
mov byte [rdx + 0x71], cl
movzx eax, byte [rbp + 0x48]
shl al, 3
xor al, cl
and al, 8
xor al, cl
mov byte [rdx + 0x71], al
cmp rsi, qword [rbx + 0x38]
jb 0x140124e80
mov rcx, qword [rdi + 0x58]
mov rdx, qword [rbx + 0x48]
add rcx, 0xa0
call fcn.140129740
mov rax, rbx
mov rbx, qword [rsp + 0x78]
add rsp, 0x80
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret