Function at 0x140004f20
Capabilities:
Set registry value

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0xe0
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x108], rbx
mov rax, qword [0x140076bc8]
xor rax, rsp
mov qword [rsp + 0xd0], rax
mov esi, r8d
mov ebx, edx
mov rbp, rcx
call fcn.140021e08
mov rcx, rax
xor eax, eax
test rcx, rcx
setne al
test eax, eax
jne 0x140004f75
mov ecx, 0x80004005
call fcn.140001000
int3
mov rax, qword [rcx]
call qword [rax + 0x18]
lea rdi, [rax + 0x18]
mov qword [rsp + 0x30], rdi
sub ebx, 1
je 0x140004fda
sub ebx, 1
je 0x140004fc4
sub ebx, 1
je 0x140004fae
cmp ebx, 1
jne 0x140004fee
mov r8d, esi
lea rdx, str.DriverPackageGetPath_Error_code_0x_08X
lea rcx, [rsp + 0x50]
call fcn.14003d850
jmp 0x140004fee
mov r8d, esi
lea rdx, str.DriverPackageUninstall_Error_code_0x_08X
lea rcx, [rsp + 0x50]
call fcn.14003d850
jmp 0x140004fee
mov r8d, esi
lea rdx, str.DriverPackagePrenstall_Error_code_0x_08X
lea rcx, [rsp + 0x50]
call fcn.14003d850
jmp 0x140004fee
mov r8d, esi
lea rdx, str.DriverPackageInstall_Error_code_0x_08X
lea rcx, [rsp + 0x50]
call fcn.14003d850
cmp dword [rbp + 0xeed4], 0
jne 0x1400050ed
lea rdx, [rbp + 0x290]
lea r8, str.RealtekInstallShield
lea rcx, [rsp + 0x40]
call fcn.1400033b0
nop
mov rdx, qword [rax]
lea rsi, [rdx - 0x18]
add rdi, 0xffffffffffffffe8
or rbx, 0xffffffffffffffff
cmp rsi, rdi
je 0x1400050cb
cmp dword [rdi + 0x10], 0
jl 0x1400050bc
mov rcx, qword [rsi]
cmp rcx, qword [rdi]
jne 0x1400050bc
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rsi + 0x10], 0
jl 0x14000505c
cmp rax, qword [rsi]
jne 0x14000505c
mov rbp, rsi
lock add dword [rsi + 0x10], 1
jmp 0x140005097
mov rax, qword [rax]
mov r8d, 1
mov edx, dword [rsi + 8]
call qword [rax]
mov rbp, rax
test rax, rax
jne 0x140005078
call fcn.140002210
int3
mov eax, dword [rsi + 8]
mov dword [rbp + 8], eax
mov eax, dword [rsi + 8]
add eax, 1
movsxd rdx, eax
lea r8, [rsi + 0x18]
lea rcx, [rbp + 0x18]
mov r9, rdx
call fcn.14003cf60
mov eax, ebx
lock xadd dword [rdi + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x1400050b1
mov rcx, qword [rdi]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
lea rax, [rbp + 0x18]
mov qword [rsp + 0x30], rax
jmp 0x1400050cb
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 0x140005117
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
jmp 0x140005117
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 0x14000516c
mov dword [rsp + 0x28], 0x80
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, 1
xor r8d, r8d
lea rdx, str.DIFxAPIErrorCode
mov rcx, qword [rsp + 0x38]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
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 0x140005185
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.oledlg.dll_OleUIBusyA]
mov rcx, qword [rsp + 0xd0]
xor rcx, rsp
call fcn.14003bc70
mov rbx, qword [rsp + 0x108]
add rsp, 0xe0
pop rdi
pop rsi
pop rbp
ret