Function at 0x140147de0
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x18
mov r10, r9
sub r10, r8
cmp r10, 4
jne 0x140147e0d
add rsp, 0x18
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov r13, r8
mov r12, qword [rsp + 0xa0]
mov r8, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x88]
mov rbp, qword [rsp + 0x80]
movsxd rbx, dword [r13]
mov esi, dword [rdx + rbx*4]
mov ebx, esi
sar ebx, 8
movsxd rbx, ebx
movzx edi, byte [rdi + rbx]
movzx r11d, byte [rbp + rdi*2]
movzx ebx, sil
mov r14d, r11d
sub r14d, ebx
movzx r15d, byte [rbp + rdi*2 + 1]
test r11d, r11d
je 0x140147ec0
cmp r14d, 2
jl 0x140147ec0
cmp ebx, r11d
jae 0x140147ec0
cmp r13, r9
jae 0x140147f1e
mov r8, qword [rsp + 0x90]
mov rbp, r13
nop dword [rax]
movsxd rbx, dword [rbp]
mov edi, dword [rdx + rbx*4]
sar edi, 8
movsxd rdi, edi
movsx edi, byte [r8 + rdi]
movsxd rdi, edi
lea esi, [rdi - 1]
mov rax, 0xfffffffffffffffe
sub rax, rdi
xor ecx, ecx
test edi, edi
setle cl
cmovle rsi, rax
neg ecx
xor ecx, ebx
mov dword [r12 + rsi*4], ecx
add rbp, 4
cmp rbp, r9
jb 0x140147e80
jmp 0x140147f1e
cmp ebx, 0xfd
ja 0x140147f3c
cmp r15b, sil
jae 0x140147f3c
cmp r13, r9
jae 0x140147f1e
mov rcx, r13
nop word cs:[rax + rax]
movsxd rax, dword [rcx]
mov ebp, dword [rdx + rax*4]
sar ebp, 8
movsxd rbp, ebp
movsx ebp, byte [r8 + rbp]
movsxd rbp, ebp
lea ebx, [rbp - 1]
mov rdi, 0xfffffffffffffffe
sub rdi, rbp
xor esi, esi
test ebp, ebp
setle sil
cmovle rbx, rdi
neg esi
xor esi, eax
mov dword [r12 + rbx*4], esi
add rcx, 4
cmp rcx, r9
jb 0x140147ee0
mov rcx, r13
mov rdx, r12
mov r8, r10
add rsp, 0x18
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp fcn.14038cc40
mov eax, ebx
not al
cmp ebx, r11d
jae 0x140147f58
sub r15d, r11d
add r15d, r14d
inc r15d
movzx eax, al
mov esi, eax
add esi, 5
jmp 0x140147f89
movzx eax, al
cmp ebx, r15d
jbe 0x140147f79
mov r14d, eax
lea ebp, [r11 + rax]
inc ebp
lea esi, [r15 + rax]
inc esi
add eax, 5
mov r15d, eax
mov eax, ebp
jmp 0x140147f89
sub r15d, ebx
inc r15d
mov esi, eax
add esi, 5
mov r14w, 2
lea r11, [r9 - 8]
cmp r11, r13
jb 0x140147dfc
mov qword [rsp], r13
cmp ax, si
setb bl
movzx eax, ax
mov qword [rsp + 8], rax
movzx r12d, si
cmp r14w, r15w
jae 0x140148119
movzx eax, r14w
mov qword [rsp + 0x10], rax
movzx r13d, r15w
test bl, 1
je 0x1401480a7
jmp 0x140147fe6
not ebp
mov dword [rsi], ebp
mov dword [rsi - 4], r8d
add r11, 0xfffffffffffffffc
cmp r11, qword [rsp]
jb 0x140147dfc
movsxd r8, dword [r11]
lea rsi, [r11 + 4]
movsxd r15, dword [rdx + r8*4]
mov ebp, dword [r11 + 4]
add r15, rcx
movsxd rax, ebp
movsxd r10, dword [rdx + rax*4]
add r10, rcx
mov r14, qword [rsp + 0x10]
nop word [rax + rax]
movzx eax, byte [r15 + r14]
movzx ebx, byte [r10 + r14]
cmp al, bl
jne 0x140148050
inc r14
cmp r13, r14
jne 0x140148010
mov rdi, qword [rsp + 8]
nop dword [rax + rax]
movzx eax, byte [r15 + rdi]
movzx ebx, byte [r10 + rdi]
cmp al, bl
jne 0x140148050
inc rdi
cmp r12, rdi
jne 0x140148030
jmp 0x140147fd0
cmp al, bl
jbe 0x140148080
add rsi, 4
nop dword [rax + rax]
mov dword [rsi - 8], ebp
cmp rsi, r9
jae 0x140148080
mov ebp, dword [rsi]
add rsi, 4
test ebp, ebp
js 0x140148060
add rsi, 0xfffffffffffffffc
jmp 0x140147ff8
cmp al, bl
jne 0x140147fd4
mov ebp, dword [rsi]
jmp 0x140147fd0
not esi
mov dword [rbp], esi
mov dword [rbp - 4], r8d
add r11, 0xfffffffffffffffc
cmp r11, qword [rsp]
jb 0x140147dfc
movsxd r8, dword [r11]
lea rbp, [r11 + 4]
movsxd r10, dword [rdx + r8*4]
mov esi, dword [r11 + 4]
add r10, rcx
movsxd rax, esi
movsxd rdi, dword [rdx + rax*4]
add rdi, rcx
mov rax, qword [rsp + 0x10]
nop dword [rax + rax]
movzx ebx, byte [rdi + rax]
cmp byte [r10 + rax], bl
jne 0x1401480f0
inc rax
cmp r13, rax
jne 0x1401480d0
jmp 0x140148090
jbe 0x140148095
add rbp, 4
nop word cs:[rax + rax]
mov dword [rbp - 8], esi
cmp rbp, r9
jae 0x140148095
mov esi, dword [rbp]
add rbp, 4
test esi, esi
js 0x140148100
add rbp, 0xfffffffffffffffc
jmp 0x1401480b9
test bl, 1
je 0x1401481b8
mov r14, qword [rsp]
jmp 0x140148145
not ebp
mov dword [rdi], ebp
mov dword [rdi - 4], r8d
add r11, 0xfffffffffffffffc
cmp r11, r14
jb 0x140147dfc
movsxd r8, dword [r11]
lea rdi, [r11 + 4]
movsxd r10, dword [rdx + r8*4]
mov ebp, dword [r11 + 4]
add r10, rcx
movsxd rax, ebp
movsxd rax, dword [rdx + rax*4]
add rax, rcx
mov rsi, qword [rsp + 8]
nop word cs:[rax + rax]
movzx ebx, byte [rax + rsi]
cmp byte [r10 + rsi], bl
jne 0x140148190
inc rsi
cmp r12, rsi
jne 0x140148170
jmp 0x140148130
jbe 0x140148134
add rdi, 4
nop word cs:[rax + rax]
mov dword [rdi - 8], ebp
cmp rdi, r9
jae 0x140148134
mov ebp, dword [rdi]
add rdi, 4
test ebp, ebp
js 0x1401481a0
add rdi, 0xfffffffffffffffc
jmp 0x140148157
mov rax, qword [rsp]
nop dword [rax]
not dword [r11 + 4]
add r11, 0xfffffffffffffffc
cmp r11, rax
jae 0x1401481c0
jmp 0x140147dfc