Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

WinPeShl.exe,WpeInit.exe,WpeUtil.Dll

Featured Replies

I found this source code when i was surfing in a chineese forum. Maybe it can be usefull for add/change something. To make a loader. We can run more services and load much drivers with custom WinPeShl.exe. I do not have coding knowledge. Ideas wellcome.

WinPeShl.exe,WpeInit.exe,WpeUtil.Dll:


------------------------------------------------------------------------------------------------------------
WinPeShl.exe:
wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
{

if ( QueryRegValue(HKEY_LOCAL_MACHINE, L"SOFTWARE\\microsoft\\windows nt\\currentversion\\WinPE", L"ShellLogPath") )

CreateLogFile( );
else
CreateLogFile(L"winpeshl.log");

Message("Windows PE Shell beginning execution");
SetCursors();
InitSys();
LoadExec(L"%SystemRoot%\\system32\\winpeshl.ini")

}
InitSys()
{

LoadLocalFonts();

QueryRegValue(HKEY_LOCAL_MACHINE, L"Software\\Microsoft\\Windows NT\\CurrentVersion\\WinPE", L"CustomBackground") )

SystemParametersInfoW();
WpeInstallServicePrivileges();

WpeInstallServicesSecurityTemplate();

hObject = CreateEventW((LPSECURITY_ATTRIBUTES)v9, 1, v9, L"Global\\EVENT_WINPE_REMSTOR");
hHandle = CreateThread((LPSECURITY_ATTRIBUTES)v9, v9, StartAddress, (LPVOID)v9, v9, &ThreadId);
result = (void *)QueryRegValue01(
HKEY_LOCAL_MACHINE,
L"SYSTEM\\CurrentControlSet\\Control\\WMI\\Autologger\\WinPEFileTrace",
L"Start");
if ( result )
{
v30 = v9;
sub_1006847(67108864, L"Profiling is enabled; initializing run-time profiler.", ST18_4_0);
result = CreateThread((LPSECURITY_ATTRIBUTES)v9, v9, SerializeAppProfile, (LPVOID)v9, v9, &v30);
dword_100B040 = (int)result;
}

}
-----------------------------------------------------------------------------------------------------------------------
WpeInit.exe:
int wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd)
{

if ( lpCmdLine )
UnattendFindFileFromCmdLine();
else
{
wttime = GetTickCount();
WpeWaitForRemovableStorage();
Waitime = GetTickCount() - wttime;
hLogFile = XLOG(L"wpeinit.log");
if (UnattendFindAnswerFile()){
//Checkit;
}

else
WriteLog(hLogFile,"No unattend file was found; WPEINIT is using default settings to initialize WinPE" );

if ( Waitime )
WriteLog(hLogFile, "Spent Waitime%ums initializing removable media before unattend search" );
}
result = WpeActuateUnattendSettings();
//CleanUp
return result;
}
-----------------------------------------------------------------------------------------------------------------------
WpeUtil.Dll:
WpeActuateUnattendSettings()
{
UnattendDisplay();

UnattendCompterName();

UnattendPageFile();

UnattendOC();

UnattendNet();

UnattendFireWall();

UnattendRunSynchronous();

UnattendRunASyncs();

UnattendRestart();
}

UnattendNet()
{
if(NetNotEnable == WpeQueryNetworkStatus()

MyInitNetWork();
}
MyInitNetWork()
{


WpeInitializeNetworkComponents();

WpeInitializeNetworkDrivers();

}

WpeInitializeNetworkComponents()
{
Install MS_MSCLIENT
Install MS_NETBIOS
Install MS_SMB
Install MS_TCPIP6
Install MS_TCPIP
StartService dhcp
StartService lmhosts
StartService ikeext
StartService mpssvc
//lanmanStation...
}
WpeInitializeNetworkDrivers()
{
WpeInitializeDriversOfClass();
}
WpeInitializeDriversOfClass(int a1, int a2)
{
//EnumDevice then DiInstallDevice();
}

Edited by Kullenen_Ask


They have disassembled the files in IDA. Then loaded the pdb files with debugging information (symbols). And finally exported c-like code with the hex-rays plugin.

Joakim

Hello Vvurat & Joakim ;)

Vvurat, can you give your chineses source ?

This wpeinit can also to be use in the goal to use original shutdown button startmenu (pecmd can...) ?

  • Author


http://bbs.wuyou.com/redirect.php?fid=39&tid=116948&goto=nextoldset

Probably it works like tracking if the user clicked on shutdown button or not. It works same way with the ReBootTrace.exe,ReBoot.dll dll that i shared in my topic. If you read pecmd manual you can see that. There is source code of ReBootTrace.exe,ReBoot.dll in my topic if not deleted. If you want to use shutdown button, autologin as administrator rights user. You will have that functionality without using a third-party software.

Edited by Kullenen_Ask

Thanks Vvurat

But where is the download link in this post, for test ...

Or Joakim, can you assemble this source code ?

Edited by ludo

  • Author

there is no download link. it is for to show how it works. maybe it is not full, i do not know c++

  • Author

can you compile us a loader from theese source codes? with our desires? the main problem is absence of a good loader. i could not like any off the loaders around.

Edited by Kullenen_Ask

What's wrong with the original winpeshl.exe?

Don't expect me to write a loader as I have no idea.. Sources for most bootfiles pm'ed.

Joakim

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.