Function at 0x140049870
Capabilities:
Check os version
Set registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov dword [rax + 0x10], edx
mov qword [rax + 8], rcx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x57]
sub rsp, 0x90
mov qword [rbp + 0x17], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov r14, r9
mov r15, r8
mov r13, rcx
mov r10d, dword [0x1401bdd80]
lea r11d, [r10 + 2]
lea eax, [r10 + 1]
imul r11d, eax
imul r11d, r10d
mov eax, 0x2e8ba2e9
imul r11d
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x16
sub r11d, edx
xor ebx, ebx
cmp r11d, 5
jne 0x140049918
lea ecx, [rbx + 0x28]
call fcn.1400cb128
mov rdi, rax
nop dword [rax + rax]
call fcn.1400cc4a0
add eax, dword [0x1401bdd80]
mov dword [rdi + rbx*4], eax
inc rbx
cmp rbx, 0xa
jl 0x1400498f0
mov ecx, dword [rdi + 0x24]
mov dword [0x1401bdd80], ecx
mov rcx, rdi
call fcn.1400cc208
lea rcx, [0x1401b59a8]
mov rax, qword [0x1401b59a8]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x41], rbx
lea rcx, [0x1401b59a8]
mov rax, qword [0x1401b59a8]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rbp - 0x39], rdi
mov r12, qword [rbp + 0x7f]
mov rax, qword [r12]
cmp dword [rax - 0x10], 0
je 0x1400499de
lea r8, [0x1401496d0]
mov rdx, r12
lea rcx, [rbp + 0xf]
call fcn.14001aed0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
cmp rcx, rdi
je 0x1400499c2
cmp dword [rdi + 0x10], 0
jl 0x1400499b4
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x1400499b4
call fcn.1400024f0
mov rbx, rax
lock add dword [rdi + 0x10], 0xffffffff
jg 0x1400499aa
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rbx + 0x18]
mov qword [rbp - 0x39], rax
jmp 0x1400499c2
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x39]
call fcn.1400023a0
nop
mov rdx, qword [rbp + 0xf]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x1400499da
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x41]
call qword [sym.imp.KERNEL32.dll_GetVersion]
movzx ecx, al
shr ax, 8
movzx edx, al
cmp ecx, 6
ja 0x140049a02
jne 0x140049b1d
cmp edx, 1
jbe 0x140049b1d
cmp r14, 0xffffffff80000002
je 0x140049b1d
mov r8b, 1
mov rdx, r15
lea rcx, [rbp - 0x11]
call fcn.140047880
nop
mov r8, rax
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 1]
call fcn.14000feb0
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x140049a82
cmp dword [rbx + 0x10], 0
jl 0x140049a74
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140049a74
call fcn.1400024f0
mov rdi, rax
lock add dword [rbx + 0x10], 0xffffffff
jg 0x140049a6a
mov rcx, qword [rbx]
mov r8, qword [rcx]
mov rdx, rbx
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rdi + 0x18]
mov qword [rbp - 0x41], rax
jmp 0x140049a82
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x41]
call fcn.1400023a0
nop
mov rdx, qword [rbp - 1]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049a9b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x11]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049ab3
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, r14
lea rcx, [rbp - 0x41]
call fcn.1400477b0
mov eax, dword [rbp + 0x67]
mov dword [rbp - 0x29], eax
lea rax, [rbp - 0x19]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rbx, qword [rbp - 0x41]
mov rdx, rbx
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140049b1d
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x29]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, qword [r13]
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp - 0x19]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor r8d, r8d
mov rdx, r15
lea rcx, [rbp + 7]
call fcn.140047880
nop
mov r8, rax
lea rdx, [rbp - 0x39]
lea rcx, [rbp - 9]
call fcn.14000feb0
nop
mov r13, qword [rax]
lea rcx, [r13 - 0x18]
lea rdi, [rbx - 0x18]
cmp rcx, rdi
je 0x140049c89
cmp dword [rdi + 0x10], 0
jl 0x140049b89
mov rax, qword [rdi]
cmp qword [rcx], rax
jne 0x140049b89
call fcn.1400024f0
mov rbx, rax
lock add dword [rdi + 0x10], 0xffffffff
jg 0x140049b7c
mov rcx, qword [rdi]
mov r8, qword [rcx]
mov rdx, rdi
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
lea rax, [rbx + 0x18]
mov qword [rbp - 0x41], rax
jmp 0x140049c89
movsxd r14, dword [r13 - 0x10]
test r14d, r14d
jne 0x140049bec
mov r14, qword [rdi]
cmp dword [rdi + 8], 0
je 0x140049c85
cmp dword [rdi + 0x10], 0
jge 0x140049bc3
cmp dword [rbx - 0xc], 0
jge 0x140049bb6
mov ecx, 0x80070057
call fcn.140001920
int3
xor eax, eax
mov dword [rbx - 0x10], eax
mov word [rbx], ax
jmp 0x140049c85
lock add dword [rdi + 0x10], 0xffffffff
jg 0x140049bd6
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [r14]
mov rcx, r14
call qword [rax + 0x18]
add rax, 0x18
mov qword [rbp - 0x41], rax
jmp 0x140049c85
test r13, r13
jne 0x140049bfc
mov ecx, 0x80070057
call fcn.140001920
int3
mov r12d, dword [rbx - 0x10]
mov r15, r13
sub r15, rbx
sar r15, 1
test r14d, r14d
jns 0x140049c19
mov ecx, 0x80070057
call fcn.140001920
int3
mov ecx, 1
sub ecx, dword [rdi + 0x10]
mov eax, dword [rdi + 0xc]
sub eax, r14d
or eax, ecx
jge 0x140049c3b
mov edx, r14d
lea rcx, [rbp - 0x41]
call fcn.140002490
mov rbx, qword [rbp - 0x41]
lea rdi, [r14 + r14]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
mov r9, rdi
add rdx, rdx
cmp r15, r12
ja 0x140049c5c
lea r8, [rbx + r15*2]
call fcn.1400cc30c
jmp 0x140049c64
mov r8, r13
call fcn.1400cc4cc
cmp r14d, dword [rbx - 0xc]
jg 0x140049c7a
mov dword [rbx - 0x10], r14d
xor eax, eax
mov word [rdi + rbx], ax
mov r12, qword [rbp + 0x7f]
jmp 0x140049c85
mov ecx, 0x80070057
call fcn.140001920
int3
mov r14, qword [rbp + 0x77]
mov rdx, qword [rbp - 9]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049ca2
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp + 7]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049cba
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, r14
lea rcx, [rbp - 0x41]
call fcn.1400477b0
mov eax, dword [rbp + 0x67]
mov dword [rbp - 0x31], eax
lea rax, [rbp - 0x21]
mov qword [rsp + 0x20], rax
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, qword [rbp - 0x41]
mov rcx, r14
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x140049cf3
xor bl, bl
jmp 0x140049d2f
mov dword [rsp + 0x28], 4
lea rax, [rbp - 0x31]
mov qword [rsp + 0x20], rax
mov r9d, 4
xor r8d, r8d
mov rdx, qword [rbp + 0x5f]
mov rdx, qword [rdx]
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ebx, eax
mov rcx, qword [rbp - 0x21]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
sete bl
mov rdx, qword [rbp - 0x39]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049d48
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [rbp - 0x41]
add rdx, 0xffffffffffffffe8
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049d61
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
mov rdx, qword [r12]
sub rdx, 0x18
lock add dword [rdx + 0x10], 0xffffffff
jg 0x140049d7a
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
movzx eax, bl
mov rbx, qword [rsp + 0xe0]
add rsp, 0x90
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret