Function at 0x10004900
Capabilities:
Get common file path
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
sub esp, 0x28
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push edi
push 0x105
push 0x40
call esi
push 0x105
push 0x40
mov ebx, eax
call esi
push 0x105
push 0x40
mov dword [esp + 0x20], eax
call esi
push 0x105
push 0x40
mov ebp, eax
call esi
push 0x105
push 0x40
mov dword [esp + 0x24], eax
call esi
mov dword [esp + 0x30], eax
mov edi, str.SYSTEMCurrentControlSetEnum_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x3c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
push ebx
push 0x80000002
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x100049c3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
and esi, 0xffff
or esi, 0xe2660000
jmp 0x10004daf
mov dword [esp + 0x3c], 0
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
push 0x105
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
cmp eax, 0xea
je 0x100049f4
test eax, eax
jne 0x10004b92
or ecx, 0xffffffff
mov edi, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x100178dc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x24]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
xor edi, edi
push 0x20019
push edi
push ebp
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
push ecx
mov ecx, dword [esp + 0x28]
lea eax, [esp + 0x30]
push edx
push eax
push edi
push str.Driver
push ecx
mov dword [esp + 0x44], 1
mov dword [esp + 0x40], 0x105
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 0x24]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp esi, edi
mov dword [esp + 0x24], edi
je 0x10004ad4
mov eax, dword [esp + 0x3c]
inc eax
cmp eax, 0xff
mov dword [esp + 0x3c], eax
jb 0x100049cb
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
mov dword [esp + 0x14], edi
call esi
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x20], edi
push ecx
call esi
push ebp
mov dword [esp + 0x1c], edi
call esi
push 0x105
push 0x40
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebx, eax
mov edi, str.SYSTEMCurrentControlSetControlClass_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x30], ebx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x1c]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x10]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
xor edi, edi
push 0x20019
push edi
push ebx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
je 0x10004bab
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0xe2660000
mov dword [esp + 0x3c], eax
jmp 0x10004da7
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0xe2660000
mov dword [esp + 0x3c], eax
jmp 0x10004dab
mov esi, dword [sym.imp.KERNEL32.dll_LocalAlloc]
push 0x20
push 0x40
call esi
lea ecx, [esp + 0x28]
lea edx, [esp + 0x2c]
push ecx
push eax
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
push edx
push edi
push str.InfPath
push eax
mov dword [esp + 0x44], 1
mov dword [esp + 0x40], 0x20
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp eax, edi
mov dword [esp + 0x3c], eax
je 0x10004c08
call dword [sym.imp.KERNEL32.dll_GetLastError]
and eax, 0xffff
or eax, 0xe2660000
mov dword [esp + 0x3c], eax
jmp 0x10004da7
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x14], edi
call ebx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x30], edi
push edx
call ebx
mov eax, dword [esp + 0x14]
push 0x10017d94
push eax
mov dword [esp + 0x24], edi
call fcn.10006b2f
add esp, 8
mov dword [esp + 0x14], eax
push 3
push 0x10017d90
push eax
call fcn.100066c1
add esp, 4
push eax
call fcn.10007150
add esp, 0xc
test eax, eax
jne 0x10004da7
push 0x105
push 0x40
call esi
mov ebx, eax
push 0x105
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
or ecx, 0xffffffff
mov edi, str.INF_
xor eax, eax
push ebx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, ebx
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..INF
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10005650
add esp, 4
push 0x105
push ebx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov edi, str.INF_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
mov edi, dword [esp + 0x18]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str..PNF
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.10005650
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
add esp, 4
push ebx
call esi
mov eax, dword [esp + 0x14]
xor edi, edi
push eax
mov dword [esp + 0x38], edi
call esi
mov dword [esp + 0x14], edi
mov ebx, dword [esp + 0x20]
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x10004dbe
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x24]
test eax, eax
je 0x10004dcd
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test ebx, ebx
je 0x10004ddc
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call edi
jmp 0x10004de2
mov edi, dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x18]
test eax, eax
je 0x10004ded
push eax
call edi
test ebp, ebp
je 0x10004df4
push ebp
call edi
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x10004dff
push eax
call edi
mov eax, dword [esp + 0x30]
test eax, eax
je 0x10004e0a
push eax
call edi
mov eax, dword [esp + 0x14]
test eax, eax
je 0x10004e15
push eax
call edi
mov eax, dword [esp + 0x34]
test eax, eax
je 0x10004e20
push eax
call edi
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret