Function at 0x140139030
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rdi
push r13
push r14
push r15
sub rsp, 0x140
mov rax, qword [0x1402b87c0]
xor rax, rsp
mov qword [rsp + 0x110], rax
cmp dword [rcx + 0x68], 3
mov rdi, rdx
mov r13, qword [rsp + 0x1a0]
mov r15, r9
mov r14, qword [rsp + 0x1b0]
mov qword [rsp + 0x60], rdx
mov rdx, qword [rsp + 0x190]
mov qword [rsp + 0x50], rdx
movsxd rbx, r8d
jne 0x1401390b8
mov eax, dword [rsp + 0x1a8]
mov r8d, ebx
mov qword [rsp + 0x40], r14
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0x198]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], rdx
mov rdx, rdi
call fcn.140135ee0
jmp 0x140139376
mov rcx, r15
mov qword [rsp + 0x130], rsi
call fcn.140011dc0
mov esi, dword [rsp + 0x198]
movsxd r8, eax
add esi, r8d
mov dword [rsp + 0x58], r8d
lea eax, [rsi + 0x14]
mov dword [rsp + 0x5c], eax
cmp eax, 0x80
ja 0x14013936e
mov qword [rsp + 0x138], rbp
lea eax, [rbx + 1]
cdq
mov qword [rsp + 0x128], r12
sub eax, edx
lea rcx, [rsp + 0xa4]
sar eax, 1
mov rbp, rbx
movsxd r12, eax
mov rdx, r15
sub rbp, r12
mov rbx, r8
add rbp, rdi
mov qword [rsp + 0x68], rbp
call sub.VCRUNTIME140.dll_memcpy
movsxd r8, dword [rsp + 0x198]
lea rcx, [rsp + 0xa4]
mov rdx, qword [rsp + 0x50]
add rcx, rbx
call sub.VCRUNTIME140.dll_memcpy
lea rax, [rsp + 0x94]
mov qword [rsp + 0x28], r14
mov r9d, esi
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0xa4]
mov edx, r12d
mov rcx, rdi
call fcn.1400786c0
movsxd r15, dword [rsp + 0x1a8]
test r15d, r15d
jle 0x140139336
lea eax, [rsi + 0x10]
xor edi, edi
mov esi, r15d
mov qword [rsp + 0x70], rdi
mov dword [rsp + 0x50], eax
mov ebx, edi
and esi, 0x8000000f
jge 0x1401391a0
dec esi
or esi, 0xfffffff0
inc esi
mov rdi, qword [rsp + 0x60]
mov ebp, reloc.WS2_32.dll_recv
nop word [rax + rax]
lea rcx, [rsp + 0x78]
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rcx
lea r8, [rsp + 0x94]
mov rcx, rdi
mov r9d, eax
mov edx, r12d
call fcn.1400786c0
lea rax, [rsp + 0x94]
mov qword [rsp + 0x28], r14
mov r9d, reloc.WS2_32.dll_recv
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x94]
mov edx, r12d
mov rcx, rdi
call fcn.1400786c0
cmp ebp, r15d
mov eax, esi
mov ecx, reloc.WS2_32.dll_recv
cmovle eax, ecx
movsxd r8, eax
test eax, eax
jle 0x140139222
lea rcx, [rbx + r13]
lea rdx, [rsp + 0x78]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [rsp + 0x50]
add ebp, 0x10
add rbx, 0x10
cmp rbx, r15
jl 0x1401391b0
mov r9d, dword [rsp + 0x58]
lea rax, [rsp + 0x90]
mov rbp, qword [rsp + 0x68]
lea r8, [rsp + 0xa4]
add r9d, dword [rsp + 0x198]
mov rcx, rbp
mov qword [rsp + 0x28], r14
mov edx, r12d
mov qword [rsp + 0x20], rax
call fcn.140078700
mov rdi, qword [rsp + 0x70]
lea rbx, [rsp + 0x78]
sub rbx, r13
mov esi, setsockopt
nop
mov r9d, dword [rsp + 0x5c]
lea rax, [rsp + 0x78]
mov qword [rsp + 0x28], r14
lea r8, [rsp + 0x90]
mov edx, r12d
mov qword [rsp + 0x20], rax
mov rcx, rbp
call fcn.140078700
lea rax, [rsp + 0x90]
mov qword [rsp + 0x28], r14
mov r9d, setsockopt
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x90]
mov edx, r12d
mov rcx, rbp
call fcn.140078700
cmp esi, r15d
jle 0x1401392f6
mov eax, 0x66666667
mov ecx, r15d
imul r15d
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
lea eax, [rdx + rdx*4]
shl eax, 2
sub ecx, eax
jmp 0x1401392fb
mov ecx, setsockopt
movsxd rdx, ecx
test ecx, ecx
jle 0x140139320
lea rax, [rdi + r13]
nop word [rax + rax]
movzx ecx, byte [rbx + rax]
xor byte [rax], cl
lea rax, [rax + 1]
sub rdx, 1
jne 0x140139310
add esi, 0x14
add rdi, 0x14
sub rbx, 0x14
cmp rdi, r15
jl 0x140139280
jmp 0x14013935e
lea rax, [rsp + 0x90]
mov qword [rsp + 0x28], r14
mov r9d, esi
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0xa4]
mov edx, r12d
mov rcx, rbp
call fcn.140078700
mov rbp, qword [rsp + 0x138]
mov r12, qword [rsp + 0x128]
mov rsi, qword [rsp + 0x130]
mov rcx, qword [rsp + 0x110]
xor rcx, rsp
call fcn.1401d42a0
add rsp, 0x140
pop r15
pop r14
pop r13
pop rdi
pop rbx
ret