Change Window Names

Posts 1–15 of 21 · Page 1 of 2
Change Window Names
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
Wow this looks promising. Kinda pissed at this cuz theres gunna b more hackers -.- o well gj
Quote Originally Posted by Stoshy View Post
Wow this looks promising. Kinda pissed at this cuz theres gunna b more hackers -.- o well gj
Well, I really didn't make this for hackers, but for the coders here to just to test apps. I don't use hacks but I just code.. I needed this to use my apps. So I thought maybe it can be useful here for the coders...
Nice!
Hacking time!!!
Nice job. I'm just going to wait for this code to be put into a nice and neat application...lol.
That's cool but it would be much easier (and cleaner) to just get the handle of iw4mp.dat, rather than get iw4mp -> change title -> search title -> get handle.
Quote Originally Posted by Stoshy View Post


if he was an expert, im shure he wudve done it. he didnt rly make it, he jus found it and he is sharing it with us
No, I wrote it myself and now I'm trying to get the game window name changed, the only problem is that I can't no longer use this Win API to stop it. I must do some HEX editing and use ASM in the steam_api.dll to stop the function from passing through, Then I can use the API again.


Quote Originally Posted by 0rbit View Post
That's cool but it would be much easier (and cleaner) to just get the handle of iw4mp.dat, rather than get iw4mp -> change title -> search title -> get handle.
What do you mean? It gets the MainHandle of the process and then Just changing the Title it doesn't search for the title again, and also doesn't get the handle again. It only 2 steps instead of 4 that you stated. And if you mean just to the handle once from iw4mp and then just change, the processID changes every time the process opens.
Yep,
0rbit is right. No need to make this so difficult. But anyway, thanks.
I agree with the application thing, I'd just put this with a simple GUI for the noobs who don't feel like doing it themself
Quote Originally Posted by Insane View Post
I agree with the application thing, I'd just put this with a simple GUI for the noobs who don't feel like doing it themself
if he was an expert, im shure he wudve done it. he didnt rly make it, he jus found it and he is sharing it with us
Quote Originally Posted by Stoshy View Post


if he was an expert, im shure he wudve done it. he didnt rly make it, he jus found it and he is sharing it with us
That's a bit unfair. He put this in the Coding section, not a preview or releases section. All he is obliged to do is share the source code. For anyone that wants to do it, he has provided all the necessary information to do so. Whether he codes it as a full GUI app or not does not make him an "expert" or otherwise.

Quote Originally Posted by simranwsingh View Post
What do you mean? It gets the MainHandle of the process and then Just changing the Title it doesn't search for the title again, and also doesn't get the handle again. It only 2 steps instead of 4 that you stated. And if you mean just to the handle once from iw4mp and then just change, the processID changes every time the process opens.
Yeah I was a bit...out of it when I wrote that
Either way it would be still better to just get the iw4mp.dat handle.
lol sry for my misleading assumptions :P yea, then i agree with insane and 0rbit gj anwayz
Posts 1–15 of 21 · Page 1 of 2
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us