Function at 0x180038e50
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r13
sub rsp, 0x20
movsxd r13, r8d
mov eax, 0x8000
xor ebp, ebp
mov rdi, rcx
cmp r13d, eax
mov qword [rcx], rbp
mov rcx, qword [rcx + 8]
mov rbx, r9
cmovl eax, r13d
mov rsi, rdx
movsxd r8, eax
call fcn.18008b7d0
xor dl, dl
lea ecx, [r13 - 1]
mov r8d, 1
cmp r13d, r8d
jle 0x180038f33
cmp ecx, 0x20
jb 0x180038f33
xorps xmm2, xmm2
movdqa xmm1, xmm2
and ecx, 0x8000001f
jge 0x180038eb8
dec ecx
or ecx, 0xffffffe0
inc ecx
mov eax, r13d
mov rdx, 0xfffffffffffffff0
sub eax, ecx
lea rcx, [rsi + 0x11]
movsxd r9, eax
sub rdx, rsi
nop
movdqu xmm0, xmmword [rcx - 0x10]
lea rcx, [rcx + 0x20]
add r8d, 0x20
lea rax, [rdx + rcx]
pxor xmm0, xmm2
movdqa xmm2, xmm0
movdqu xmm0, xmmword [rcx - 0x20]
pxor xmm1, xmm0
cmp rax, r9
jl 0x180038ed0
pxor xmm1, xmm2
movdqa xmm0, xmm1
psrldq xmm0, 8
pxor xmm1, xmm0
movdqa xmm0, xmm1
psrldq xmm0, 4
pxor xmm1, xmm0
movdqa xmm0, xmm1
psrldq xmm0, 2
pxor xmm1, xmm0
movdqa xmm0, xmm1
psrldq xmm0, 1
pxor xmm1, xmm0
movd edx, xmm1
movsxd rax, r8d
mov r8, r13
cmp rax, r13
jge 0x180038f4b
nop
xor dl, byte [rax + rsi]
inc rax
cmp rax, r8
jl 0x180038f40
mov ecx, dword [rdi + 4]
add ecx, 8
mov qword [rsp + 0x50], r12
mov eax, ecx
mov qword [rsp + 0x58], r14
sar eax, 3
and ecx, 7
add dword [rdi], eax
mov dword [rdi + 4], ecx
mov dword [rbx + 0x18], ebp
mov qword [rsp + 0x60], r15
cmp dl, byte [rsi]
jne 0x180039308
mov rdx, rsi
or ecx, 0xffffffff
call fcn.180035a30
lea r8, [0x1800ec3c0]
not eax
mov rcx, r8
mov edx, ebp
cmp dword [rcx + 4], eax
jne 0x180038f9b
cmp dword [rcx], r13d
je 0x180038fab
inc edx
add rcx, 0xc
cmp edx, 7
jb 0x180038f91
jmp 0x180039040
movsxd rax, edx
lea rcx, [rax + rax*2]
mov r14d, dword [r8 + rcx*4 + 8]
test r14d, r14d
je 0x180039040
inc dword [rbx + 8]
mov r8d, dword [rbx + 8]
mov ecx, dword [rbx + 0xc]
cmp r8d, ecx
jle 0x180039004
mov eax, ecx
lea esi, [rcx + 0x20]
mov rcx, qword [rbx]
cdq
and edx, 3
add eax, edx
sar eax, 2
add esi, eax
cmp r8d, esi
cmovg esi, r8d
movsxd rax, esi
imul rdx, rax, 0x38
call fcn.18009b168
mov qword [rbx], rax
test rax, rax
je 0x180039456
mov dword [rbx + 0xc], esi
movsxd rcx, dword [rbx + 0x18]
mov r13d, ebp
lea eax, [rcx + 1]
mov dword [rbx + 0x18], eax
imul rcx, rcx, 0x38
add rcx, qword [rbx]
mov dword [rcx + 0xc], r14d
lea rax, [rcx + 0xc]
mov dword [rcx], 0x36
mov qword [rcx + 0x18], rax
lea rax, [rcx + 0x24]
mov qword [rcx + 0x30], rax
mov dword [rcx + 0x20], 3
mov dword [rcx + 8], 3
movsxd r9, dword [rdi]
mov rdx, qword [rdi + 8]
mov r8d, dword [rdi + 4]
lea eax, [r9 + 1]
movzx r10d, byte [r9 + rdx]
movsxd rcx, eax
shl r10d, 8
movzx eax, byte [rcx + rdx]
or r10d, eax
lea eax, [r9 + 2]
movsxd rcx, eax
shl r10d, 8
movzx eax, byte [rcx + rdx]
mov ecx, 8
or r10d, eax
sub ecx, r8d
shr r10d, cl
lea ecx, [r8 + 1]
mov eax, ecx
and ecx, 7
sar eax, 3
add eax, r9d
mov dword [rdi + 4], ecx
mov dword [rdi], eax
bt r10d, 0xf
jae 0x180039165
mov rcx, rdi
call fcn.180039620
inc eax
cmp dword [rdi], r13d
jge 0x180039308
movsxd r15, eax
mov r14, rbp
cmp r14, r15
jge 0x180039165
inc dword [rbx + 0x38]
mov edx, dword [rbx + 0x38]
mov ecx, dword [rbx + 0x3c]
cmp edx, ecx
jle 0x1800390ff
mov eax, ecx
test ecx, ecx
jns 0x1800390d6
lea eax, [rcx + 3]
sar eax, 2
lea esi, [rcx + 0x20]
mov rcx, qword [rbx + 0x30]
add esi, eax
cmp edx, esi
cmovg esi, edx
movsxd rdx, esi
call fcn.18009b168
mov qword [rbx + 0x30], rax
test rax, rax
je 0x18003945c
mov dword [rbx + 0x3c], esi
movsxd rdx, dword [rdi]
mov r8, qword [rdi + 8]
lea eax, [rdx + 1]
movzx r9d, byte [rdx + r8]
movsxd rcx, eax
shl r9d, 8
movzx eax, byte [rcx + r8]
or r9d, eax
lea eax, [rdx + 2]
movsxd rcx, eax
shl r9d, 8
movzx eax, byte [rcx + r8]
mov ecx, 8
sub ecx, dword [rdi + 4]
or r9d, eax
mov rax, qword [rbx + 0x30]
shr r9d, cl
shr r9d, 8
mov byte [r14 + rax], r9b
inc r14
mov ecx, dword [rdi + 4]
add ecx, 8
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [rdi], eax
mov dword [rdi + 4], ecx
cmp dword [rdi], r13d
jl 0x1800390b7
cmp dword [rdi], r13d
jge 0x180039308
lea r10, [0x1800ca298]
nop word [rax + rax]
inc dword [rbx + 8]
mov edx, dword [rbx + 8]
mov ecx, dword [rbx + 0xc]
cmp edx, ecx
jle 0x1800391c8
mov eax, ecx
test ecx, ecx
jns 0x180039196
lea eax, [rcx + 3]
sar eax, 2
lea esi, [rcx + 0x20]
mov rcx, qword [rbx]
add esi, eax
cmp edx, esi
cmovg esi, edx
movsxd rax, esi
imul rdx, rax, 0x38
call fcn.18009b168
mov qword [rbx], rax
test rax, rax
je 0x180039468
mov dword [rbx + 0xc], esi
lea r10, [0x1800ca298]
movsxd rdx, dword [rdi]
mov r8, qword [rdi + 8]
movsxd rax, dword [rbx + 0x18]
imul rsi, rax, 0x38
movzx r9d, byte [rdx + r8]
lea eax, [rdx + 1]
add rsi, qword [rbx]
movsxd rcx, eax
shl r9d, 8
movzx eax, byte [rcx + r8]
or r9d, eax
lea eax, [rdx + 2]
movsxd rcx, eax
shl r9d, 8
movzx eax, byte [rcx + r8]
mov ecx, 8
sub ecx, dword [rdi + 4]
or r9d, eax
shr r9d, cl
movzx eax, r9w
bt eax, 0xf
jb 0x180039225
shr eax, 0xc
mov dword [rsi], eax
mov ecx, dword [rdi + 4]
add ecx, 4
jmp 0x180039233
shr eax, 0xa
sub eax, 0x18
mov dword [rsi], eax
mov ecx, dword [rdi + 4]
add ecx, 6
mov eax, ecx
and ecx, 7
sar eax, 3
add dword [rdi], eax
mov dword [rdi + 4], ecx
movsxd rax, dword [rsi]
test byte [rax + r10], 4
je 0x1800392a5
movsxd rdx, dword [rdi]
mov r8, qword [rdi + 8]
lea eax, [rdx + 1]
movzx r9d, byte [rdx + r8]
shl r9d, 8
movsxd rcx, eax
movzx eax, byte [rcx + r8]
or r9d, eax
lea eax, [rdx + 2]
shl r9d, 8
movsxd rcx, eax
movzx eax, byte [rcx + r8]
mov ecx, 8
sub ecx, dword [rdi + 4]
or r9d, eax
shr r9d, cl
shr r9d, 0xf
and r9b, 1
mov byte [rsi + 4], r9b
mov ecx, dword [rdi + 4]
inc ecx
mov eax, ecx
sar eax, 3
add dword [rdi], eax
and ecx, 7
mov dword [rdi + 4], ecx
jmp 0x1800392a9
mov byte [rsi + 4], bpl
movsxd rax, dword [rsi]
mov dword [rsi + 0x20], 3
mov dword [rsi + 8], 3
mov qword [rsi + 0x30], rbp
movzx r15d, byte [rax + r10]
mov qword [rsi + 0x18], rbp
and r15d, 3
jbe 0x1800392fc
movzx r8d, byte [rsi + 4]
lea rdx, [rsi + 8]
mov rcx, rdi
call fcn.180039470
cmp r15d, 2
jne 0x18003934e
movzx r8d, byte [rsi + 4]
lea rdx, [rsi + 0x20]
mov rcx, rdi
call fcn.180039470
lea r10, [0x1800ca298]
inc dword [rbx + 0x18]
cmp dword [rdi], r13d
jl 0x180039180
inc dword [rbx + 8]
mov r8d, dword [rbx + 8]
mov ecx, dword [rbx + 0xc]
cmp r8d, ecx
jle 0x1800393b9
mov eax, ecx
lea edi, [rcx + 0x20]
mov rcx, qword [rbx]
cdq
and edx, 3
add eax, edx
sar eax, 2
add edi, eax
cmp r8d, edi
cmovg edi, r8d
movsxd rax, edi
imul rdx, rax, 0x38
call fcn.18009b168
mov qword [rbx], rax
test rax, rax
jne 0x1800393b6
jmp 0x180039462
cmp dword [rsi + 8], 1
jne 0x1800392f5
movsxd rax, dword [rsi]
lea r10, [0x1800ca298]
test byte [rax + r10], 0x18
je 0x1800392fc
mov eax, dword [rsi + 0xc]
cmp eax, 0x100
jl 0x180039379
sub eax, 0x100
mov dword [rsi + 0xc], eax
jmp 0x1800392fc
cmp eax, 0x88
jl 0x180039390
sub eax, 0x108
add eax, dword [rbx + 0x18]
mov dword [rsi + 0xc], eax
jmp 0x1800392fc
cmp eax, 0x10
jl 0x1800393a3
sub eax, 8
add eax, dword [rbx + 0x18]
mov dword [rsi + 0xc], eax
jmp 0x1800392fc
cmp eax, 8
jl 0x1800393ab
sub eax, 0x10
add eax, dword [rbx + 0x18]
mov dword [rsi + 0xc], eax
jmp 0x1800392fc
mov dword [rbx + 0xc], edi
movsxd rcx, dword [rbx + 0x18]
lea eax, [rcx + 1]
mov dword [rbx + 0x18], eax
imul rcx, rcx, 0x38
add rcx, qword [rbx]
lea rax, [rcx + 0xc]
mov dword [rcx], socket
mov qword [rcx + 0x18], rax
lea rax, [rcx + 0x24]
mov qword [rcx + 0x30], rax
mov dword [rcx + 0x20], 3
mov dword [rcx + 8], 3
cmp dword [rbx + 0x18], ebp
jle 0x18003942f
mov rdx, rbp
nop word [rax + rax]
mov rcx, qword [rbx]
add rcx, rdx
cmp qword [rcx + 0x18], 0
jne 0x180039415
lea rax, [rcx + 0xc]
mov qword [rcx + 0x18], rax
cmp qword [rcx + 0x30], 0
jne 0x180039424
lea rax, [rcx + 0x24]
mov qword [rcx + 0x30], rax
inc ebp
add rdx, 0x38
cmp ebp, dword [rbx + 0x18]
jl 0x180039400
test r13d, r13d
je 0x18003943c
mov rdx, rbx
call fcn.180039870
mov r15, qword [rsp + 0x60]
mov r14, qword [rsp + 0x58]
mov r12, qword [rsp + 0x50]
add rsp, 0x20
pop r13
pop rdi
pop rsi
pop rbp
pop rbx
ret
call fcn.180035e10
int3
call fcn.180035e10
int3
call fcn.180035e10
int3
call fcn.180035e10
int3