Function at 0x1401f0f50
Capabilities:
Encode data using xor

Disassembly:
push rdi
push r12
push r15
sub rsp, 0x40
mov rax, qword gs:[0x58]
mov rdi, r9
mov ecx, 4
mov r15, rdx
mov qword [rsp + 0x38], r13
xor r13d, r13d
mov rax, qword [rax]
mov eax, dword [rcx + rax]
cmp dword [0x1404e1e08], eax
jle 0x1401f0fbf
lea rcx, [0x1404e1e08]
call fcn.1401f6548
cmp dword [0x1404e1e08], 0xffffffff
jne 0x1401f0fbf
lea rcx, [0x1402453f0]
mov qword [0x1404e1df8], r13
mov qword [0x1404e1e00], r13
call fcn.1401f6374
lea rcx, [0x1404e1e08]
call fcn.1401f64dc
movzx r12d, byte [rdi]
mov qword [rsp + 0x60], rbx
cmp r12b, 0x15
jne 0x1401f11c3
mov rbx, qword [0x1404e1e00]
mov qword [rsp + 0x68], rbp
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x30], r14
test rbx, rbx
je 0x1401f1006
mov rcx, rbx
mov qword [0x1404e1df8], r13
call fcn.14002d590
mov rbx, r13
mov qword [0x1404e1e00], rbx
movzx esi, byte [rdi + 1]
lea r14, [rdi + 1]
mov ecx, dword [0x1404e1df8]
mov ebp, 8
test sil, sil
je 0x1401f10d2
nop dword [rax]
nop word [rax + rax]
mov r8d, dword [0x1404e1dfc]
xor sil, 0x15
cmp ecx, r8d
jne 0x1401f10a6
lea edi, [rcx + 1]
test r8d, r8d
je 0x1401f1055
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
add eax, r8d
jmp 0x1401f1057
mov eax, ebp
cmp eax, edi
cmovg edi, eax
cmp edi, r8d
jle 0x1401f10a6
movsxd rcx, edi
call fcn.14002d570
mov rdx, qword [0x1404e1e00]
mov rbx, rax
test rdx, rdx
je 0x1401f1093
movsxd r8, dword [0x1404e1df8]
mov rcx, rax
call fcn.140230d70
mov rcx, qword [0x1404e1e00]
call fcn.14002d590
mov ecx, dword [0x1404e1df8]
mov qword [0x1404e1e00], rbx
mov dword [0x1404e1dfc], edi
movsxd rax, ecx
inc r14
mov byte [rax + rbx], sil
mov ecx, dword [0x1404e1df8]
mov rbx, qword [0x1404e1e00]
inc ecx
mov dword [0x1404e1df8], ecx
movzx esi, byte [r14]
test sil, sil
jne 0x1401f1030
mov r8d, dword [0x1404e1dfc]
mov r14, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x70]
cmp ecx, r8d
jne 0x1401f114b
lea edi, [rcx + 1]
test r8d, r8d
je 0x1401f10fc
mov eax, r8d
cdq
sub eax, edx
sar eax, 1
lea ebp, [r8 + rax]
cmp ebp, edi
cmovg edi, ebp
cmp edi, r8d
jle 0x1401f114b
movsxd rcx, edi
call fcn.14002d570
mov rdx, qword [0x1404e1e00]
mov rbx, rax
test rdx, rdx
je 0x1401f1138
movsxd r8, dword [0x1404e1df8]
mov rcx, rax
call fcn.140230d70
mov rcx, qword [0x1404e1e00]
call fcn.14002d590
mov ecx, dword [0x1404e1df8]
mov qword [0x1404e1e00], rbx
mov dword [0x1404e1dfc], edi
movsxd rax, ecx
mov byte [rax + rbx], r13b
lea rbx, [r15 + 1]
inc dword [0x1404e1df8]
call fcn.1400158a0
mov r9, qword [0x1404e1e00]
mov r8d, 0x400
mov rdx, rbx
mov rcx, qword [rax]
mov rax, qword [rsp + 0x80]
or rcx, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
call fcn.140200658
mov rcx, qword [0x1404e1e00]
mov edi, eax
mov rbp, qword [rsp + 0x68]
test edi, edi
mov eax, 0xffffffff
cmovs edi, eax
inc edi
test rcx, rcx
je 0x1401f1202
mov qword [0x1404e1df8], r13
call fcn.14002d590
mov qword [0x1404e1e00], r13
jmp 0x1401f1202
call fcn.1400158a0
mov r9, rdi
mov r8d, 0x400
mov rdx, r15
mov rcx, qword [rax]
mov rax, qword [rsp + 0x80]
or rcx, 2
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r13
call fcn.140200658
mov edi, eax
lea rbx, [r15 + 1]
test edi, edi
mov eax, 0xffffffff
cmovs edi, eax
mov r13, qword [rsp + 0x38]
test r15, r15
je 0x1401f1249
cmp r12b, 0x15
jne 0x1401f122f
mov byte [r15], r12b
movzx eax, byte [rbx]
test al, al
je 0x1401f122f
nop dword [rax]
xor al, 0x15
mov byte [rbx], al
lea rbx, [rbx + 1]
movzx eax, byte [rbx]
test al, al
jne 0x1401f1220
cmp edi, 0xffffffff
je 0x1401f123c
cmp edi, 0x400
jl 0x1401f1241
mov edi, 0x3ff
movsxd rax, edi
mov byte [rax + r15], 0
mov rbx, qword [rsp + 0x60]
mov eax, edi
add rsp, 0x40
pop r15
pop r12
pop rdi
ret