Function at 0x140497040
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x160
movdqa xmmword [rsp + 0x150], xmm6
mov esi, r9d
mov edi, edx
mov r14, rcx
mov rax, qword [rsp + 0x1c8]
mov rcx, qword [0x1406a7e00]
xor rcx, rsp
mov qword [rsp + 0x148], rcx
mov dword [rsp + 0x3c], 0
mov r9, qword [rax]
mov rax, qword [rax + 8]
lea rcx, [rsp + 0x40]
mov qword [rsp + 0x30], rcx
lea rcx, [rsp + 0x3c]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
mov rcx, r14
call fcn.140497540
mov ebx, eax
mov rcx, qword [r14 + 0xa0]
test al, al
je 0x1404972b8
mov r15, qword [rsp + 0x1c0]
mov ebp, dword [rsp + 0x3c]
mov r9d, dword [rcx + 0x58]
cmp r9d, ebp
cmovae r9d, ebp
mov r8d, dword [rcx + 0x54]
mov eax, r9d
sub eax, r8d
cmp eax, 2
jb 0x1404974c2
or byte [rcx + 0xb4], 0x20
mov rdx, qword [rcx + 0x68]
mov r11d, 0xffffffff
cmp r9d, r8d
je 0x1404974b0
cmp dword [rcx + 0x1c], 2
jne 0x140497493
cmp r9d, r8d
jbe 0x1404974b0
mov eax, r9d
mov r12, rax
sub r12, r8
mov r10, r8
cmp r12, 9
jb 0x140497286
mov r10d, r12d
and r10d, 7
mov r11d, 8
cmovne r11, r10
sub r12, r11
mov r10, r12
add r10, r8
add r11, r8
sub r11, rax
lea r12, [r8 + r8*4]
lea r12, [rdx + r12*4]
add r12, 0x94
pcmpeqd xmm1, xmm1
movdqa xmm0, xmmword [0x140599730]
pcmpeqd xmm2, xmm2
nop dword [rax]
movd xmm3, dword [r12 - 0x50]
movd xmm4, dword [r12 - 0x64]
punpckldq xmm4, xmm3
movd xmm3, dword [r12 - 0x78]
movd xmm5, dword [r12 - 0x8c]
punpckldq xmm5, xmm3
punpcklqdq xmm5, xmm4
movd xmm3, dword [r12]
movd xmm4, dword [r12 - 0x14]
punpckldq xmm4, xmm3
movd xmm3, dword [r12 - 0x28]
movd xmm6, dword [r12 - 0x3c]
punpckldq xmm6, xmm3
punpcklqdq xmm6, xmm4
movdqa xmm3, xmm1
movdqa xmm4, xmm5
pxor xmm4, xmm0
pxor xmm1, xmm0
pcmpgtd xmm4, xmm1
pand xmm3, xmm4
pandn xmm4, xmm5
movdqa xmm1, xmm4
por xmm1, xmm3
movdqa xmm3, xmm2
movdqa xmm4, xmm6
pxor xmm4, xmm0
pxor xmm2, xmm0
pcmpgtd xmm4, xmm2
pand xmm3, xmm4
pandn xmm4, xmm6
movdqa xmm2, xmm4
por xmm2, xmm3
add r12, 0xa0
add r11, 8
jne 0x140497170
movdqa xmm3, xmm1
pxor xmm3, xmm0
movdqa xmm4, xmm2
pxor xmm4, xmm0
pcmpgtd xmm4, xmm3
pand xmm1, xmm4
pandn xmm4, xmm2
por xmm4, xmm1
pshufd xmm1, xmm4, 0xee
movdqa xmm2, xmm4
pxor xmm2, xmm0
movdqa xmm3, xmm1
pxor xmm3, xmm0
pcmpgtd xmm3, xmm2
pand xmm4, xmm3
pandn xmm3, xmm1
por xmm3, xmm4
pshufd xmm1, xmm3, 0x55
movdqa xmm2, xmm3
pxor xmm2, xmm0
pxor xmm0, xmm1
pcmpgtd xmm0, xmm2
pand xmm3, xmm0
pandn xmm0, xmm1
por xmm0, xmm3
movd r11d, xmm0
sub rax, r10
lea r10, [r10 + r10*4]
lea r10, [rdx + r10*4]
add r10, 8
nop word cs:[rax + rax]
mov r12d, dword [r10]
cmp r11d, r12d
cmovae r11d, r12d
add r10, 0x14
dec rax
jne 0x1404972a0
jmp 0x1404974b0
test byte [rcx + 0x18], 0x40
je 0x1404974dd
mov r9d, dword [rsp + 0x3c]
mov eax, dword [rcx + 0x58]
cmp eax, r9d
cmovb r9d, eax
mov r8d, dword [rcx + 0x54]
mov eax, r9d
sub eax, r8d
cmp eax, 2
jb 0x1404974dd
or byte [rcx + 0xb4], 0x20
mov rdx, qword [rcx + 0x68]
mov r11d, 0xffffffff
cmp r9d, r8d
je 0x140497526
cmp dword [rcx + 0x1c], 2
jne 0x140497509
cmp r9d, r8d
jbe 0x140497526
mov eax, r9d
mov rsi, rax
sub rsi, r8
mov r10, r8
cmp rsi, 9
jb 0x14049746c
mov r10d, esi
and r10d, 7
mov r11d, 8
cmovne r11, r10
sub rsi, r11
mov r10, rsi
add r10, r8
add r11, r8
sub r11, rax
lea rsi, [r8 + r8*4]
lea rsi, [rdx + rsi*4]
add rsi, 0x94
pcmpeqd xmm1, xmm1
movdqa xmm0, xmmword [0x140599730]
pcmpeqd xmm2, xmm2
movd xmm3, dword [rsi - 0x50]
movd xmm4, dword [rsi - 0x64]
punpckldq xmm4, xmm3
movd xmm3, dword [rsi - 0x78]
movd xmm5, dword [rsi - 0x8c]
punpckldq xmm5, xmm3
punpcklqdq xmm5, xmm4
movd xmm3, dword [rsi]
movd xmm4, dword [rsi - 0x14]
punpckldq xmm4, xmm3
movd xmm3, dword [rsi - 0x28]
movd xmm6, dword [rsi - 0x3c]
punpckldq xmm6, xmm3
punpcklqdq xmm6, xmm4
movdqa xmm3, xmm1
movdqa xmm4, xmm5
pxor xmm4, xmm0
pxor xmm1, xmm0
pcmpgtd xmm4, xmm1
pand xmm3, xmm4
pandn xmm4, xmm5
movdqa xmm1, xmm4
por xmm1, xmm3
movdqa xmm3, xmm2
movdqa xmm4, xmm6
pxor xmm4, xmm0
pxor xmm2, xmm0
pcmpgtd xmm4, xmm2
pand xmm3, xmm4
pandn xmm4, xmm6
movdqa xmm2, xmm4
por xmm2, xmm3
add rsi, 0xa0
add r11, 8
jne 0x140497366
movdqa xmm3, xmm1
pxor xmm3, xmm0
movdqa xmm4, xmm2
pxor xmm4, xmm0
pcmpgtd xmm4, xmm3
pand xmm1, xmm4
pandn xmm4, xmm2
por xmm4, xmm1
pshufd xmm1, xmm4, 0xee
movdqa xmm2, xmm4
pxor xmm2, xmm0
movdqa xmm3, xmm1
pxor xmm3, xmm0
pcmpgtd xmm3, xmm2
pand xmm4, xmm3
pandn xmm3, xmm1
por xmm3, xmm4
pshufd xmm1, xmm3, 0x55
movdqa xmm2, xmm3
pxor xmm2, xmm0
pxor xmm0, xmm1
pcmpgtd xmm0, xmm2
pand xmm3, xmm0
pandn xmm0, xmm1
por xmm0, xmm3
movd r11d, xmm0
sub rax, r10
lea r10, [r10 + r10*4]
lea r10, [rdx + r10*4]
add r10, 8
mov esi, dword [r10]
cmp r11d, esi
cmovae r11d, esi
add r10, 0x14
dec rax
jne 0x14049747b
jmp 0x140497526
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r10, [r8 + r8*4]
mov r10d, dword [rdx + r10*4 + 8]
mov r11d, dword [rdx + rax*4 + 8]
cmp r10d, r11d
cmovb r11d, r10d
mov dword [rsp + 0x20], r11d
mov dword [rsp + 0x28], 3
call fcn.14034bed0
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r15
lea r8, [rsp + 0x40]
mov rcx, r14
mov edx, edi
mov r9d, esi
call fcn.140497850
mov rcx, qword [rsp + 0x148]
xor rcx, rsp
call fcn.1405602f0
mov eax, ebx
movaps xmm6, xmmword [rsp + 0x150]
add rsp, 0x160
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
lea eax, [r9 - 1]
lea rax, [rax + rax*4]
lea r10, [r8 + r8*4]
mov r10d, dword [rdx + r10*4 + 8]
mov r11d, dword [rdx + rax*4 + 8]
cmp r10d, r11d
cmovb r11d, r10d
mov dword [rsp + 0x20], r11d
mov dword [rsp + 0x28], 2
call fcn.14034bed0
jmp 0x1404974dd