Function at 0x18009d280
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 0x28
mov qword [rsp + 0x30], rbx
mov r11, r8
mov qword [rsp + 0x38], rbp
cmp dword [r11 + 0x94], 1
mov qword [rsp + 0x40], rsi
mov r8d, edx
mov qword [rsp + 0x48], rdi
mov r9, rcx
jne 0x18009d401
test dl, 3
jne 0x18009d414
test edx, edx
lea rbx, [0x180000000]
je 0x18009d34f
lea ebp, [rdx - 1]
shr ebp, 2
inc ebp
nop
mov eax, dword [r9]
movzx ecx, byte [r11 + 3]
lea rsi, [r11 + 4]
add dword [r11 + 0x3c], eax
mov edx, dword [rbx + rcx*4 + 0x117960]
mov eax, dword [r11]
shl eax, 8
mov rdi, r11
mov ecx, select
xor edx, eax
add r9, 4
xor edx, dword [r11 + 0x3c]
xor edx, dword [r11 + 0x10]
mov dword [r11], edx
rep movsd dword [rdi], dword [rsi]
mov eax, dword [r11]
lea ecx, [rdx + rax]
mov dword [r11 + 0x40], edx
mov eax, ecx
shr rax, 0x18
mov edx, dword [rbx + rax*4 + 0x117d60]
xor edx, ecx
ror edx, 8
add edx, dword [r11 + 4]
xor edx, dword [r11 + 0x88]
add edx, dword [r11 + 0x18]
mov eax, edx
shr rax, 0x18
mov ecx, dword [rbx + rax*4 + 0x117d60]
xor ecx, edx
add ecx, dword [r11 + 0x34]
xor dword [r11 + 0x10], ecx
dec rbp
jne 0x18009d2d0
add dword [r11 + 0x3c], r8d
mov rcx, r11
call fcn.18009cc20
nop
nop
movzx ecx, byte [r11 + 3]
mov eax, dword [r11]
lea rsi, [r11 + 4]
mov edx, dword [rbx + rcx*4 + 0x117960]
shl eax, 8
mov rdi, r11
xor edx, eax
mov ecx, select
xor edx, dword [r11 + 0x3c]
xor edx, dword [r11 + 0x10]
mov dword [r11], edx
rep movsd dword [rdi], dword [rsi]
mov eax, dword [r11]
lea ecx, [rdx + rax]
mov dword [r11 + 0x40], edx
mov eax, ecx
shr rax, 0x18
mov edx, dword [rbx + rax*4 + 0x117d60]
xor edx, ecx
ror edx, 8
add edx, dword [r11 + 4]
xor edx, dword [r11 + 0x88]
add edx, dword [r11 + 0x18]
mov eax, edx
shr rax, 0x18
mov ecx, dword [rbx + rax*4 + 0x117d60]
xor ecx, edx
add ecx, dword [r11 + 0x34]
test ecx, 0xff000000
je 0x18009d360
mov dword [r11 + 0x88], ecx
lea rdi, [r11 + 0x44]
mov rsi, r11
mov ecx, reloc.WSOCK32.dll_recvfrom
xor eax, eax
rep movsd dword [rdi], dword [rsi]
mov dword [r11 + 0x94], eax
mov dword [r11 + 0x98], 1
jmp 0x18009d4cd
test dl, 3
lea rsi, [r11 + 0x44]
mov rdi, r11
mov ecx, reloc.WSOCK32.dll_recvfrom
rep movsd dword [rdi], dword [rsi]
je 0x18009d41e
mov eax, 0x7d1
jmp 0x18009d4d6
test edx, edx
je 0x18009d4bf
lea ebp, [rdx - 1]
lea rbx, [0x180000000]
shr ebp, 2
inc ebp
nop
nop
nop
mov eax, dword [r9]
movzx ecx, byte [r11 + 3]
lea rsi, [r11 + 4]
add dword [r11 + 0x3c], eax
mov edx, dword [rbx + rcx*4 + 0x117960]
mov eax, dword [r11]
shl eax, 8
mov rdi, r11
mov ecx, select
xor edx, eax
add r9, 4
xor edx, dword [r11 + 0x10]
xor edx, dword [r11 + 0x3c]
mov dword [r11], edx
rep movsd dword [rdi], dword [rsi]
mov eax, dword [r11]
lea ecx, [rdx + rax]
mov dword [r11 + 0x40], edx
mov eax, ecx
shr rax, 0x18
mov edx, dword [rbx + rax*4 + 0x117d60]
xor edx, ecx
ror edx, 8
add edx, dword [r11 + 4]
xor edx, dword [r11 + 0x88]
add edx, dword [r11 + 0x18]
mov eax, edx
shr rax, 0x18
mov ecx, dword [rbx + rax*4 + 0x117d60]
xor ecx, edx
add ecx, dword [r11 + 0x34]
xor dword [r11 + 0x10], ecx
dec rbp
jne 0x18009d440
add dword [r11 + 0x3c], r8d
mov rcx, r11
call fcn.18009cc20
xor eax, eax
mov dword [r11 + 0x90], eax
xor eax, eax
mov rdi, qword [rsp + 0x48]
mov rsi, qword [rsp + 0x40]
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x30]
add rsp, 0x28
ret