Function at 0x140003f20
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rbp
push rdi
push r12
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rax, qword [0x1400cb180]
xor rax, rsp
mov qword [rbp - 8], rax
mov r14, rdx
mov qword [rbp - 0x50], rdx
xor ebx, ebx
add rcx, 0xa98
call fcn.140003980
mov rdi, rax
lea rcx, [rax + 0x10]
call fcn.140005320
movsxd r15, eax
mov rsi, r15
test eax, eax
jne 0x14000405f
mov eax, dword [str.vZB7Xbox]
mov dword [rbp - 0x50], eax
cmp byte [0x1400ac65b], bl
je 0x14000404e
cmp dword [0x1400cb1d8], 2
jl 0x140004019
movdqa xmm3, xmmword [0x1400b3760]
movdqa xmm2, xmm3
punpckldq xmm2, xmm3
pmuldq xmm2, xmmword [0x1400b3870]
movdqa xmm0, xmm3
punpckhdq xmm0, xmm3
pmuldq xmm0, xmmword [0x1400b3870]
shufps xmm2, xmm0, 0xdd
psrad xmm2, 1
movdqa xmm0, xmm2
psrld xmm0, 0x1f
paddd xmm0, xmm2
pmulld xmm0, xmmword [0x1400b3800]
psubd xmm3, xmm0
andps xmm3, xmmword [0x1400b3820]
packuswb xmm3, xmm3
packuswb xmm3, xmm3
paddb xmm3, xmmword [0x1400b3890]
movd xmm0, eax
xorps xmm3, xmm0
movd dword [rbp - 0x50], xmm3
lea rdx, [rbp - 0x50]
mov rcx, r14
call fcn.140004ff0
jmp 0x140004206
lea r8, [rbp - 0x50]
nop dword [rax]
mov eax, 0x29e4129f
mul ebx
mov eax, ebx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
movsx eax, al
imul ecx, eax, 0x37
movzx edx, bl
sub dl, cl
add dl, 0x34
xor byte [r8], dl
inc ebx
lea r8, [r8 + 1]
cmp ebx, 4
jl 0x140004020
lea rdx, [rbp - 0x50]
mov rcx, r14
call fcn.140004ff0
jmp 0x140004206
lea rcx, [rdi + 8]
call fcn.140003980
mov r12, rax
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x40], xmm0
mov qword [rbp - 0x30], rbx
movabs rax, 0x7fffffffffffffff
cmp rsi, rax
ja 0x140004234
add rsi, rsi
jne 0x140004094
mov rax, rbx
jmp 0x1400040d1
cmp rsi, 0x1000
jb 0x1400040c9
lea rcx, [rsi + 0x27]
cmp rcx, rsi
jbe 0x14000422e
call fcn.14009d1b0
mov rcx, rax
test rax, rax
je 0x1400041fa
add rax, 0x27
and rax, 0xffffffffffffffe0
mov qword [rax - 8], rcx
jmp 0x1400040d1
mov rcx, rsi
call fcn.14009d1b0
mov qword [rbp - 0x40], rax
lea rdi, [rax + rsi]
mov qword [rbp - 0x30], rdi
mov r8, rsi
xor edx, edx
mov rcx, rax
call sub.VCRUNTIME140.dll_memset
mov qword [rbp - 0x38], rdi
lea r8d, [r15 + r15]
mov rdx, qword [rbp - 0x40]
mov rcx, r12
call fcn.1400016c0
mov r8d, ebx
mov rcx, qword [rbp - 0x40]
lea edx, [r15 - 1]
and edx, 3
lea r9d, [r15 - 1]
cmp r8d, r9d
jge 0x14000412b
add edx, 3
inc r8d
movzx eax, dx
and ax, 7
add word [rcx], ax
add rcx, 2
jmp 0x140004110
mov rdx, qword [rbp - 0x40]
lea rcx, [rbp - 0x28]
call fcn.140004eb0
nop
mov rax, qword [rbp - 0x40]
cmp rax, qword [rbp - 0x38]
je 0x140004147
mov qword [rbp - 0x38], rax
lea rdx, [rbp - 0x28]
cmp qword [rbp - 0x10], 7
cmova rdx, qword [rbp - 0x28]
mov rax, qword [rbp - 0x18]
lea r8, [rdx + rax*2]
lea rdx, [rbp - 0x28]
cmova rdx, qword [rbp - 0x28]
mov rcx, r14
call fcn.140005110
nop
mov rdx, qword [rbp - 0x10]
cmp rdx, 7
jbe 0x1400041b2
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400041ad
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400041ad
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009d434
movdqa xmm0, xmmword [0x1400b36f0]
movdqu xmmword [rbp - 0x18], xmm0
mov word [rbp - 0x28], bx
mov rcx, qword [rbp - 0x40]
test rcx, rcx
je 0x140004206
mov rdx, qword [rbp - 0x30]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x140004201
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140004201
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.14009d434
mov rax, r14
mov rcx, qword [rbp - 8]
xor rcx, rsp
call fcn.14009d190
lea r11, [rsp + 0x70]
mov rbx, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret
call fcn.140003e60
int3
call fcn.140005500
int3