Function at 0x140058a50
Capabilities:
Encode data using xor

Disassembly:
test r8, r8
je 0x140058d70
mov qword [rsp + 8], rbx
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x60
mov rax, qword [0x14025a0c0]
xor rax, rsp
mov qword [rsp + 0x50], rax
mov rdi, rdx
mov qword [rsp + 0x20], rdx
lea rcx, [r8 + 0xaa8]
call fcn.1400b0b90
mov rsi, rax
add rax, 0xffffffffffbfffff
movabs r12, 0x7fffffffffbffffe
cmp rax, r12
ja 0x140058d50
lea rcx, [rsi + 0x10]
call fcn.1400b0d40
movsxd rbx, eax
mov r14, rbx
test eax, eax
jne 0x140058c3e
mov rax, qword [str.bpqdugs7PYVG]
mov qword [rsp + 0x20], rax
xor ecx, ecx
cmp dword [reloc.WS2_32.dll_accept], 2
jl 0x140058bc2
movdqa xmm4, xmmword [0x14023eca0]
movdqa xmm2, xmmword [0x14023e780]
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm4
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmmword [str.9999]
psubd xmm2, xmm0
andps xmm2, xmmword [0x14023e800]
packuswb xmm2, xmm2
packuswb xmm2, xmm2
paddb xmm2, xmmword [0x14023e850]
movd xmm0, dword [rsp + 0x20]
xorps xmm2, xmm0
movd dword [rsp + 0x20], xmm2
movdqa xmm2, xmmword [0x14023e7a0]
movdqa xmm1, xmm2
punpckldq xmm1, xmm2
pmuldq xmm1, xmm4
movdqa xmm0, xmm2
punpckhdq xmm0, xmm2
pmuldq xmm0, xmm4
shufps xmm1, xmm0, 0xdd
paddd xmm1, xmm2
psrad xmm1, 5
movdqa xmm0, xmm1
psrld xmm0, 0x1f
paddd xmm0, xmm1
pmulld xmm0, xmmword [str.9999]
psubd xmm2, xmm0
andps xmm2, xmmword [0x14023e800]
packuswb xmm2, xmm2
packuswb xmm2, xmm2
paddb xmm2, xmmword [0x14023e850]
movd xmm0, dword [rsp + 0x24]
xorps xmm2, xmm0
movd dword [rsp + 0x24], xmm2
jmp 0x140058bfd
lea r8, [rsp + 0x20]
nop word [rax + rax]
mov eax, 0x1f7047dd
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 5
movsx eax, al
imul edx, eax, 0x39
movzx eax, cl
sub al, dl
add al, 0x30
xor byte [r8], al
inc ecx
lea r8, [r8 + 1]
cmp ecx, 8
jl 0x140058bd0
xorps xmm0, xmm0
movups xmmword [rdi], xmm0
mov qword [rdi + 0x10], 0
mov qword [rdi + 0x18], 0
lea rax, [rsp + 0x20]
mov rcx, 0xffffffffffffffff
nop
inc rcx
cmp byte [rax + rcx], 0
jne 0x140058c20
mov r8, rcx
lea rdx, [rsp + 0x20]
mov rcx, rdi
call fcn.1400b2060
jmp 0x140058d4d
lea rcx, [rsi + 8]
call fcn.1400b0b90
mov rbp, rax
lea rcx, [rax - 0x400001]
cmp rcx, r12
ja 0x140058d50
mov eax, 2
mul r14
mov rcx, 0xffffffffffffffff
cmovb rax, rcx
mov rcx, rax
call fcn.1401ff96c
mov rsi, rax
lea r8d, [rbx + rbx]
mov rdx, rax
mov rcx, rbp
call fcn.140056a10
xor r9d, r9d
mov rdx, rsi
lea ecx, [rbx - 1]
xor r8d, r8d
movzx ecx, cl
test ebx, ebx
cmovne r8d, ecx
and r8d, 3
lea ecx, [rbx - 1]
xor eax, eax
test ebx, ebx
cmovne eax, ecx
cmp r9d, eax
jge 0x140058cc7
add r8d, 3
inc r9d
movzx eax, r8w
and ax, 7
add word [rdx], ax
add rdx, 2
jmp 0x140058ca3
mov rdx, rsi
lea rcx, [rsp + 0x30]
call fcn.1400af550
nop
lea rdx, [rsp + 0x30]
cmp qword [rsp + 0x48], 7
cmova rdx, qword [rsp + 0x30]
mov rax, qword [rsp + 0x40]
lea r8, [rdx + rax*2]
lea rdx, [rsp + 0x30]
cmova rdx, qword [rsp + 0x30]
lea r9, [rsp + 0x28]
mov rcx, rdi
call fcn.1400b0ef0
nop
mov rdx, qword [rsp + 0x48]
cmp rdx, 7
jbe 0x140058d4d
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x30]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140058d48
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140058d48
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.1401ff610
mov rax, rdi
mov rcx, qword [rsp + 0x50]
xor rcx, rsp
call fcn.1401ff5f0
mov rbx, qword [rsp + 0x90]
add rsp, 0x60
pop r14
pop r12
pop rdi
pop rsi
pop rbp
ret