Function at 0x18002f380
Capabilities:
Encode data using xor

Disassembly:
mov qword [rsp + 0x18], r8
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r14
sub rsp, 0x58
mov ebp, dword [rsp + 0xb0]
mov r12, rcx
mov ecx, ebp
movsxd r14, edx
mov ebx, 1
mov esi, r9d
shl ebx, cl
mov rdi, r8
cmp r14d, dword [r12 + 0xc]
jg 0x18002f3c2
mov rax, r12
jmp 0x18002f3cd
mov edx, r14d
mov rcx, r12
call fcn.180033d90
test rax, rax
jne 0x18002f3df
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov qword [rsp + 0x48], r14
mov r11, r14
cmp ebp, 3
jg 0x18002f453
test r14d, r14d
jle 0x18002f601
xor r10d, r10d
movsxd rbp, ebx
shl rbp, 2
nop
xor r9d, r9d
xor eax, eax
test ebx, ebx
jle 0x18002f43b
mov r8, rdi
nop dword [rax]
mov ecx, eax
lea r8, [r8 + 4]
xor ecx, esi
inc eax
lea edx, [rcx - 1]
not ecx
shr edx, 0x1f
shr ecx, 0x1f
and edx, ecx
mov ecx, dword [r8 - 4]
neg edx
and edx, 1
neg edx
and edx, ecx
or r9d, edx
cmp eax, ebx
jl 0x18002f410
mov rax, qword [r12]
add rdi, rbp
mov dword [rax + r10*4], r9d
inc r10
cmp r10, r14
jl 0x18002f400
jmp 0x18002f601
lea ecx, [rbp - 2]
mov edx, esi
sar edx, cl
mov r8d, 1
shl r8d, cl
movsxd rbp, r8d
lea ecx, [rdx - 1]
shr ecx, 0x1f
lea eax, [r8 - 1]
and esi, eax
mov eax, edx
not eax
shr eax, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 1
and ecx, 1
neg ecx
mov dword [rsp + 0x20], ecx
lea ecx, [rax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
mov eax, edx
neg ecx
xor eax, 2
and ecx, 1
xor edx, 3
neg ecx
mov dword [rsp + 0x24], ecx
lea ecx, [rax - 1]
not eax
shr ecx, 0x1f
shr eax, 0x1f
and ecx, eax
neg ecx
and ecx, 1
neg ecx
mov dword [rsp + 0x28], ecx
lea ecx, [rdx - 1]
shr ecx, 0x1f
not edx
shr edx, 0x1f
and ecx, edx
neg ecx
and ecx, 1
neg ecx
mov dword [rsp + 0xb0], ecx
test r14d, r14d
jle 0x18002f601
mov qword [rsp + 0xa8], r13
mov qword [rsp + 0x50], r15
xor r15d, r15d
movsxd rax, ebx
shl rax, 2
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x30], r15
nop dword [rax + rax]
xor r11d, r11d
xor r10d, r10d
test rbp, rbp
jle 0x18002f5c1
mov r12d, dword [rsp + 0x20]
lea r9, [rdi + rbp*8]
mov r15d, dword [rsp + 0x24]
mov rax, rbp
mov edi, dword [rsp + 0x28]
neg rax
mov rbx, rbp
lea r13, [rax*4]
mov rax, rbp
neg rax
lea rax, [rax*8]
mov r14, rax
mov eax, dword [r9 + rbp*4]
lea r9, [r9 + 4]
and eax, ecx
mov r8d, r10d
mov ecx, dword [r9 - 4]
xor r8d, esi
mov edx, dword [r9 + r13 - 4]
and ecx, edi
or ecx, eax
and edx, r15d
mov eax, dword [r14 + r9 - 4]
or edx, ecx
lea ecx, [r8 - 1]
and eax, r12d
shr ecx, 0x1f
or eax, edx
not r8d
inc r10d
shr r8d, 0x1f
and ecx, r8d
neg ecx
and ecx, 1
neg ecx
and ecx, eax
or r11d, ecx
mov ecx, dword [rsp + 0xb0]
sub rbx, 1
jne 0x18002f553
mov rdi, qword [rsp + 0xa0]
mov r15, qword [rsp + 0x30]
mov r12, qword [rsp + 0x90]
add rdi, qword [rsp + 0x40]
mov rax, qword [r12]
mov qword [rsp + 0xa0], rdi
mov dword [rax + r15*4], r11d
inc r15
mov r11, qword [rsp + 0x48]
mov qword [rsp + 0x30], r15
cmp r15, r11
jl 0x18002f510
mov r14d, dword [rsp + 0x98]
mov r15, qword [rsp + 0x50]
mov r13, qword [rsp + 0xa8]
mov dword [r12 + 8], r14d
test r14d, r14d
jle 0x18002f637
mov rax, qword [r12]
lea rdx, [r11 - 1]
lea rdx, [rax + rdx*4]
nop word [rax + rax]
mov ecx, dword [rdx]
lea rdx, [rdx - 4]
test ecx, ecx
jne 0x18002f632
dec r14d
test r14d, r14d
jg 0x18002f620
mov dword [r12 + 8], r14d
mov eax, 1
add rsp, 0x58
pop r14
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret