Function at 0x140049a20
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x58
lea rbp, [rsp + 0x50]
mov qword [rbp], 0xfffffffffffffffe
mov rsi, r8
mov qword [rbp - 0x10], rdx
mov rdi, rcx
mov r14, qword [r8]
mov rcx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
mov ecx, 0x84222325
test rax, rax
je 0x140049b37
cmp rax, 8
jb 0x140049b0b
mov rdx, rax
shr rdx, 3
xor r8d, r8d
nop word cs:[rax + rax]
movzx r9d, byte [r14 + r8*8]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 1]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 2]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 3]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 4]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 5]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 6]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r14 + r8*8 + 7]
xor r9d, ecx
imul ecx, r9d, 0x1b3
inc r8
cmp rdx, r8
jne 0x140049a80
mov rdx, rax
and rdx, 0xfffffffffffffff8
cmp rdx, rax
jae 0x140049b37
nop word [rax + rax]
movzx r8d, byte [r14 + rdx]
xor r8d, ecx
imul ecx, r8d, 0x1b3
inc rdx
cmp rax, rdx
jne 0x140049b20
and ecx, 0x7fffffff
mov edx, 0x1f31d
call qword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_ldiv]
imul ecx, eax, 0xfffff4ec
shr rax, 0x20
imul eax, eax, 0x41a7
lea edx, [rax + rcx]
add edx, 0x7fffffff
add eax, ecx
cmovns edx, eax
movsxd r13, edx
mov rax, qword [rdi + 0x30]
and rax, r13
mov rcx, qword [rdi + 0x18]
mov rdx, rax
shl rdx, 4
mov rbx, qword [rdx + rcx + 8]
cmp rbx, qword [rdi + 8]
je 0x140049bde
add rax, rax
mov r12, qword [rcx + rax*8]
mov qword [rbp - 8], rsi
mov r14, qword [rsi]
movzx esi, byte [r14]
mov r15, qword [rbx + 0x10]
movzx eax, byte [r15]
cmp sil, al
jl 0x140049bc6
nop word cs:[rax + rax]
jg 0x140049be3
cmp r14, r15
je 0x140049be3
mov rcx, r14
mov rdx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049bf1
cmp rbx, r12
je 0x140049c07
mov rbx, qword [rbx + 8]
mov r15, qword [rbx + 0x10]
movzx eax, byte [r15]
cmp sil, al
jge 0x140049bb0
jmp 0x140049bc6
mov r12, rbx
jmp 0x140049c0b
cmp sil, al
jg 0x140049c04
cmp r14, r15
je 0x140049dba
mov rcx, r15
mov rdx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049dba
mov r12, qword [rbx]
mov rsi, qword [rbp - 8]
movabs rax, 0x7ffffffffffffff
cmp qword [rdi + 0x10], rax
je 0x140049e60
mov ecx, 0x20
call fcn.140117ae8
mov qword [rbp - 8], rax
mov rbx, qword [rsi]
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], 0
mov rax, qword [rdi + 0x10]
inc rax
js 0x140049c9c
cvtsi2ss xmm0, rax
movss xmm1, dword [rdi + 4]
mov rdx, qword [rdi + 0x38]
test rdx, rdx
jns 0x140049cbf
mov rax, rdx
shr rax, 1
mov ecx, edx
and ecx, 1
or rcx, rax
cvtsi2ss xmm2, rcx
addss xmm2, xmm2
movaps xmm3, xmm0
divss xmm3, xmm2
ucomiss xmm3, xmm1
ja 0x140049cd0
mov r10, qword [rdi + 8]
mov r15, qword [rdi + 0x18]
and r13, qword [rdi + 0x30]
lea r11, [r13*2]
lea rdx, [r13*2 + 1]
jmp 0x140049ded
mov rcx, rax
shr rcx, 1
and eax, 1
or rax, rcx
cvtsi2ss xmm0, rax
addss xmm0, xmm0
movss xmm1, dword [rdi + 4]
mov rdx, qword [rdi + 0x38]
test rdx, rdx
js 0x140049c58
cvtsi2ss xmm2, rdx
movaps xmm3, xmm0
divss xmm3, xmm2
ucomiss xmm3, xmm1
jbe 0x140049c7b
divss xmm0, xmm1
roundss xmm0, xmm0, 0xa
cvttss2si rax, xmm0
mov rcx, rax
subss xmm0, dword [0x140124b34]
cvttss2si r8, xmm0
sar rcx, 0x3f
and r8, rcx
or r8, rax
cmp r8, 9
mov eax, 8
cmovae rax, r8
cmp rdx, rax
jae 0x140049d28
lea rcx, [rdx*8]
cmp rcx, rax
cmovb rcx, rax
cmp rdx, 0x200
cmovae rcx, rax
mov rdx, rcx
mov rcx, rdi
call fcn.140048c30
and r13, qword [rdi + 0x30]
mov rax, qword [rdi + 8]
mov r15, qword [rdi + 0x18]
lea r11, [r13*2]
lea rdx, [r13*2 + 1]
mov r12, qword [r15 + r11*8 + 8]
cmp r12, rax
je 0x140049db0
mov qword [rbp - 0x18], rdx
mov qword [rbp - 0x28], rax
mov qword [rbp - 0x20], r11
mov r13, qword [r15 + r11*8]
movzx esi, byte [rbx]
mov r14, qword [r12 + 0x10]
movzx eax, byte [r14]
cmp sil, al
jl 0x140049d96
nop word [rax + rax]
jg 0x140049dc6
cmp rbx, r14
je 0x140049dc6
mov rcx, rbx
mov rdx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049dd0
cmp r12, r13
je 0x140049db5
mov r12, qword [r12 + 8]
mov r14, qword [r12 + 0x10]
movzx eax, byte [r14]
cmp sil, al
jge 0x140049d80
jmp 0x140049d96
mov r10, r12
jmp 0x140049ded
mov r12, r13
jmp 0x140049de1
xor r9d, r9d
mov rax, qword [rbp - 0x10]
jmp 0x140049e48
cmp sil, al
jg 0x140049ddd
cmp rbx, r14
je 0x140049ddd
mov rcx, r14
mov rdx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
mov r12, qword [r12]
mov r10, qword [rbp - 0x28]
mov r11, qword [rbp - 0x20]
mov rdx, qword [rbp - 0x18]
mov rcx, qword [r12 + 8]
inc qword [rdi + 0x10]
mov r9, qword [rbp - 8]
mov qword [r9], r12
mov qword [r9 + 8], rcx
mov qword [rcx], r9
mov qword [r12 + 8], r9
lea r8, [r15 + rdx*8]
lea rdx, [r15 + r11*8]
mov rax, qword [r15 + r11*8]
cmp rax, r10
je 0x140049e34
cmp rax, r12
mov rax, qword [rbp - 0x10]
je 0x140049e3e
mov r9b, 1
mov rdx, r8
cmp qword [r8], rcx
je 0x140049e3e
mov rbx, qword [rbp - 8]
jmp 0x140049e48
mov qword [rdx], r9
mov rdx, r8
mov rax, qword [rbp - 0x10]
mov rbx, qword [rbp - 8]
mov qword [rdx], rbx
mov r9b, 1
mov qword [rax], rbx
mov byte [rax + 8], r9b
add rsp, 0x58
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
lea rcx, [0x140124e3d]
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
int3