Function at 0x14009d170
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
mov eax, 0xf0
call fcn.140150d80
sub rsp, rax
mov rax, qword [0x1402274c0]
xor rax, rsp
mov qword [rsp + 0xc0], rax
mov rbx, qword [rsp + 0x140]
mov rdi, rcx
lea rcx, [rsp + 0x50]
mov r13, r9
mov rsi, r8
mov qword [rsp + 0x40], r8
mov qword [rsp + 0x48], rdx
xor r12d, r12d
call fcn.1400829e0
test r13, r13
mov rcx, rsi
cmove r13, rsi
call fcn.14005d290
mov esi, eax
mov dword [rsp + 0x30], eax
test eax, eax
js 0x14009d57c
mov qword [rsp + 0xe8], rbp
mov ebp, dword [rsp + 0x148]
cmp ebp, 0xffffffff
jne 0x14009d24a
mov ebp, eax
mov rcx, qword [rdi + 0x18]
mov qword [rsp + 0xd8], r15
call fcn.1400767c0
mov rcx, rdi
lea r15d, [rax - 1]
and r15d, 7
call fcn.14007c1b0
mov ecx, r15d
mov edx, 0xff
mov edi, eax
shl edx, cl
test byte [rbx], dl
je 0x14009d27a
mov edx, __WSAFDIsSet
lea r9, [0x140206c50]
mov ecx, 4
lea r8d, [rdx - 0x10]
mov dword [rsp + 0x20], 0x76
call fcn.14004cd30
jmp 0x14009d56c
cmp ebp, 0xfffffffe
jne 0x14009d251
jmp 0x14009d1f2
jge 0x14009d1f2
mov edx, __WSAFDIsSet
lea r9, [0x140206c38]
mov ecx, 4
lea r8d, [rdx - 0xd]
mov dword [rsp + 0x20], reloc.WS2_32.dll_WSAGetLastError
call fcn.14004cd30
jmp 0x14009d574
test r15d, r15d
jne 0x14009d284
inc rbx
dec edi
lea eax, [rsi + 2]
add eax, ebp
cmp edi, eax
jge 0x14009d2b4
mov edx, __WSAFDIsSet
lea r9, [0x140206c68]
mov ecx, 4
lea r8d, [rdx - 0x28]
mov dword [rsp + 0x20], 0x7e
call fcn.14004cd30
jmp 0x14009d56c
movsxd rax, edi
cmp byte [rax + rbx - 1], 0xbc
je 0x14009d2e5
mov edx, __WSAFDIsSet
lea r9, [0x140206c80]
mov ecx, 4
lea r8d, [rdx - 0xf]
mov dword [rsp + 0x20], 0x82
call fcn.14004cd30
jmp 0x14009d56c
sub edi, esi
mov qword [rsp + 0xe0], r14
lea rdx, [0x140206c98]
dec edi
mov r8d, 0x87
movsxd r14, edi
mov ecx, edi
lea rax, [r14 + rbx]
mov qword [rsp + 0x38], rax
call fcn.14004e700
mov rsi, rax
test rax, rax
jne 0x14009d33e
lea r9, [0x140206cb0]
lea ecx, [rax + 4]
lea r8d, [rax + 0x41]
mov edx, __WSAFDIsSet
mov dword [rsp + 0x20], Ordinal_143
call fcn.14004cd30
jmp 0x14009d564
mov r8, qword [rsp + 0x38]
mov qword [rsp + 0x20], r13
movsxd r13, dword [rsp + 0x30]
mov r9d, r13d
mov edx, edi
mov rcx, rax
call fcn.14009c1a0
test eax, eax
js 0x14009d55c
mov edx, r12d
test edi, edi
jle 0x14009d3d7
cmp edi, 0x20
jb 0x14009d3d7
lea eax, [rdi - 1]
movsxd rcx, eax
lea rax, [rcx + rbx]
lea r8, [rcx + rsi]
cmp rsi, rax
ja 0x14009d386
cmp r8, rbx
jae 0x14009d3d7
mov eax, edi
and eax, 0x8000001f
jge 0x14009d396
dec eax
or eax, 0xffffffe0
inc eax
mov r8d, edi
sub r8d, eax
nop dword [rax]
movsxd rax, edx
movdqu xmm0, xmmword [rax + rsi]
movdqu xmm1, xmmword [rax + rbx]
pxor xmm1, xmm0
movdqu xmmword [rax + rsi], xmm1
lea eax, [rdx + 0x10]
add edx, 0x20
movsxd rcx, eax
movdqu xmm1, xmmword [rcx + rbx]
movdqu xmm0, xmmword [rcx + rsi]
pxor xmm1, xmm0
movdqu xmmword [rcx + rsi], xmm1
cmp edx, r8d
jl 0x14009d3a0
movsxd rax, edx
cmp rax, r14
jge 0x14009d400
sub rbx, rsi
lea rcx, [rax + rsi]
sub r14, rax
nop dword [rax]
movzx eax, byte [rbx + rcx]
lea rcx, [rcx + 1]
xor byte [rcx - 1], al
dec r14
jne 0x14009d3f0
test r15d, r15d
je 0x14009d416
mov ecx, 8
mov eax, 0xff
sub ecx, r15d
sar eax, cl
and byte [rsi], al
mov ebx, r12d
cmp byte [rsi], bl
jne 0x14009d431
lea ecx, [rdi - 1]
mov rax, rsi
cmp ebx, ecx
jge 0x14009d431
inc rax
inc ebx
cmp byte [rax], r12b
je 0x14009d423
movsxd rax, ebx
inc ebx
cmp byte [rax + rsi], 1
je 0x14009d463
mov edx, __WSAFDIsSet
lea r9, [0x140206cc8]
mov ecx, 4
lea r8d, [rdx - 0xe]
mov dword [rsp + 0x20], __WSAFDIsSet
call fcn.14004cd30
jmp 0x14009d55c
test ebp, ebp
js 0x14009d496
mov eax, edi
sub eax, ebx
cmp eax, ebp
je 0x14009d496
mov edx, __WSAFDIsSet
lea r9, [0x140206ce0]
mov ecx, 4
lea r8d, [rdx - 0xd]
mov dword [rsp + 0x20], 0x98
call fcn.14004cd30
jmp 0x14009d55c
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x50]
xor r8d, r8d
call fcn.140082420
test eax, eax
je 0x14009d55c
lea rdx, [0x1401ae038]
lea rcx, [rsp + 0x50]
mov r8d, 8
call fcn.140082680
test eax, eax
je 0x14009d55c
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x50]
mov r8, r13
call fcn.140082680
test eax, eax
je 0x14009d55c
sub edi, ebx
je 0x14009d500
movsxd rdx, ebx
lea rcx, [rsp + 0x50]
movsxd r8, edi
add rdx, rsi
call fcn.140082680
test eax, eax
je 0x14009d55c
lea rdx, [rsp + 0x80]
lea rcx, [rsp + 0x50]
xor r8d, r8d
call fcn.140082340
test eax, eax
je 0x14009d55c
mov rdx, qword [rsp + 0x38]
lea rcx, [rsp + 0x80]
mov r8, r13
call fcn.140152680
test eax, eax
je 0x14009d556
mov edx, __WSAFDIsSet
lea r9, [0x140206cf8]
mov ecx, 4
lea r8d, [rdx - 0x2d]
mov dword [rsp + 0x20], 0xa6
call fcn.14004cd30
jmp 0x14009d55c
mov r12d, 1
mov rcx, rsi
call fcn.14004e660
mov r14, qword [rsp + 0xe0]
mov r15, qword [rsp + 0xd8]
mov rbp, qword [rsp + 0xe8]
lea rcx, [rsp + 0x50]
call fcn.1400826a0
mov eax, r12d
mov rcx, qword [rsp + 0xc0]
xor rcx, rsp
call fcn.140150a60
add rsp, 0xf0
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret