Function at 0x140027410
Capabilities:
Encode data using xor

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x38
mov esi, r8d
mov ebx, r9d
movsxd rbp, esi
mov r8, rcx
mov rcx, qword [rsp + 0xa8]
xor edi, edi
xor eax, eax
test edx, edx
jle 0x140027480
lea r9d, [rdi*4]
inc edi
movsxd r9, r9d
movzx r13d, byte [r9 + r8 + 3]
movzx r10d, byte [r9 + r8 + 2]
shl r13d, 0x18
shl r10d, 0x10
movzx r11d, byte [r9 + r8 + 1]
or r13d, r10d
shl r11d, 8
or r13d, r11d
movzx r12d, byte [r9 + r8]
or r13d, r12d
mov dword [rcx + rax*4], r13d
inc rax
cmp edi, edx
jl 0x14002743c
movsxd r15, dword [rsp + 0xa0]
cmp edx, 4
jne 0x14002754e
mov r12d, dword [rcx]
lea r10, [0x1400397a0]
mov r11d, dword [rcx + 4]
mov edx, 4
mov r9d, dword [rcx + 8]
cmp r15, 4
mov r8d, dword [rcx + 0xc]
jle 0x140027762
lea rdi, [0x140000000]
mov r14d, r8d
shr r14d, 0x18
movzx r13d, r8b
movzx eax, byte [rdi + r13 + 0x3e9a0]
movzx r13d, byte [rdi + r14 + 0x3e9a0]
mov r14d, r8d
shl eax, 0x18
shl r13d, 0x10
shr r14d, 0x10
or eax, r13d
movzx r13d, r14b
movzx r14d, byte [rdi + r13 + 0x3e9a0]
mov r13d, r8d
shr r13d, 8
movzx r13d, r13b
shl r14d, 8
or eax, r14d
movzx r14d, byte [rdi + r13 + 0x3e9a0]
or eax, r14d
xor eax, dword [r10]
add r10, 4
xor r12d, eax
xor r11d, r12d
xor r9d, r11d
xor r8d, r9d
mov dword [rcx + rdx*4], r12d
mov dword [rcx + rdx*4 + 4], r11d
mov dword [rcx + rdx*4 + 8], r9d
mov dword [rcx + rdx*4 + 0xc], r8d
add rdx, 4
cmp rdx, r15
jl 0x1400274bd
jmp 0x140027762
cmp edx, 6
jne 0x140027626
mov r9d, dword [rcx]
lea r14, [0x1400397a0]
mov r13d, dword [rcx + 4]
mov edi, 6
mov r12d, dword [rcx + 8]
cmp r15, 6
mov r10d, dword [rcx + 0xc]
mov r8d, dword [rcx + 0x10]
mov r11d, dword [rcx + 0x14]
jle 0x140027762
mov dword [rsp + 0x20], ebx
lea rdx, [0x140000000]
movzx ebx, r11b
movzx eax, byte [rdx + rbx + 0x3e9a0]
mov ebx, r11d
shr ebx, 0x18
shl eax, 0x18
movzx ebx, byte [rdx + rbx + 0x3e9a0]
shl ebx, 0x10
or eax, ebx
mov ebx, r11d
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [rdx + rbx + 0x3e9a0]
shl ebx, 8
or eax, ebx
mov ebx, r11d
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [rdx + rbx + 0x3e9a0]
or eax, ebx
xor eax, dword [r14]
add r14, 4
xor r9d, eax
xor r13d, r9d
xor r12d, r13d
xor r10d, r12d
xor r8d, r10d
xor r11d, r8d
mov dword [rcx + rdi*4], r9d
mov dword [rcx + rdi*4 + 4], r13d
mov dword [rcx + rdi*4 + 8], r12d
mov dword [rcx + rdi*4 + 0xc], r10d
mov dword [rcx + rdi*4 + 0x10], r8d
mov dword [rcx + rdi*4 + 0x14], r11d
add rdi, 6
cmp rdi, r15
jl 0x14002758f
mov ebx, dword [rsp + 0x20]
jmp 0x140027762
mov r10d, dword [rcx]
lea r11, [0x1400397a0]
mov r9d, dword [rcx + 4]
mov r12d, 8
mov r8d, dword [rcx + 8]
cmp r15, 8
mov r14d, dword [rcx + 0xc]
mov edi, dword [rcx + 0x10]
mov edx, dword [rcx + 0x14]
mov eax, dword [rcx + 0x18]
mov r13d, dword [rcx + 0x1c]
jle 0x140027762
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x30], esi
lea rsi, [0x140000000]
mov dword [rsp + 0x20], ebx
movzx ebx, r13b
movzx ebp, byte [rsi + rbx + 0x3e9a0]
mov ebx, r13d
shr ebx, 0x18
shl ebp, 0x18
movzx ebx, byte [rsi + rbx + 0x3e9a0]
shl ebx, 0x10
or ebp, ebx
mov ebx, r13d
shr ebx, 0x10
movzx ebx, bl
movzx ebx, byte [rsi + rbx + 0x3e9a0]
shl ebx, 8
or ebp, ebx
mov ebx, r13d
shr ebx, 8
movzx ebx, bl
movzx ebx, byte [rsi + rbx + 0x3e9a0]
or ebp, ebx
xor ebp, dword [r11]
add r11, 4
xor r10d, ebp
xor r9d, r10d
xor r8d, r9d
xor r14d, r8d
mov ebp, r14d
shr ebp, 0x18
mov dword [rcx + r12*4], r10d
mov dword [rcx + r12*4 + 4], r9d
mov dword [rcx + r12*4 + 8], r8d
movzx ebx, byte [rsi + rbp + 0x3e9a0]
mov ebp, r14d
shr ebp, 0x10
movzx ebp, bpl
shl ebx, 0x18
mov dword [rcx + r12*4 + 0xc], r14d
movzx ebp, byte [rsi + rbp + 0x3e9a0]
shl ebp, 0x10
or ebx, ebp
mov ebp, r14d
shr ebp, 8
movzx ebp, bpl
movzx ebp, byte [rsi + rbp + 0x3e9a0]
shl ebp, 8
or ebx, ebp
movzx ebp, r14b
movzx ebp, byte [rsi + rbp + 0x3e9a0]
or ebx, ebp
xor edi, ebx
xor edx, edi
xor eax, edx
xor r13d, eax
mov dword [rcx + r12*4 + 0x10], edi
mov dword [rcx + r12*4 + 0x14], edx
mov dword [rcx + r12*4 + 0x18], eax
mov dword [rcx + r12*4 + 0x1c], r13d
add r12, 8
cmp r12, r15
jl 0x14002766d
mov rbp, qword [rsp + 0x28]
mov esi, dword [rsp + 0x30]
mov ebx, dword [rsp + 0x20]
mov rdi, qword [rsp + 0xb0]
lea r8, [r15*4]
mov rdx, rdi
call fcn.14002e760
mov edx, esi
lea rax, [rdi + rbp*4]
imul edx, ebx
cmp esi, edx
jge 0x1400277e2
movsxd rbx, ebx
lea r11, [0x140000000]
imul rbx, rbp
mov r9d, dword [rax]
mov ecx, r9d
movzx edx, r9b
mov edi, r9d
shr ecx, 8
inc rbp
movzx esi, cl
shr edi, 0x10
movzx r8d, dil
shr r9d, 0x18
mov r10d, dword [r11 + rdx*4 + 0x39820]
xor r10d, dword [r11 + rsi*4 + 0x39c20]
xor r10d, dword [r11 + r8*4 + 0x3a020]
xor r10d, dword [r11 + r9*4 + 0x3a420]
mov dword [rax], r10d
add rax, 4
cmp rbp, rbx
jl 0x140027795
add rsp, 0x38
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret