Function at 0x140027140
Capabilities:
Set registry value

Disassembly:
mov r11, rsp
push rbp
push r15
lea rbp, [r11 - 0x5f]
sub rsp, 0x98
movaps xmmword [r11 - 0x28], xmm6
mov r15, rdx
test ecx, ecx
je 0x14002718b
sub ecx, 1
je 0x140027182
cmp ecx, 1
je 0x140027179
xor eax, eax
movaps xmm6, xmmword [r11 - 0x28]
add rsp, 0x98
pop r15
pop rbp
ret
movups xmm6, xmmword [0x14023e4c0]
jmp 0x140027192
movups xmm6, xmmword [0x14023e450]
jmp 0x140027192
movups xmm6, xmmword [0x14023e520]
mov rax, qword [rdx]
cmp rax, qword [0x14023e410]
jne 0x1400271af
mov rax, qword [rdx + 8]
cmp rax, qword [0x14023e418]
jne 0x1400271af
movdqa xmmword [rdx], xmm6
mov qword [rsp + 0xb0], rbx
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0x90], r14
call fcn.140002c10
test rax, rax
je 0x1400273d3
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetElement]
xor r14d, r14d
movdqa xmmword [rbp + 0x17], xmm6
lea rdx, [rbp - 9]
mov qword [rbp - 9], r14
lea rcx, [rbp + 0x17]
lea rbx, [rax + 0x18]
mov qword [rbp - 0x19], rbx
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
mov rdx, qword [rbp - 9]
lea rsi, [r14 - 1]
test rdx, rdx
je 0x14002738d
mov rax, rsi
inc rax
cmp word [rdx + rax*2], r14w
jne 0x140027214
mov r8d, eax
lea rcx, [rbp - 0x19]
call fcn.140004720
lea rcx, [rbp - 9]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
mov rbx, qword [rbp - 0x19]
cmp dword [rbx - 0x10], r14d
je 0x14002738d
call fcn.140002c10
test rax, rax
je 0x1400273d3
mov rdx, qword [rax]
mov rcx, rax
mov qword [rsp + 0xc8], rdi
call qword [rdx + reloc.OLEAUT32.dll_SafeArrayGetElement]
movaps xmm0, xmmword [r15]
lea rdx, [rbp - 1]
lea rcx, [rbp + 0x27]
movdqa xmmword [rbp + 0x27], xmm0
mov qword [rbp - 1], r14
lea rdi, [rax + 0x18]
mov qword [rbp - 0x11], rdi
call qword [sym.imp.RPCRT4.dll_UuidToStringW]
mov rdx, qword [rbp - 1]
test rdx, rdx
je 0x140027368
mov rax, rsi
inc rax
cmp word [rdx + rax*2], r14w
jne 0x140027294
mov r8d, eax
lea rcx, [rbp - 0x11]
call fcn.140004720
lea rcx, [rbp - 1]
call qword [sym.imp.RPCRT4.dll_RpcStringFreeW]
mov rdi, qword [rbp - 0x11]
mov r15d, dword [rdi - 0x10]
test r15d, r15d
je 0x140027368
add r15d, r15d
cmp dword [rdi - 8], 1
jle 0x1400272de
mov edx, dword [rdi - 0x10]
lea rcx, [rbp - 0x11]
call fcn.140002f00
mov rdi, qword [rbp - 0x11]
cmp dword [rbx - 8], 1
jle 0x1400272f4
mov edx, dword [rbx - 0x10]
lea rcx, [rbp - 0x19]
call fcn.140002f00
mov rbx, qword [rbp - 0x19]
mov qword [rbp + 7], r14
test rbx, rbx
je 0x140027368
test rdi, rdi
je 0x140027368
test r15d, r15d
je 0x140027368
lea rax, [rbp + 7]
mov r9d, 0x20006
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SOFTWAREMicrosoftWindowsCurrentVersionAppletsSysTrayBattMeterFlyout
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140027368
mov rcx, qword [rbp + 7]
test rcx, rcx
je 0x140027368
mov dword [rsp + 0x28], r15d
lea r9d, [rax + 2]
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov rdx, rbx
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 7]
mov ebx, eax
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
jne 0x140027368
lea r14d, [rbx + 1]
lea rdx, [rdi - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
mov rdi, qword [rsp + 0xc8]
sub eax, 1
jg 0x140027389
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rbx, qword [rbp - 0x19]
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x1400273a5
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov rsi, qword [rsp + 0xc0]
mov eax, r14d
mov r14, qword [rsp + 0x90]
mov rbx, qword [rsp + 0xb0]
movaps xmm6, xmmword [rsp + 0x80]
add rsp, 0x98
pop r15
pop rbp
ret
mov ecx, 0x80004005
call fcn.140002ad0
int3