Function at 0x18007e7d0
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
mov qword [rsp + 0x20], r9
push rbx
push rbp
push rsi
push rdi
push r14
sub rsp, 0x40
mov r14, r8
mov rsi, rdx
mov rbp, rcx
test rdx, rdx
je 0x18007eab9
xor ebx, ebx
lea edx, [rbx + 4]
cmp rsi, rdx
jae 0x18007e80d
lea ecx, [rbx + 2]
call fcn.180092bd4
mov rdi, rax
test rsi, rsi
je 0x18007e845
jmp 0x18007e820
mov rcx, rsi
shr rcx, 2
inc rcx
call fcn.180092bd4
mov rdi, rax
nop
movzx edx, byte [rbx + rbp]
mov rax, rbx
movzx ecx, bl
shr rax, 2
and cl, 3
lea r8, [rdi + rax*4]
shl cl, 3
inc rbx
shl edx, cl
or dword [r8], edx
cmp rbx, rsi
jb 0x18007e820
dec rbx
shr rbx, 2
inc rbx
mov qword [rsp + 0x28], rbx
test rdi, rdi
je 0x18007eab9
mov edx, 4
mov qword [rsp + 0x70], r12
lea ecx, [rdx + 1]
call fcn.180092bd4
movzx ecx, byte [r14]
lea r8d, [rbx - 1]
mov r12, rax
mov dword [rsp + 0x78], r8d
or dword [rax], ecx
movzx ecx, byte [r14 + 1]
shl ecx, 8
or ecx, dword [rax]
mov dword [rax], ecx
movzx edx, byte [r14 + 2]
shl edx, 0x10
or edx, ecx
mov dword [rax], edx
movzx eax, byte [r14 + 3]
shl eax, 0x18
or eax, edx
xor edx, edx
mov dword [r12], eax
movzx eax, byte [r14 + 4]
or dword [r12 + 4], eax
movzx eax, byte [r14 + 5]
shl eax, 8
or eax, dword [r12 + 4]
mov dword [r12 + 4], eax
movzx ecx, byte [r14 + 6]
shl ecx, 0x10
or ecx, eax
mov dword [r12 + 4], ecx
movzx eax, byte [r14 + 7]
shl eax, 0x18
or eax, ecx
mov dword [r12 + 4], eax
movzx eax, byte [r14 + 8]
or dword [r12 + 8], eax
movzx eax, byte [r14 + 9]
shl eax, 8
or eax, dword [r12 + 8]
mov dword [r12 + 8], eax
movzx ecx, byte [r14 + 0xa]
shl ecx, 0x10
or ecx, eax
mov dword [r12 + 8], ecx
movzx eax, byte [r14 + 0xb]
shl eax, 0x18
or eax, ecx
mov dword [r12 + 8], eax
movzx eax, byte [r14 + 0xc]
or dword [r12 + 0xc], eax
movzx eax, byte [r14 + 0xd]
shl eax, 8
or eax, dword [r12 + 0xc]
mov dword [r12 + 0xc], eax
movzx ecx, byte [r14 + 0xe]
shl ecx, 0x10
or ecx, eax
mov dword [r12 + 0xc], ecx
movzx eax, byte [r14 + 0xf]
mov r14d, 0xb54cda56
shl eax, 0x18
or eax, ecx
mov dword [r12 + 0xc], eax
mov eax, 0x34
mov ecx, dword [rdi]
div ebx
imul edx, eax, 0x61c88647
sub r14d, edx
cmp r8d, 1
jb 0x18007ea7a
test r14d, r14d
je 0x18007ea7a
mov qword [rsp + 0x38], r13
lea r13, [rdi + r8*4]
mov eax, r8d
mov qword [rsp + 0x20], rax
mov qword [rsp + 0x30], r15
nop dword [rax + rax]
mov esi, r14d
mov r10d, r8d
shr rsi, 2
mov rbx, rax
and esi, 3
mov r11, r13
nop dword [rax]
nop word [rax + rax]
dec r10d
lea r11, [r11 - 4]
mov eax, ecx
mov ebp, r10d
shr eax, 3
mov r8d, dword [rdi + r10*4]
mov r9d, r8d
shl r9d, 4
mov edx, r8d
xor r9d, eax
shr edx, 5
lea eax, [rcx*4]
xor edx, eax
mov rax, rbx
and eax, 3
add r9d, edx
xor rax, rsi
dec rbx
xor r8d, dword [r12 + rax*4]
mov eax, r14d
xor eax, ecx
add r8d, eax
xor r9d, r8d
sub dword [r11 + 4], r9d
mov ecx, dword [r11 + 4]
test r10d, r10d
jne 0x18007e9c0
mov r8d, dword [r13]
lea r9d, [rcx*4]
mov eax, r8d
mov edx, ecx
shr eax, 5
xor ecx, r14d
xor r9d, eax
shr edx, 3
mov eax, r8d
and ebp, 3
shl eax, 4
xor rbp, rsi
xor edx, eax
mov rax, qword [rsp + 0x20]
add r9d, edx
xor r8d, dword [r12 + rbp*4]
add r8d, ecx
xor r9d, r8d
mov r8d, dword [rsp + 0x78]
sub dword [rdi], r9d
mov ecx, dword [rdi]
add r14d, 0x61c88647
jne 0x18007e9a0
mov rbx, qword [rsp + 0x28]
mov r15, qword [rsp + 0x30]
mov r13, qword [rsp + 0x38]
mov r9, qword [rsp + 0x88]
mov r8d, 1
mov rdx, rbx
mov rcx, rdi
call fcn.18007e620
mov rcx, rdi
mov rbx, rax
call fcn.18008f428
mov rcx, r12
call fcn.18008f428
mov r12, qword [rsp + 0x70]
mov rax, rbx
add rsp, 0x40
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
xor eax, eax
add rsp, 0x40
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret