Function at 0x18023ea10
Capabilities:
Encode data using xor
Encrypt data using twofish

Disassembly:
mov qword [rsp + 8], rbx
mov qword [rsp + 0x10], rbp
mov qword [rsp + 0x18], rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0xa0
mov edi, r8d
mov r12, rdx
mov r14, rcx
xor ebp, ebp
cmp r8d, 0x10
ja 0x18023ea45
lea esi, [rbp + 2]
jmp 0x18023ea51
mov esi, ebp
cmp edi, 0x18
seta sil
add esi, 3
lea eax, [rsi + rsi]
mov r13d, eax
mov qword [rsp + 0x20], r13
mov edx, eax
lea rcx, [rsp + 0x28]
call fcn.180240380
nop
lea rbx, [r13*4]
mov r15, qword [rsp + 0x38]
test rdi, rdi
je 0x18023eadb
test r15, r15
jne 0x18023ea8d
call fcn.1802aa350
mov dword [rax], 0x16
jmp 0x18023ead6
test r12, r12
je 0x18023eaa7
cmp rbx, rdi
jb 0x18023eaa7
mov r8, rdi
mov rdx, r12
mov rcx, r15
call fcn.180298b10
jmp 0x18023eadb
mov r8, rbx
xor edx, edx
mov rcx, r15
call fcn.1802991c0
test r12, r12
jne 0x18023eac6
call fcn.1802aa350
mov dword [rax], 0x16
jmp 0x18023ead6
cmp rbx, rdi
jae 0x18023eadb
call fcn.1802aa350
mov dword [rax], 0x22
call fcn.1802b4118
sub rbx, rdi
lea rcx, [r15 + rdi]
mov r8, rbx
xor edx, edx
call fcn.1802991c0
lea rax, [rdi + 3]
cmp rax, rdi
jb 0x18023f027
mov ebp, 8
mov r12d, 2
nop dword [rax]
nop dword [rax + rax]
lea ecx, [r12 - 2]
mov r8d, esi
mov rdx, r15
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov ebx, dword [r9 + rdi*4 + 0xc00]
xor ebx, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor ebx, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor ebx, dword [r9 + rax*4]
lea ecx, [r12 - 1]
mov r8d, esi
lea rdx, [r15 + 4]
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov edi, dword [r9 + rdi*4 + 0xc00]
xor edi, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor edi, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor edi, dword [r9 + rax*4]
rol edi, 8
lea ecx, [rdi + rbx]
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp - 8], ecx
lea ecx, [rbx + rdi*2]
rol ecx, 9
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp - 4], ecx
mov r8d, esi
mov rdx, r15
mov ecx, r12d
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov ebx, dword [r9 + rdi*4 + 0xc00]
xor ebx, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor ebx, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor ebx, dword [r9 + rax*4]
lea ecx, [r12 + 1]
mov r8d, esi
lea rdx, [r15 + 4]
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov edi, dword [r9 + rdi*4 + 0xc00]
xor edi, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor edi, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor edi, dword [r9 + rax*4]
rol edi, 8
lea ecx, [rdi + rbx]
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp], ecx
lea ecx, [rbx + rdi*2]
rol ecx, 9
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 4], ecx
lea ecx, [r12 + 2]
mov r8d, esi
mov rdx, r15
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov ebx, dword [r9 + rdi*4 + 0xc00]
xor ebx, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor ebx, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor ebx, dword [r9 + rax*4]
lea ecx, [r12 + 3]
mov r8d, esi
lea rdx, [r15 + 4]
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov edi, dword [r9 + rdi*4 + 0xc00]
xor edi, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor edi, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor edi, dword [r9 + rax*4]
rol edi, 8
lea ecx, [rdi + rbx]
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 8], ecx
lea ecx, [rbx + rdi*2]
rol ecx, 9
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 0xc], ecx
lea ecx, [r12 + 4]
mov r8d, esi
mov rdx, r15
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov ebx, dword [r9 + rdi*4 + 0xc00]
xor ebx, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor ebx, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor ebx, dword [r9 + rax*4]
lea ecx, [r12 + 5]
mov r8d, esi
lea rdx, [r15 + 4]
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov edi, dword [r9 + rdi*4 + 0xc00]
xor edi, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor edi, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor edi, dword [r9 + rax*4]
rol edi, 8
lea ecx, [rdi + rbx]
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 0x10], ecx
lea ecx, [rbx + rdi*2]
rol ecx, 9
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 0x14], ecx
lea ecx, [r12 + 6]
mov r8d, esi
mov rdx, r15
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov ebx, dword [r9 + rdi*4 + 0xc00]
xor ebx, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor ebx, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor ebx, dword [r9 + rax*4]
lea ecx, [r12 + 7]
mov r8d, esi
lea rdx, [r15 + 4]
call fcn.18023e890
mov r8d, eax
mov edi, eax
shr rdi, 0x18
mov ecx, eax
shr ecx, 0x10
movzx edx, cl
lea r9, [0x180337af0]
mov edi, dword [r9 + rdi*4 + 0xc00]
xor edi, dword [r9 + rdx*4 + 0x800]
mov ecx, eax
shr ecx, 8
movzx eax, cl
xor edi, dword [r9 + rax*4 + 0x400]
movzx eax, r8b
xor edi, dword [r9 + rax*4]
rol edi, 8
lea ecx, [rdi + rbx]
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 0x18], ecx
lea ecx, [rbx + rdi*2]
rol ecx, 9
mov rax, qword [r14 + 0xd0]
mov dword [rax + rbp + 0x1c], ecx
add r12d, 0xa
lea rbp, [rbp + 0x28]
lea eax, [r12 - 2]
cmp eax, 0x28
jb 0x18023eb10
mov rdx, qword [rsp + 0x20]
lea rcx, [rsp + 0x40]
call fcn.180240380
xor ebp, ebp
mov edi, ebp
mov r13, qword [rsp + 0x50]
nop word [rax + rax]
lea eax, [rdi + rdi]
mov edx, eax
inc eax
mov edx, dword [r15 + rdx*4]
mov ecx, dword [r15 + rax*4]
call fcn.18023e5c0
mov ecx, esi
sub ecx, edi
lea ecx, [rcx*2 - 2]
mov dword [r13 + rcx*4], eax
inc edi
cmp edi, esi
jb 0x18023ef10
mov r12, rbp
mov ebx, 0x800
lea r15, [0x180337af0]
nop dword [rax]
mov r8d, esi
mov rdx, r13
mov ecx, ebp
call fcn.18023e890
mov edi, eax
movzx ecx, al
mov rdx, qword [r14 + 0x10e8]
mov ecx, dword [r15 + rcx*4]
mov dword [r12 + rdx], ecx
mov ecx, eax
shr ecx, 8
movzx ecx, cl
mov rdx, qword [r14 + 0x10e8]
mov ecx, dword [r15 + rcx*4 + 0x400]
mov dword [rdx + rbx - 0x400], ecx
mov ecx, eax
shr ecx, 0x10
movzx eax, cl
mov rcx, qword [r14 + 0x10e8]
mov eax, dword [r15 + rax*4 + 0x800]
mov dword [rbx + rcx], eax
shr rdi, 0x18
mov rdx, qword [r14 + 0x10e8]
mov eax, dword [r15 + rdi*4 + 0xc00]
mov dword [rdx + rbx + 0x400], eax
inc ebp
lea rbx, [rbx + 4]
lea r12, [r12 + 4]
cmp ebp, 0x100
jb 0x18023ef50
mov rdi, r13
xor eax, eax
mov rcx, qword [rsp + 0x48]
rep stosd dword [rdi], eax
mov rcx, r13
call fcn.1802a430c
nop
mov rdi, qword [rsp + 0x38]
xor eax, eax
mov rcx, qword [rsp + 0x30]
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x38]
lea r11, [rsp + 0xa0]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
jmp fcn.1802a430c
lea rdx, str.RoundUpToMultipleOf:_integer_overflow
lea rcx, [rsp + 0x40]
call fcn.1800ddc70
nop
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x60]
call fcn.1800dc1c0
lea rdx, [0x1803db9a0]
lea rcx, [rsp + 0x60]
call fcn.180299c58
int3