Results 1 to 5 of 5
  1. #1
    LeYoHelix's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Bielefeld, Germany
    Posts
    1
    Reputation
    10
    Thanks
    0

    Any idea to create a new thread?

    Hello everybody I'm back after a long time without programming and i wouldt try to create a hack ^^
    But CreateThread is patched and detour FindWindow also. I've tried to manual map the DLL, but also xTrap.
    I've tried CreateStealthThread, no xCrap but "Hacktool Detected"
    Some idea to create a new thread without xcrap or "Hacktool Detected"?

    LeYoHelix (previously CFHackerExtreme)

  2. #2
    Biesi's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    4,993
    Reputation
    374
    Thanks
    8,808
    My Mood
    Twisted
    You can either use _beginthreadex or hook a function (which is not creating a thread at all but enough to wait for the game to initialize)

     
    Code:
    void HookDispatchMessageA()
    {
    	DWORD dwAddressOfFunction = (DWORD)&DispatchMessageA;
    	DWORD dwOldProtect = NULL;
    
    	VirtualProtect(reinterpret_cast<void*>(dwAddressOfFunction), 5, PAGE_EXECUTE_READWRITE, &dwOldProtect);
    	dwJumpBack = dwAddressOfFunction + 0x5;
    	uint8_t bShellCode[] = "\xE9\x00\x00\x00\x00";
    	*(DWORD*)(bShellCode + 0x1) = (DWORD)HookedDispatchMessageA - dwAddressOfFunction - 0x5;
    
    	memcpy(reinterpret_cast<void*>(bDispatchMessageABackup), reinterpret_cast<void*>(dwAddressOfFunction), 5);
    	memcpy(reinterpret_cast<void*>(dwAddressOfFunction), reinterpret_cast<void*>(bShellCode), 5);
    	VirtualProtect(reinterpret_cast<void*>(dwAddressOfFunction), 5, dwOldProtect, NULL);
    }
    Code:
    DWORD dwJumpBack = NULL;
    _declspec(naked) void HookedDispatchMessageA()
    {
    	static bool bHookSetup = false;
    
    	_asm
    	{
    		pushad
    		pushfd
    	}
    
    	if (!bHookSetup && GetModuleHandle("CShell.dll") && GetModuleHandle("ClientFx.fxd"))
    	{
    		InitFlipScreenHook();
    		bHookSetup = true;
    	}
    
    	_asm
    	{
    		popfd
    		popad
    		mov edi, edi
    		push ebp
    		mov ebp, esp
    		jmp dwJumpBack
    	}
    }
    Last edited by Biesi; 02-18-2016 at 01:41 PM.

  3. #3
    Nine11's Avatar
    Join Date
    Dec 2015
    Gender
    male
    Posts
    55
    Reputation
    10
    Thanks
    183
    Do what biesi said. You can always use CreateThread, but you will need to exit your thread as soon as you are finished. For example, you can use CreateThread to call something that hooks endscene, a d3d function, then your base or what ever you need will be called from your detour hopefully. The only bad thing about this, is if your code takes alot of power to run, you will bog the thread down, that called your code. When I use endscene, I can go from a straight 60 fps to 40 fps sometimes lol

    Edit: If your wondering why XTrap is detecting your hack minutes into the game, it is because it is scanning the games memory and threads, and doesn't do this until game has loaded. I'm guessing because they do not want your pc to lag even more while the game is loading.
    Last edited by Nine11; 02-18-2016 at 05:54 PM.

  4. #4
    LeYoHelix's Avatar
    Join Date
    Feb 2016
    Gender
    male
    Location
    Bielefeld, Germany
    Posts
    1
    Reputation
    10
    Thanks
    0
    Thank you Biesi & Nine11 I will try it!

  5. #5
    forlastpass's Avatar
    Join Date
    Oct 2014
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    2
    1>------ Build started: Project: 1, Configuration: Release Win32 ------
    1> 1.cpp
    1>1.cpp(26): error C2065: 'dwJumpBack' : undeclared identifier
    1>1.cpp(27): error C2065: 'uint8_t' : undeclared identifier
    1>1.cpp(27): error C2146: syntax error : missing ';' before identifier 'bShellCode'
    1>1.cpp(27): error C2065: 'bShellCode' : undeclared identifier
    1>1.cpp(27): error C2059: syntax error : ']'
    1>1.cpp(28): error C2065: 'bShellCode' : undeclared identifier
    1>1.cpp(28): error C2065: 'HookedDispatchMessageA' : undeclared identifier
    1>1.cpp(30): error C2065: 'bDispatchMessageABackup' : undeclared identifier
    1>1.cpp(31): error C2065: 'bShellCode' : undeclared identifier
    1>1.cpp(45): error C2664: 'HMODULE GetModuleHandleW(LPCWSTR)' : cannot convert argument 1 from 'const char [11]' to 'LPCWSTR'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>1.cpp(45): error C2664: 'HMODULE GetModuleHandleW(LPCWSTR)' : cannot convert argument 1 from 'const char [13]' to 'LPCWSTR'
    1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
    1>1.cpp(47): error C3861: 'InitFlipScreenHook': identifier not found
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Similar Threads

  1. Is this a good idea to create a new account and buy that 20$ statup pack?
    By harsh1412 in forum Realm of the Mad God Discussions
    Replies: 14
    Last Post: 03-16-2014, 01:27 AM
  2. [Help Request] Can I create a new thread with this?
    By restless1092 in forum Suggestions, Requests & General Help
    Replies: 5
    Last Post: 07-25-2012, 08:03 PM
  3. [Help] Creating a new thread closes game?
    By boboben1 in forum Call of Duty Black Ops Coding, Programming & Source Code
    Replies: 0
    Last Post: 03-17-2011, 12:27 AM
  4. new thread idea...
    By ltjustas1 in forum Combat Arms Europe Hacks
    Replies: 4
    Last Post: 08-25-2009, 11:55 AM
  5. a new thread idea!
    By ltjustas1 in forum General
    Replies: 1
    Last Post: 08-09-2009, 12:30 PM