♪~ ᕕ(ᐛ)ᕗ (08-11-2010),deoxyribonucleicacid (08-09-2010),jabbathehutt (08-09-2010)
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:
The steam_api.dll also uses these API's Which are in C++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
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
SetWindowTextA is the same API I use to change the Window Title.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
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
♪~ ᕕ(ᐛ)ᕗ (08-11-2010),deoxyribonucleicacid (08-09-2010),jabbathehutt (08-09-2010)
Wow this looks promising. Kinda pissed at this cuz theres gunna b more hackers -.- o well gj
Nice!
Hacking time!!!
Nice job. I'm just going to wait for this code to be put into a nice and neat application...lol.
I was just looking into that today. Thanks a ton
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.
I read all PMs and VMs.
If you add me on MSN, PM me here so I know who you are, or I will not accept.
Free Trainer Template: Want this trainer template with your name on it? PM me. (I ain't using it)
My Stuffs: IWIFix v1.11 | HLoad v1.00b | MW2Hack v1.0 Final | [Tut] Ingame Console/Textbox in DirectX
Current status: Being awesome.. Duh
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
Ex Middleman
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.
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.
Last edited by simranwsingh; 08-10-2010 at 12:26 PM.
lol sry for my misleading assumptions :P yea, then i agree with insane and 0rbit gj anwayz
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.
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.
I read all PMs and VMs.
If you add me on MSN, PM me here so I know who you are, or I will not accept.
Free Trainer Template: Want this trainer template with your name on it? PM me. (I ain't using it)
My Stuffs: IWIFix v1.11 | HLoad v1.00b | MW2Hack v1.0 Final | [Tut] Ingame Console/Textbox in DirectX
Current status: Being awesome.. Duh