Function at 0x140004990
Capabilities:
Set registry value

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
sub rsp, 0x170
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x140076bc8]
xor rax, rsp
mov qword [rsp + 0x160], rax
mov rsi, rcx
xor r13d, r13d
call fcn.140021e08
mov rcx, rax
mov eax, r13d
test rcx, rcx
setne al
test eax, eax
jne 0x1400049ec
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x30], rdi
mov eax, dword [rsi + 0x2a8]
test eax, eax
je 0x140004a0e
cmp dword [rsi + 0x2ac], 0
jne 0x140004a1a
test eax, eax
jne 0x140004a3e
cmp dword [rsi + 0x2ac], eax
jne 0x140004a3e
lea rdx, [rdi - 0x18]
or rbx, 0xffffffffffffffff
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140004a37
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
xor eax, eax
jmp 0x140004c3f
cmp dword [rsi + 0xeed4], 0
jne 0x140004b47
lea rdx, [rsi + 0x290]
lea r8, str.RealtekInstallShield
lea rcx, [rsp + 0x40]
call fcn.1400033b0
nop
mov rdx, qword [rax]
lea rbp, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
or rbx, 0xffffffffffffffff
cmp rbp, rdi
je 0x140004b25
cmp dword [rdi + 0x10], 0
jl 0x140004b16
mov rcx, qword [rbp]
cmp rcx, qword [rdi]
jne 0x140004b16
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rbp + 0x10], 0
jl 0x140004ab2
cmp rax, qword [rbp]
jne 0x140004ab2
mov r12, rbp
lock add dword [rbp + 0x10], 1
jmp 0x140004af0
mov rax, qword [rax]
mov r8d, 1
mov edx, dword [rbp + 8]
call qword [rax]
mov r12, rax
test rax, rax
jne 0x140004ace
call fcn.140002210
int3
mov eax, dword [rbp + 8]
mov dword [r12 + 8], eax
mov eax, dword [rbp + 8]
add eax, 1
movsxd rdx, eax
lea r8, [rbp + 0x18]
lea rcx, [r12 + 0x18]
mov r9, rdx
call fcn.14003cf60
mov eax, ebx
lock xadd dword [rdi + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140004b0a
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
lea rax, [r12 + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x140004b25
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x30]
call fcn.140003070
nop
mov rdx, qword [rsp + 0x40]
add rdx, 0xffffffffffffffe8
mov eax, ebx
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140004b71
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
jmp 0x140004b71
xor eax, eax
or rbx, 0xffffffffffffffff
mov rcx, rbx
lea rdi, str.SoftwareWow6432NodeRealtekAudioInstaller
repne scasb al, byte [rdi]
not rcx
lea r8d, [rcx - 1]
lea rdx, str.SoftwareWow6432NodeRealtekAudioInstaller
lea rcx, [rsp + 0x30]
call fcn.140003070
lea r8, [rsp + 0x38]
mov rdi, qword [rsp + 0x30]
mov rdx, rdi
mov ecx, 0x80000002
call qword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x140004c23
cmp dword [rsi + 0x2a8], eax
je 0x140004bb9
lea r8, str.F132AF7F_7BCA_4EDE_8A7C_958108FE7DBC
lea rdx, [0x140058920]
lea rcx, [rsp + 0x50]
call fcn.14003d850
mov r11d, 0x27
jmp 0x140004be7
cmp dword [rsi + 0x2ac], 0
je 0x140004be2
lea r8, str.5449FB4F_1802_4D5B_A6D8_087DB1142147
lea rdx, [0x140058920]
lea rcx, [rsp + 0x50]
call fcn.14003d850
mov r11d, 0x27
jmp 0x140004be7
mov r11d, dword [rsp + 0x30]
mov dword [rsp + 0x28], r11d
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.RtkCurUninstallPackage
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
sete r13b
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
lea rdx, [rdi - 0x18]
lock xadd dword [rdx + 0x10], ebx
add ebx, 0xffffffff
test ebx, ebx
jg 0x140004c3c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
mov eax, r13d
mov rcx, qword [rsp + 0x160]
xor rcx, rsp
call fcn.14003bc70
lea r11, [rsp + 0x170]
mov rbx, qword [r11 + 0x28]
mov rbp, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r13
pop r12
pop rdi
ret