Function at 0x4045d0
Capabilities:
Enumerate files on windows
Get common file path
Query environment variable
Query or enumerate registry value
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x427b6b
mov eax, dword fs:[0]
push eax
sub esp, 0x1b0
mov eax, dword [0x433a70]
xor eax, esp
mov dword [esp + 0x1a8], eax
push ebx
push esi
push edi
mov eax, dword [0x433a70]
xor eax, esp
push eax
lea eax, [esp + 0x1c0]
mov dword fs:[0], eax
mov dword [esp + 0x3c], ecx
mov esi, dword [ebp + 8]
push str.CScrubber::RenameInfFilesForDevice
lea ecx, [esp + 0x18]
mov dword [esp + 0x3c], esi
call fcn.00401130
xor eax, eax
push 0x104
mov dword [esp + 0x1cc], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x2c], eax
call fcn.00409b95
push 0x104
mov dword [esp + 0x24], eax
call fcn.00409b95
mov ebx, eax
push 0x104
mov dword [esp + 0x38], ebx
call fcn.00409b95
push 0x104
mov dword [esp + 0x44], eax
call fcn.00409b95
mov edi, eax
add esp, 0x10
mov dword [esp + 0x24], edi
call fcn.004096a0
cmp eax, 8
je 0x404b71
test esi, esi
je 0x404b37
test ebx, ebx
je 0x404b37
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4046a0
sub eax, edx
cmp eax, 4
jb 0x404b37
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 0
push 0
call esi
push eax
mov dword [esp + 0x34], eax
call fcn.00409b95
add esp, 4
test eax, eax
mov dword [esp + 0x40], eax
je 0x404b71
push eax
mov eax, dword [esp + 0x34]
push eax
call esi
test eax, eax
je 0x404b5d
lea ecx, [esp + 0x28]
push ecx
push 1
push 0
push str.SoftwareMicrosoftWindowsCurrentVersion
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x404820
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4047b4
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 0x30]
push edx
push 0
push 0
push 0
push str.DevicePath
push eax
call edi
test eax, eax
jne 0x4047b0
mov eax, dword [esp + 0x30]
push eax
call fcn.00409b95
mov esi, eax
add esp, 4
test esi, esi
je 0x404b59
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x30]
push ecx
push esi
push 0
push 0
push str.DevicePath
push edx
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0
push 0
push esi
call ebx
mov edi, eax
lea eax, [edi + 1]
push eax
call fcn.00409b95
add esp, 4
test eax, eax
mov dword [esp + 0x20], eax
je 0x404b55
push edi
mov ecx, eax
push ecx
push esi
call ebx
push esi
call fcn.00409b90
lea edx, [esp + 0x18]
push str.Read_DevicePath_from_registry
push edx
call fcn.00401460
mov ebx, dword [esp + 0x38]
mov edi, dword [esp + 0x30]
add esp, 0xc
jmp 0x40480d
mov edi, dword [esp + 0x24]
push 0x104
call fcn.00409b95
add esp, 4
test eax, eax
mov dword [esp + 0x20], eax
je 0x404b5d
push 0x104
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov eax, esi
add eax, 0xffffffff
mov cl, byte [eax + 1]
add eax, 1
test cl, cl
jne 0x4047e0
mov ecx, dword [str.inf]
mov dword [eax], ecx
mov dl, byte [0x429f14]
mov byte [eax + 4], dl
lea eax, [esp + 0x14]
push str.Used__windir_inf_for_DevicePath
push eax
call fcn.00401460
add esp, 8
mov ecx, dword [esp + 0x28]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [esp + 0x28], 0
mov esi, dword [esp + 0x20]
push esi
lea edx, [esp + 0x18]
push str.DevicePath:__s
push edx
call fcn.00401460
mov eax, dword [esp + 0x44]
push eax
lea ecx, [esp + 0x24]
push str.Searching_for_infs_that_match_on:__s
push ecx
call fcn.00401460
add esp, 0x18
test esi, esi
je 0x404b5d
push 0x429eb0
push esi
call fcn.00412936
mov edx, dword [esp + 0x24]
add esp, 8
test eax, eax
mov dword [esp + 0x2c], eax
je 0x404891
push 0x104
push 0
push edx
call fcn.004132a0
mov eax, dword [esp + 0x38]
sub eax, esi
push eax
push esi
mov esi, dword [esp + 0x30]
push esi
call fcn.004148f0
add esp, 0x18
jmp 0x4048a5
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x404895
mov esi, dword [esp + 0x1c]
push esi
lea ecx, [esp + 0x18]
push str.Directory:__s
push ecx
call fcn.00401460
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x404b24
lea edx, [esp + 0x74]
push edx
push str.oem.inf
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0x24], eax
je 0x404b24
mov eax, esi
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x4048f0
sub eax, edx
cmp byte [esi + eax - 1], 0x5c
jne 0x404912
lea eax, [esp + 0xa0]
push eax
push esi
push str._s_s
jmp 0x404920
lea ecx, [esp + 0xa0]
push ecx
push esi
push 0x429e84
push 0x104
push ebx
call fcn.004131ec
add esp, 0x14
push ebx
lea edx, [esp + 0x18]
push str.Checking_file:__s
push edx
mov byte [ebx + 0x104], 0
call fcn.00401460
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
add esp, 0xc
push eax
push ebx
call fcn.004035a0
test eax, eax
je 0x404b01
lea ecx, [esp + 0xa0]
push ecx
lea edx, [esp + 0x18]
push str.Renaming_INF_file:__s
push edx
call fcn.00401460
mov esi, dword [esp + 0x40]
add esp, 0xc
mov eax, ebx
sub esi, ebx
mov cl, byte [eax]
mov byte [esi + eax], cl
add eax, 1
test cl, cl
jne 0x404981
mov edx, edi
mov eax, ebx
sub edx, ebx
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x404993
push str..inf
push edi
call fcn.00412936
add esp, 8
test eax, eax
je 0x4049c2
mov ecx, dword [str..hpp]
mov dword [eax], ecx
mov dl, byte [0x429e4c]
mov byte [eax + 4], dl
push edi
lea eax, [esp + 0x18]
push str.New_INF_Name___s_n
push eax
call fcn.00401460
mov ecx, dword [esp + 0x40]
push edi
push ecx
call fcn.004148ba
add esp, 0x14
test eax, eax
jne 0x4049f8
lea edx, [esp + 0x14]
push str.INF_file_successfully_renamed
push edx
call fcn.00401460
add esp, 8
jmp 0x404a12
call fcn.00414876
mov eax, dword [eax]
push eax
lea ecx, [esp + 0x18]
push str.INF_file_rename_failed_with_error___d_n
push ecx
call fcn.00401460
add esp, 0xc
mov eax, ebx
mov cl, byte [eax]
mov byte [esi + eax], cl
add eax, 1
test cl, cl
jne 0x404a14
mov esi, dword [esp + 0x34]
push str..inf
push esi
call fcn.00412936
add esp, 8
test eax, eax
je 0x404a47
mov edx, dword [str..pnf]
mov dword [eax], edx
mov cl, byte [0x429de8]
mov byte [eax + 4], cl
mov edx, edi
mov eax, esi
sub edx, esi
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
add eax, 1
test cl, cl
jne 0x404a50
push str..pnf
push edi
call fcn.00412936
add esp, 8
test eax, eax
je 0x404a7f
mov edx, dword [str..hpf]
mov dword [eax], edx
mov cl, byte [0x429de0]
mov byte [eax + 4], cl
push esi
lea edx, [esp + 0x18]
push str.Searching_for_pnf_file_to_rename:__s
push edx
call fcn.00401460
lea eax, [esp + 0x50]
push eax
push esi
call fcn.00413ee3
add esp, 0x14
test eax, eax
jne 0x404afd
push esi
lea ecx, [esp + 0x18]
push str.Renaming_PNF_file:__s
push ecx
call fcn.00401460
push edi
lea edx, [esp + 0x24]
push str.New_PNF_file:__s
push edx
call fcn.00401460
push edi
push esi
call fcn.004148ba
add esp, 0x20
test eax, eax
jne 0x404ae3
lea eax, [esp + 0x14]
push str.PNF_file_successfully_renamed
push eax
call fcn.00401460
add esp, 8
jmp 0x404afd
call fcn.00414876
mov ecx, dword [eax]
push ecx
lea edx, [esp + 0x18]
push str.PNF_file_rename_failed_with_error___d_n
push edx
call fcn.00401460
add esp, 0xc
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
lea eax, [esp + 0x74]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x4048e4
mov edx, dword [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, dword [esp + 0x2c]
test esi, esi
je 0x404b5d
add esi, 1
jne 0x404853
jmp 0x404b5d
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c8], 0xffffffff
call fcn.004012e0
mov eax, 0x57
jmp 0x404be3
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
mov esi, dword [esp + 0x40]
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push esi
call fcn.00409b90
add esp, 4
test ebx, ebx
je 0x404b7e
push ebx
call fcn.00409b90
add esp, 4
mov eax, dword [esp + 0x20]
test eax, eax
je 0x404b8f
push eax
call fcn.00409b90
add esp, 4
mov eax, dword [esp + 0x28]
test eax, eax
je 0x404b9e
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x404baf
push eax
call fcn.00409b90
add esp, 4
mov eax, dword [esp + 0x34]
test eax, eax
je 0x404bc0
push eax
call fcn.00409b90
add esp, 4
test edi, edi
je 0x404bcd
push edi
call fcn.00409b90
add esp, 4
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c8], 0xffffffff
call fcn.004012e0
xor eax, eax
mov ecx, dword [esp + 0x1c0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1a8]
xor ecx, esp
call fcn.00413011
mov esp, ebp
pop ebp
ret 4