Function at 0x180038a20
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
sub rsp, 0x58
xor r8d, r8d
mov qword [rsp + 0x88], rdi
mov dword [rsp + 0x78], r8d
mov rsi, rcx
mov dword [rsp + 0x70], 0x13
mov r9d, r8d
mov edx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add edx, eax
mov dword [rsp + 0x70], edx
mov eax, dword [rsp + 0x70]
mov qword [rsp + 0x50], r14
lea r14, [rsp]
mov dword [rsp + 0x78], 4
lea edi, [r9 + 1]
mov dword [rsp + 0x70], 3
lea r14, [r14 + 4]
mov ecx, dword [rsp + 0x70]
xor edx, edx
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x80], ecx
mov dword [rsp + 0x78], r8d
mov dword [rsp + 0x70], 0x13
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, dword [rsp + 0x80]
mov ecx, dword [rsp + 0x70]
mov dword [rsp + 0x78], 4
mov dword [rsp + 0x70], 0x1c
imul eax, r9d
div ecx
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, edi
mov ecx, dword [rsp + 0x70]
mov dword [rsp + 0x78], 8
mov dword [rsp + 0x70], 0xb
imul eax, r9d
movsxd rbx, edx
cdq
sub eax, edx
xor edx, edx
sar eax, 1
div ecx
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
mov r11d, edx
add ecx, eax
xor edx, edx
mov dword [rsp + 0x70], ecx
mov r10d, dword [rsp + 0x70]
mov dword [rsp + 0x78], 0x12
mov dword [rsp + 0x70], 1
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
lea eax, [rbx + 2]
mov ecx, dword [rsp + 0x70]
div ecx
lea eax, [rbx + 1]
mov r9d, dword [rsi + rdx*4]
xor edx, edx
div r10d
not r9d
mov edx, dword [rsi + rdx*4]
or edx, r9d
mov r9d, edi
xor edx, dword [rsi + rbx*4]
mov dword [rsp + 0x78], 0x1a
mov dword [rsp + 0x70], 6
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, edx
mov ecx, dword [rsp + 0x70]
sub ecx, r11d
shl eax, cl
mov ecx, r11d
shr edx, cl
or eax, edx
mov dword [r14 - 4], eax
mov dword [rsp + 0x78], r8d
mov dword [rsp + 0x70], 0x13
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, dword [rsp + 0x70]
cmp edi, eax
jb 0x180038a60
mov r14, qword [rsp + 0x50]
lea rbx, [rsp]
mov rdi, qword [rsp + 0x88]
mov r11, rsi
mov dword [rsp + 0x78], 3
mov dword [rsp + 0x70], 0x10
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
sub rbx, rsi
mov eax, dword [rsp + 0x70]
nop dword [rax]
mov dword [rsp + 0x78], 5
lea r10d, [r8 + 1]
mov dword [rsp + 0x70], 0xe
lea r11, [r11 + 4]
mov ecx, dword [rsp + 0x70]
xor edx, edx
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, r10d
mov ecx, dword [rsp + 0x70]
div ecx
mov dword [rsp + 0x78], 3
mov dword [rsp + 0x70], 1
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x80], ecx
mov dword [rsp + 0x78], 0xd
mov dword [rsp + 0x70], 6
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, dword [rsp + 0x80]
mov ecx, dword [rsp + 0x70]
add eax, r8d
movsxd r9, edx
mov r8d, r10d
xor edx, edx
div ecx
movsxd rcx, edx
mov edx, dword [rsp + rcx*4]
xor edx, dword [rsp + r9*4]
xor edx, dword [rbx + r11 - 4]
mov dword [r11 - 4], edx
mov dword [rsp + 0x78], 3
mov dword [rsp + 0x70], 0x10
mov ecx, dword [rsp + 0x70]
mov eax, dword [rsp + 0x78]
add ecx, eax
mov dword [rsp + 0x70], ecx
mov eax, dword [rsp + 0x70]
cmp r10d, eax
jb 0x180038bf0
xor dword [rsi], 1
add rsp, 0x58
pop rsi
pop rbx
ret