Function at 0x405a40
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x4384ad
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x44b538]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44b538]
xor eax, esp
push eax
lea eax, [esp + 0x138]
mov dword fs:[0], eax
mov edi, dword [esp + 0x148]
xor ebx, ebx
mov esi, ecx
push 0x43b903
mov ecx, edi
mov dword [esp + 0x144], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], ebx
call fcn.004048f0
mov ebp, 1
mov dword [esp + 0x140], ebx
mov dword [esp + 0x2c], ebp
call fcn.0041557a
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x405acb
push 0x80004005
call fcn.00401090
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x28], eax
cmp dword [esi + 0x2a2c], ebx
mov dword [esp + 0x140], ebp
jne 0x405bf8
push str.RealtekInstallShield
add esi, 0x148
lea ecx, [esp + 0x28]
push esi
push ecx
call fcn.00402cd0
mov eax, dword [eax]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
mov eax, dword [esp + 0x24]
sete bl
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x405b92
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.ProgramFilesDir
push ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405b82
lea edx, [esp + 0x30]
push edx
mov ecx, edi
call fcn.004034e0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405cfb
lea ecx, [esp + 0x14]
push ecx
push str.SoftwareRealtekAudioInstaller
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x405cfb
lea edx, [esp + 0x18]
push edx
mov edx, dword [esp + 0x18]
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push str.ProgramFilesDir
push edx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405be8
lea eax, [esp + 0x30]
push eax
mov ecx, edi
call fcn.004034e0
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x405cfb
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
lea edx, [esp + 0x14]
push edx
push str.SoftwareRealtekAudioInstaller
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
jne 0x405c5c
lea eax, [esp + 0x18]
push eax
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x34]
push ecx
lea edx, [esp + 0x24]
push edx
push 0
push str.ProgramFilesDir
push eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405c52
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.004034e0
mov edx, dword [esp + 0x14]
push edx
jmp 0x405cf1
push str.RealtekInstallShield
add esi, 0x148
lea eax, [esp + 0x28]
push esi
push eax
call fcn.00402cd0
mov eax, dword [eax]
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call edi
test eax, eax
mov eax, dword [esp + 0x24]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405ca9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x405cf7
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x18]
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x24]
push eax
push 0
push str.ProgramFilesDir
push ecx
mov dword [esp + 0x34], ebp
mov dword [esp + 0x30], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405cec
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x30]
push edx
call fcn.004034e0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x20]
mov eax, dword [edi]
push 0x43b903
push eax
call fcn.00426b1a
add esp, 8
test eax, eax
sete al
test al, al
je 0x405d89
push 0x104
lea ecx, [esp + 0x34]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405d7b
lea edx, [esp + 0x30]
push 0x5c
push edx
call fcn.00426708
mov esi, eax
add esp, 8
test esi, esi
je 0x405d4f
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x405d44
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x30]
call fcn.00402a70
lea eax, [esp + 0x30]
sub esi, eax
mov byte [esp + esi + 0x30], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x405d68
sub eax, edx
push eax
lea ecx, [esp + 0x34]
push ecx
jmp 0x405d82
push 0x18
push str.C:Program_FilesRealtek
mov ecx, edi
call fcn.00402a70
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov byte [esp + 0x140], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x405db1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x138]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x120]
xor ecx, esp
call fcn.00425d1a
add esp, 0x130
ret 4