Function at 0x140004970
Capabilities:
Encode data using xor

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x10
test rdx, rdx
mov rbp, r8
mov rdi, rdx
mov esi, ecx
jne 0x14000445f
xor eax, eax
add rsp, 0x10
pop rdi
pop rsi
pop rbp
ret
cmp r8, 0x17
not esi
lea r11, [0x140000000]
jb 0x140004850
test r8, r8
mov qword [rsp + 0x40], r12
mov qword [rsp + 0x48], r13
mov qword [rsp + 8], r14
mov qword [rsp], r15
je 0x1400044b8
nop
nop
test dil, 3
je 0x1400044b8
movzx ecx, byte [rdi]
mov eax, esi
add rdi, 1
xor cl, sil
shr eax, 8
movzx edx, cl
mov esi, dword [r11 + rdx*4 + 0x6fa0]
xor esi, eax
sub rbp, 1
jne 0x140004490
xor r13d, r13d
movabs rax, 0xcccccccccccccccd
mov ecx, r13d
mov r14d, r13d
mov r15d, r13d
mul rbp
mov r12, rdx
mov dword [rsp + 0x38], ecx
shr r12, 4
lea rax, [r12 + r12*4]
shl rax, 2
sub rbp, rax
sub r12, 1
je 0x1400046a5
mov qword [rsp + 0x30], rbx
nop
nop
nop
mov r8d, dword [rdi + 8]
mov r9d, dword [rdi + 0xc]
mov r10d, dword [rdi + 0x10]
mov eax, dword [rdi]
mov edx, dword [rdi + 4]
xor r10d, ecx
xor eax, esi
xor edx, r13d
xor r8d, r14d
movzx ecx, al
mov r11d, eax
mov ebx, edx
xor r9d, r15d
lea rax, [0x140000000]
add rdi, 0x14
mov esi, dword [rax + rcx*4 + 0x77a0]
movzx eax, dl
lea rdx, [0x140000000]
mov r13d, dword [rdx + rax*4 + 0x77a0]
movzx eax, r8b
mov r14d, dword [rdx + rax*4 + 0x77a0]
movzx eax, r9b
mov r15d, dword [rdx + rax*4 + 0x77a0]
movzx eax, r10b
mov eax, dword [rdx + rax*4 + 0x77a0]
mov dword [rsp + 0x38], eax
mov rax, r11
shr rax, 0x18
movzx edx, al
mov rax, r11
shr r11, 8
shr rax, 0x10
movzx ecx, al
lea rax, [0x140000000]
mov edx, dword [rax + rdx*4 + 0x83a0]
xor edx, dword [rax + rcx*4 + 0x7fa0]
movzx eax, r11b
lea r11, [0x140000000]
xor edx, dword [r11 + rax*4 + 0x7ba0]
mov rax, rbx
shr rax, 0x18
xor esi, edx
movzx edx, al
mov rax, rbx
shr rbx, 8
mov edx, dword [r11 + rdx*4 + 0x83a0]
shr rax, 0x10
movzx ecx, al
movzx eax, bl
xor edx, dword [r11 + rcx*4 + 0x7fa0]
xor edx, dword [r11 + rax*4 + 0x7ba0]
mov rax, r8
shr rax, 0x18
xor r13d, edx
movzx edx, al
mov rax, r8
shr r8, 8
mov edx, dword [r11 + rdx*4 + 0x83a0]
shr rax, 0x10
movzx ecx, al
movzx eax, r8b
xor edx, dword [r11 + rcx*4 + 0x7fa0]
xor edx, dword [r11 + rax*4 + 0x7ba0]
mov rax, r9
shr rax, 0x18
xor r14d, edx
movzx edx, al
mov rax, r9
shr r9, 8
mov edx, dword [r11 + rdx*4 + 0x83a0]
shr rax, 0x10
movzx ecx, al
movzx eax, r9b
xor edx, dword [r11 + rcx*4 + 0x7fa0]
xor edx, dword [r11 + rax*4 + 0x7ba0]
mov rax, r10
shr rax, 0x18
xor r15d, edx
movzx edx, al
mov rax, r10
shr rax, 0x10
mov edx, dword [r11 + rdx*4 + 0x83a0]
movzx ecx, al
shr r10, 8
xor edx, dword [r11 + rcx*4 + 0x7fa0]
mov ecx, dword [rsp + 0x38]
movzx eax, r10b
xor edx, dword [r11 + rax*4 + 0x7ba0]
xor ecx, edx
sub r12, 1
mov dword [rsp + 0x38], ecx
jne 0x140004500
mov rbx, qword [rsp + 0x30]
mov edx, dword [rdi]
xor edx, esi
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov eax, dword [r11 + rcx*4 + 0x6fa0]
xor eax, r8d
mov r8d, dword [rdi + 4]
xor r8d, eax
xor r8d, r13d
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
mov r8d, dword [rdi + 8]
movzx ecx, dl
shr edx, 8
mov eax, dword [r11 + rcx*4 + 0x6fa0]
xor eax, edx
xor r8d, eax
xor r8d, r14d
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
mov r8d, dword [rdi + 0xc]
movzx ecx, dl
shr edx, 8
mov eax, dword [r11 + rcx*4 + 0x6fa0]
xor eax, edx
xor r8d, eax
xor r8d, r15d
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
mov r8d, dword [rdi + 0x10]
movzx ecx, dl
shr edx, 8
mov eax, dword [r11 + rcx*4 + 0x6fa0]
xor eax, edx
xor r8d, eax
mov eax, dword [rsp + 0x38]
xor r8d, eax
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
mov r15, qword [rsp]
mov r14, qword [rsp + 8]
mov r13, qword [rsp + 0x48]
mov r12, qword [rsp + 0x40]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov r8d, dword [r11 + rcx*4 + 0x6fa0]
xor r8d, edx
movzx ecx, r8b
shr r8d, 8
mov edx, dword [r11 + rcx*4 + 0x6fa0]
xor edx, r8d
movzx ecx, dl
shr edx, 8
mov esi, dword [r11 + rcx*4 + 0x6fa0]
xor esi, edx
add rdi, 0x14
cmp rbp, 8
jb 0x14000493a
mov r9, rbp
shr r9, 3
mov rax, r9
imul rax, rax, 0xfffffffffffffff8
add rbp, rax
nop
nop
movzx ecx, byte [rdi]
add rdi, 8
xor cl, sil
shr esi, 8
movzx eax, cl
movzx ecx, byte [rdi - 7]
mov edx, dword [r11 + rax*4 + 0x6fa0]
xor edx, esi
xor cl, dl
shr edx, 8
movzx eax, cl
movzx ecx, byte [rdi - 6]
mov r8d, dword [r11 + rax*4 + 0x6fa0]
xor r8d, edx
xor cl, r8b
shr r8d, 8
movzx eax, cl
movzx ecx, byte [rdi - 5]
mov edx, dword [r11 + rax*4 + 0x6fa0]
xor edx, r8d
xor cl, dl
shr edx, 8
movzx eax, cl
movzx ecx, byte [rdi - 4]
mov r8d, dword [r11 + rax*4 + 0x6fa0]
xor r8d, edx
xor cl, r8b
shr r8d, 8
movzx eax, cl
movzx ecx, byte [rdi - 3]
mov edx, dword [r11 + rax*4 + 0x6fa0]
xor edx, r8d
xor cl, dl
shr edx, 8
movzx eax, cl
movzx ecx, byte [rdi - 2]
mov r8d, dword [r11 + rax*4 + 0x6fa0]
xor r8d, edx
xor cl, r8b
shr r8d, 8
movzx eax, cl
movzx ecx, byte [rdi - 1]
mov edx, dword [r11 + rax*4 + 0x6fa0]
xor edx, r8d
xor cl, dl
shr edx, 8
movzx eax, cl
mov esi, dword [r11 + rax*4 + 0x6fa0]
xor esi, edx
sub r9, 1
jne 0x140004870
test rbp, rbp
je 0x140004962
nop
movzx ecx, byte [rdi]
mov eax, esi
add rdi, 1
xor cl, sil
shr eax, 8
movzx edx, cl
mov esi, dword [r11 + rdx*4 + 0x6fa0]
xor esi, eax
sub rbp, 1
jne 0x140004940
not esi
mov eax, esi
add rsp, 0x10
pop rdi
pop rsi
pop rbp
ret
mov r8d, r8d
jmp 0x140004440