So, as you guys know that aIW has now added some sort of Anti-Cheat, one feature is changing the Window names.
Well, using this stops you from doing stuff to the game....
So using some Win API's you can change the name of the Game Windows.
I used .NET to change the names, while the API's also work in C/CLI/C++
As you see that the MW2 Game Window isn't changed, the reason being that the MW2 Window is a Child Window to the Parent Window(Console Window), I'm working to get that work..
This is my code:
Code:
Imports System.RuntimeInteropServices
Public Class Changer
Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String) As Integer
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim procList() As Process = Process.GetProcessesByName("iw4mp") 'Gets the Process, But only the Parent Window
Dim p As Process
Dim hwnd As Integer
For Each p In procList
hwnd = p.MainWindowHandle 'Gets The Main Handle
Next
SetWindowText(hwnd, "IW4 Console") 'Changes Text
End Sub
End Class
The steam_api.dll also uses these API's Which are in C++
I looked at the dll in IDA Pro and found this
These are Win API's And, also looking at the dll in a decompiler I found this
Code:
public private: static void __gc* modopt(CallConvCdecl __gc*) ResetWindowTitle()
{
HWND__ __gc** hwnd__Ptr = <Module>::FindWindowA(0x6f396c, 0);
if (hwnd__Ptr != 0)
{
<Module>::SetWindowTextA(hwnd__Ptr, 0x7859c0);
}
}
VB.NET Translated Version:
Friend Shared Sub ResetWindowTitle()
Dim hwnd__Ptr As HWND__* = <Module>.FindWindowA(&H6F396C, Nothing)
If (Not hwnd__Ptr Is Nothing) Then
<Module>.SetWindowTextA(hwnd__Ptr, &H7859C0)
End If
End Sub
SetWindowTextA is the same API I use to change the Window Title.
FindWindowA is an API to find a specific Window.
The game starts of with normal names but since it loads the steam_api.dll it changes the Window title. So, when the game starts with normal names then the dll uses FindWindowA to find the game's title the changes it.
-- Simran