Function at 0x180001860
Capabilities:
Encode data using xor

Disassembly:
sub rsp, 8
mov r8d, edx
mov rdx, rcx
mov word [rcx + 0xee], r8w
test r8d, r8d
js 0x18000199f
cmp r8d, 4
jge 0x1800018e0
mov r10d, r8d
lea r9, [rcx + 0xf8]
sar r10d, 1
mov r11d, 4
and r8d, 1
mov word [rcx + 0xec], r11w
lea ecx, [r10 + r10]
mov edx, r8d
xor edx, 1
lea eax, [rcx + r8]
mov dword [r9 - 4], eax
lea r9, [r9 + 0x10]
xor r10d, 1
lea eax, [rcx + rdx]
xor edx, 1
mov dword [r9 - 0x10], eax
lea eax, [rcx + rdx]
xor edx, 1
mov dword [r9 - 0xc], eax
lea eax, [rcx + rdx]
mov dword [r9 - 8], eax
sub r11, 1
jne 0x1800018a0
add rsp, 8
ret
cmp r8d, 0xc
jge 0x18000199f
mov r9d, r8d
mov qword [rsp], rbx
sar r9d, 1
mov r11d, 4
and r9d, 1
mov word [rcx + 0xec], r11w
add rdx, 0xf8
nop dword [rax]
mov ecx, r9d
lea r10d, [r9 + r9]
shr ecx, 1
xor ecx, r8d
and ecx, 1
lea ebx, [r10 + rcx]
mov dword [rdx - 4], ebx
cmp r8d, 8
jl 0x180001936
mov eax, 3
sub eax, ebx
mov dword [rdx - 4], eax
xor ecx, 1
lea ebx, [r10 + rcx]
mov dword [rdx], ebx
cmp r8d, 8
jl 0x18000194e
mov eax, 3
sub eax, ebx
mov dword [rdx], eax
xor ecx, 1
lea ebx, [r10 + rcx]
mov dword [rdx + 4], ebx
cmp r8d, 8
jl 0x180001968
mov eax, 3
sub eax, ebx
mov dword [rdx + 4], eax
xor ecx, 1
add ecx, r10d
mov dword [rdx + 8], ecx
cmp r8d, 8
jl 0x180001981
mov eax, 3
sub eax, ecx
mov dword [rdx + 8], eax
add rdx, 0x10
inc r9d
and r9d, 3
sub r11, 1
jne 0x180001910
mov rbx, qword [rsp]
add rsp, 8
ret
cmp r8d, 0x10
jl 0x180001b7f
cmp r8d, 0x20
jge 0x180001a9a
mov ecx, r8d
lea r10, [rdx + 0xfc]
sar ecx, 2
mov r11d, 4
and ecx, 3
and r8d, 3
nop dword [rax]
mov edx, ecx
mov eax, r8d
and edx, 1
and eax, 1
cmp eax, edx
je 0x1800019e6
mov eax, 3
jmp 0x1800019f7
cmp r8d, ecx
jne 0x1800019f2
mov eax, ecx
and eax, 0xfffffffe
jmp 0x1800019f7
mov eax, 1
mov dword [r10 - 8], eax
lea r9d, [r8 + 1]
and r9d, 3
mov eax, r9d
and eax, 1
cmp eax, edx
je 0x180001a14
mov eax, 3
jmp 0x180001a25
cmp r9d, ecx
jne 0x180001a20
mov eax, ecx
and eax, 0xfffffffe
jmp 0x180001a25
mov eax, 1
inc r9d
mov dword [r10 - 4], eax
and r9d, 3
mov eax, r9d
and eax, 1
cmp eax, edx
je 0x180001a41
mov eax, 3
jmp 0x180001a52
cmp r9d, ecx
jne 0x180001a4d
mov eax, ecx
and eax, 0xfffffffe
jmp 0x180001a52
mov eax, 1
inc r9d
mov dword [r10], eax
and r9d, 3
mov eax, r9d
and eax, 1
cmp eax, edx
je 0x180001a6d
mov eax, 3
jmp 0x180001a7e
cmp r9d, ecx
jne 0x180001a79
mov eax, ecx
and eax, 0xfffffffe
jmp 0x180001a7e
mov eax, 1
mov dword [r10 + 4], eax
add r10, 0x10
inc ecx
and ecx, 3
sub r11, 1
jne 0x1800019d0
add rsp, 8
ret
cmp r8d, 0x30
jge 0x180001b83
mov eax, r8d
lea r10, [rcx + 0xfc]
sar eax, 2
mov r11d, 4
and eax, 3
and r8d, 3
nop
mov edx, eax
mov ecx, r8d
and edx, 1
and ecx, 1
cmp ecx, edx
je 0x180001ad6
mov ecx, 3
jmp 0x180001ae4
cmp r8d, eax
jne 0x180001adf
add ecx, ecx
jmp 0x180001ae4
mov ecx, 1
mov dword [r10 - 8], ecx
lea r9d, [r8 + 1]
and r9d, 3
mov ecx, r9d
and ecx, 1
cmp ecx, edx
je 0x180001b01
mov ecx, 3
jmp 0x180001b0f
cmp r9d, eax
jne 0x180001b0a
add ecx, ecx
jmp 0x180001b0f
mov ecx, 1
inc r9d
mov dword [r10 - 4], ecx
and r9d, 3
mov ecx, r9d
and ecx, 1
cmp ecx, edx
je 0x180001b2b
mov ecx, 3
jmp 0x180001b39
cmp r9d, eax
jne 0x180001b34
add ecx, ecx
jmp 0x180001b39
mov ecx, 1
mov dword [r10], ecx
lea ecx, [r9 + 1]
and ecx, 3
mov r9d, ecx
and r9d, 1
cmp r9d, edx
je 0x180001b56
mov ecx, 3
jmp 0x180001b63
cmp ecx, eax
lea ecx, [r9 + r9]
je 0x180001b63
mov ecx, 1
mov dword [r10 + 4], ecx
add r10, 0x10
inc eax
and eax, 3
sub r11, 1
jne 0x180001ac0
add rsp, 8
ret
cmp r8d, 0x30
jne 0x180001c18
xor ecx, ecx
lea r8, [rdx + 0xfc]
mov eax, ecx
mov edx, ecx
sar eax, 1
and edx, 1
je 0x180001ba5
mov r9d, 3
jmp 0x180001bb4
test eax, eax
jne 0x180001bae
mov r9d, ecx
jmp 0x180001bb4
mov r9d, 1
mov dword [r8 - 8], r9d
test edx, edx
je 0x180001bc4
mov r9d, 3
jmp 0x180001bd1
mov r9d, 1
cmp eax, r9d
cmove r9d, ecx
mov dword [r8 - 4], r9d
test edx, edx
je 0x180001be1
mov r9d, 3
jmp 0x180001bed
test eax, eax
mov r9d, 1
cmove r9d, ecx
mov dword [r8], r9d
test edx, edx
je 0x180001bfb
mov edx, 3
jmp 0x180001c05
mov edx, 1
cmp eax, edx
cmove edx, ecx
mov dword [r8 + 4], edx
inc ecx
add r8, 0x10
cmp ecx, 4
jl 0x180001b92
add rsp, 8
ret