Function at 0x140049210
Capabilities:
Encode data using xor

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x78
lea rbp, [rsp + 0x70]
mov qword [rbp], 0xfffffffffffffffe
mov rbx, r8
mov r13, rdx
mov qword [rbp - 8], 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 0x140049327
cmp rax, 8
jb 0x1400492fb
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 0x140049270
mov rdx, rax
and rdx, 0xfffffffffffffff8
cmp rdx, rax
jae 0x140049327
nop word [rax + rax]
movzx r8d, byte [r14 + rdx]
xor r8d, ecx
imul ecx, r8d, 0x1b3
inc rdx
cmp rax, rdx
jne 0x140049310
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 rcx, edx
mov r14, qword [rbp - 8]
mov rax, qword [r14 + 0x30]
mov qword [rbp - 0x40], rcx
and rax, rcx
mov rcx, qword [r14 + 0x18]
mov rdx, rax
shl rdx, 4
mov r12, qword [rdx + rcx + 8]
cmp r12, qword [r14 + 8]
je 0x1400493d0
add rax, rax
mov rsi, qword [rcx + rax*8]
mov r14, qword [rbx]
movzx edi, byte [r14]
mov r15, qword [r12 + 0x10]
movzx eax, byte [r15]
cmp dil, al
jl 0x1400493b6
nop word [rax + rax]
jg 0x1400493d5
cmp r14, r15
je 0x1400493d5
mov rcx, r14
mov rdx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x1400493e3
cmp r12, rsi
je 0x1400493fa
mov r12, qword [r12 + 8]
mov r15, qword [r12 + 0x10]
movzx eax, byte [r15]
cmp dil, al
jge 0x1400493a0
jmp 0x1400493b6
mov rsi, r12
jmp 0x1400493fe
cmp dil, al
jg 0x1400493f6
cmp r14, r15
je 0x140049925
mov rcx, r15
mov rdx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049925
mov rsi, qword [r12]
mov r14, qword [rbp - 8]
movabs rax, 0x7ffffffffffffff
cmp qword [r14 + 0x10], rax
je 0x1400499bd
mov ecx, 0x20
call fcn.140117ae8
mov rcx, qword [rbx]
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], 0
mov rdx, qword [r14 + 0x10]
inc rdx
js 0x140049462
cvtsi2ss xmm0, rdx
movss xmm1, dword [r14 + 4]
mov r9, qword [r14 + 0x38]
test r9, r9
jns 0x140049486
mov rcx, r9
shr rcx, 1
mov edx, r9d
and edx, 1
or rdx, rcx
cvtsi2ss xmm2, rdx
addss xmm2, xmm2
jmp 0x14004948b
mov rcx, rdx
shr rcx, 1
and edx, 1
or rdx, rcx
cvtsi2ss xmm0, rdx
addss xmm0, xmm0
movss xmm1, dword [r14 + 4]
mov r9, qword [r14 + 0x38]
test r9, r9
js 0x140049448
cvtsi2ss xmm2, r9
movaps xmm3, xmm0
divss xmm3, xmm2
ucomiss xmm3, xmm1
mov qword [rbp - 0x28], rax
jbe 0x1400498fe
divss xmm0, xmm1
roundss xmm0, xmm0, 0xa
cvttss2si rcx, xmm0
mov rdx, rcx
subss xmm0, dword [0x140124b34]
cvttss2si r8, xmm0
sar rdx, 0x3f
and r8, rdx
or r8, rcx
cmp r8, 9
mov ecx, 8
cmovae rcx, r8
cmp r9, rcx
jae 0x1400494f7
lea rdx, [r9*8]
cmp rdx, rcx
cmovb rdx, rcx
cmp r9, 0x200
cmovae rdx, rcx
mov r9, rdx
movabs rcx, 0x800000000000001
cmp r9, rcx
jae 0x1400499c9
lea rax, [r14 + 0x18]
dec r9
or r9, 1
bsr r15, r9
xor r15, 0xffffffffffffffc0
add r15, 0x41
mov rsi, qword [r14 + 8]
mov edx, 2
mov ecx, r15d
shl rdx, cl
mov qword [rbp - 0x30], rax
mov rcx, rax
mov r8, rsi
call fcn.140048520
mov qword [rbp - 0x20], r13
mov edx, 1
mov ecx, r15d
shl rdx, cl
lea rax, [rdx - 1]
mov qword [r14 + 0x30], rax
mov qword [r14 + 0x38], rdx
mov r10, qword [r14 + 8]
mov r9, qword [r10]
cmp r9, rsi
mov r13, qword [rbp - 0x30]
je 0x140049884
mov qword [rbp - 0x38], rsi
jmp 0x14004959a
mov rax, qword [rbp - 0x10]
mov qword [rcx + r12*8], rax
mov qword [rcx + r12*8 + 8], rax
mov r9, qword [rbp - 0x18]
cmp r9, rsi
je 0x14004987c
mov rbx, r9
mov rdi, qword [r9]
mov r15, qword [r9 + 0x10]
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
test rax, rax
mov qword [rbp - 0x18], rdi
mov qword [rbp - 0x10], rbx
mov ecx, 0x84222325
je 0x140049697
cmp rax, 8
jb 0x14004966b
mov rdx, rax
shr rdx, 3
xor r8d, r8d
nop word cs:[rax + rax]
movzx r9d, byte [r15 + r8*8]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 1]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 2]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 3]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 4]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 5]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 6]
xor r9d, ecx
imul ecx, r9d, 0x1b3
movzx r9d, byte [r15 + r8*8 + 7]
xor r9d, ecx
imul ecx, r9d, 0x1b3
inc r8
cmp rdx, r8
jne 0x1400495e0
mov rdx, rax
and rdx, 0xfffffffffffffff8
cmp rdx, rax
jae 0x140049697
nop word [rax + rax]
movzx r8d, byte [r15 + rdx]
xor r8d, ecx
imul ecx, r8d, 0x1b3
inc rdx
cmp rax, rdx
jne 0x140049680
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 rbx, edx
and rbx, qword [r14 + 0x30]
mov rcx, qword [r13]
lea r12, [rbx + rbx]
shl rbx, 4
mov rdi, qword [rcx + rbx]
cmp rdi, rsi
je 0x140049580
mov qword [rbp - 0x48], rcx
mov rsi, qword [rcx + r12*8 + 8]
mov rdx, qword [rsi + 0x10]
mov rax, qword [rbp - 0x10]
mov r15, qword [rax + 0x10]
movzx r14d, byte [r15]
cmp r14b, byte [rdx]
jge 0x1400497d0
mov r13, qword [rsi + 8]
cmp rdi, rsi
jne 0x14004972e
jmp 0x140049837
mov r13, qword [r12 + 8]
cmp rdi, r12
je 0x140049837
mov rdx, qword [r13 + 0x10]
cmp r14b, byte [rdx]
jl 0x14004975a
setg al
xor ecx, ecx
cmp r15, rdx
sete cl
movzx eax, al
cmp cl, al
cmova eax, ecx
test al, al
jne 0x140049797
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049797
mov r12, qword [r13 + 8]
cmp rdi, r13
je 0x140049834
mov rdx, qword [r12 + 0x10]
cmp r14b, byte [rdx]
jl 0x140049720
setg al
xor ecx, ecx
cmp r15, rdx
sete cl
movzx eax, al
cmp cl, al
cmova eax, ecx
test al, al
jne 0x140049794
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
js 0x140049720
mov r13, r12
mov rax, qword [r13]
mov r10, qword [rbp - 0x10]
mov rcx, qword [r10 + 8]
mov r9, qword [rbp - 0x18]
mov qword [rcx], r9
mov rdx, qword [r9 + 8]
mov qword [rdx], rax
mov r8, qword [rax + 8]
mov qword [r8], r10
mov qword [rax + 8], rdx
mov qword [r9 + 8], rcx
mov qword [r10 + 8], r8
jmp 0x140049867
jg 0x1400497e7
cmp r15, rdx
je 0x1400497e7
mov rcx, r15
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
js 0x140049708
mov rax, qword [rsi]
mov r10, qword [rbp - 0x10]
cmp rax, r10
mov r9, qword [rbp - 0x18]
je 0x140049818
mov rcx, qword [r10 + 8]
mov qword [rcx], r9
mov rdx, qword [r9 + 8]
mov qword [rdx], rax
mov r8, qword [rax + 8]
mov qword [r8], r10
mov qword [rax + 8], rdx
mov qword [r9 + 8], rcx
mov qword [r10 + 8], r8
mov rax, qword [rbp - 0x48]
mov qword [rax + r12*8 + 8], r10
mov r14, qword [rbp - 8]
mov rsi, qword [rbp - 0x38]
cmp r9, rsi
jne 0x14004959a
jmp 0x14004987c
mov r13, r12
mov r8, qword [rbp - 0x48]
add r8, rbx
mov rdx, qword [rbp - 0x10]
mov rax, qword [rdx + 8]
mov r9, qword [rbp - 0x18]
mov qword [rax], r9
mov rcx, qword [r9 + 8]
mov qword [rcx], rdi
mov qword [r13], rdx
mov qword [rdi + 8], rcx
mov qword [r9 + 8], rax
mov qword [rdx + 8], r13
mov qword [r8], rdx
mov r14, qword [rbp - 8]
mov r13, qword [rbp - 0x30]
mov rsi, qword [rbp - 0x38]
cmp r9, rsi
jne 0x14004959a
mov r10, qword [r14 + 8]
mov rax, qword [r14 + 0x30]
and rax, qword [rbp - 0x40]
mov rdi, qword [r13]
lea r12, [rax + rax]
lea rax, [rax*2 + 1]
mov r13, qword [rdi + r12*8 + 8]
cmp r13, r10
je 0x14004991c
mov qword [rbp - 0x18], rax
mov qword [rbp - 0x10], r10
mov rsi, qword [rdi + r12*8]
mov rax, qword [rbp - 0x28]
mov rbx, qword [rax + 0x10]
movzx r15d, byte [rbx]
mov r14, qword [r13 + 0x10]
movzx eax, byte [r14]
cmp r15b, al
jl 0x1400498e6
nop word [rax + rax]
jg 0x140049929
cmp rbx, r14
je 0x140049929
mov rcx, rbx
mov rdx, r14
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
jns 0x140049933
cmp r13, rsi
je 0x140049944
mov r13, qword [r13 + 8]
mov r14, qword [r13 + 0x10]
movzx eax, byte [r14]
cmp r15b, al
jge 0x1400498d0
jmp 0x1400498e6
mov r10, qword [r14 + 8]
mov rdi, qword [r14 + 0x18]
mov rax, qword [rbp - 0x40]
and rax, qword [r14 + 0x30]
lea r12, [rax + rax]
lea rax, [rax*2 + 1]
jmp 0x140049954
mov rsi, r10
mov r13, qword [rbp - 0x20]
jmp 0x140049954
xor eax, eax
jmp 0x1400499a1
cmp r15b, al
jg 0x140049940
cmp rbx, r14
je 0x140049940
mov rcx, r14
mov rdx, rbx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
test eax, eax
mov rsi, qword [r13]
mov r13, qword [rbp - 0x20]
mov r14, qword [rbp - 8]
mov r10, qword [rbp - 0x10]
mov rax, qword [rbp - 0x18]
mov rcx, qword [rsi + 8]
inc qword [r14 + 0x10]
mov r9, qword [rbp - 0x28]
mov qword [r9], rsi
mov qword [r9 + 8], rcx
mov qword [rcx], r9
mov qword [rsi + 8], r9
lea r8, [rdi + rax*8]
lea rdx, [rdi + r12*8]
mov rax, qword [rdi + r12*8]
cmp rax, r10
je 0x140049993
cmp rax, rsi
mov r12, r9
je 0x14004999c
mov al, 1
mov rdx, r8
cmp qword [r8], rcx
jne 0x1400499a1
jmp 0x14004999c
mov qword [rdx], r9
mov rdx, r8
mov r12, r9
mov qword [rdx], r12
mov al, 1
mov qword [r13], r12
mov byte [r13 + 8], al
mov rax, r13
add rsp, 0x78
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_
lea rcx, [0x140124e58]
call sub.MSVCP140.dll_void___cdecl_std::_Xlength_error_char_const____ptr64_
int3