Function at 0x406040
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x438cfd
mov eax, dword fs:[0]
push eax
sub esp, 0x124
mov eax, dword [0x44c538]
xor eax, esp
mov dword [esp + 0x120], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x44c538]
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 0x43c9d7
mov ecx, edi
mov dword [esp + 0x144], ebx
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], ebx
call fcn.00404c90
mov ebp, 1
mov dword [esp + 0x140], ebx
mov dword [esp + 0x2c], ebp
call fcn.00415e0b
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4060cb
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 + 0x784c], ebx
mov dword [esp + 0x140], ebp
jne 0x4061f8
push str.RealtekInstallShield
add esi, 0x148
lea ecx, [esp + 0x28]
push esi
push ecx
call fcn.00403040
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 0x406141
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x406192
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 0x406182
lea edx, [esp + 0x30]
push edx
mov ecx, edi
call fcn.00403880
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4062fb
lea ecx, [esp + 0x14]
push ecx
push str.SoftwareRealtekAudioInstaller
push reloc.OLEAUT32.dll_SysReAllocString
call esi
test eax, eax
jne 0x4062fb
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 0x4061e8
lea eax, [esp + 0x30]
push eax
mov ecx, edi
call fcn.00403880
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4062fb
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 0x40625c
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 0x406252
lea ecx, [esp + 0x30]
push ecx
mov ecx, dword [esp + 0x24]
call fcn.00403880
mov edx, dword [esp + 0x14]
push edx
jmp 0x4062f1
push str.RealtekInstallShield
add esi, 0x148
lea eax, [esp + 0x28]
push esi
push eax
call fcn.00403040
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 0x4062a9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
je 0x4062f7
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 0x4062ec
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x30]
push edx
call fcn.00403880
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x20]
mov eax, dword [edi]
push 0x43c9d7
push eax
call fcn.0042738f
add esp, 8
test eax, eax
sete al
test al, al
je 0x406389
push 0x104
lea ecx, [esp + 0x34]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40637b
lea edx, [esp + 0x30]
push 0x5c
push edx
call fcn.00426f18
mov esi, eax
add esp, 8
test esi, esi
je 0x40634f
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x406344
sub eax, edx
push eax
push esi
lea ecx, [esp + 0x30]
call fcn.00402de0
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 0x406368
sub eax, edx
push eax
lea ecx, [esp + 0x34]
push ecx
jmp 0x406382
push 0x18
push str.C:Program_FilesRealtek
mov ecx, edi
call fcn.00402de0
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 0x4063b1
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.0042652f
add esp, 0x130
ret 4