(18 February, 2024 - 07:01 AM)jeroentwee Wrote:
Show MoreHi, also usef the app while modding it at runtime... Some more technical explanation would be interesting though. Thanks
It took a python script that searches for binary patterns and patches them to crack this program.
You have to approach this program the same as you do an obfuscated program. Don't look at the class and function names but see what the code is doing or which system calls it's making.
For example look at BorderSetterMain::SetStyleInBackground(). It looks like an innocent function that sets the window style, but is a time bomb.
Code:
Code:
private void SetStyleInBackground()
{
Kernel32.CLIENT_SIZE client_SIZE;
Kernel32.GetClientSizeEx(out client_SIZE);
if ((long)(((int)client_SIZE.top << 16) + ((int)client_SIZE.left << 8) + (int)client_SIZE.bottom) > (long)((ulong)this.m_flags))
{
Kernel32.GetWindowStyleEx((uint)((uint)(64 + client_SIZE.borderBottom) << 7));
Kernel32.SetWindowStyleEx(this.m_flags);
}
}
GetClientSizeEx is actually GetSystemTime(), GetWindowStyleEx() is Sleep() and SetWindowStyleEx() is ExitProcess().
So if the system time is more than 01/07/2025, it sleeps for a while and exits the program.
Search for PerformanceProfiler to find many classes with presumably anti-debugging code.
Poembak, GrondplanInfoCalculator and RenderCalculator classes contain file checksum checks for the main assemblies. The md5 checksum is hidden in the file WW.DirectX.dll
Bluebits.GdiHelpers32.dll and Bluebits.GdiHelpers64.dll are natively compiled libraries that contains a file checksum check and time bomb for 01/01/2026. The md5 checksum is hidden in logo.png
Class App contains a time bomb for 01/01/2025. Class BorderSetterMain and BorderSetterPopUp contain a time bomb for 01/07/2025.
There are some more patches I can't think of right now. You can compare Bluebits.Trikker.exe and Bluebits.GdiHelpers64.dll to the original to see all the patches I applied.