Results 1 to 12 of 12
  1. #1
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed

    Fullbright with inline ASM

    Hello guys

    I have a problem... since a few days i play with ASM and i try to make a simple Fullbright cheat with inline ASM. (with dll injection)

    But mw3 crash everytime when i inject the .dll.

    My Code:

    Code:
    #include "stdafx.h"
    #include <Windows.h>
    
    
    void Fullbright(){
    	DWORD dwFullbright = 0x06098CEC; 
    
    	__asm{
    		PUSH 0
    			CALL [dwFullbright]
    		MOV ESP, 9
    
    	}
    
    }
    DWORD WINAPI Init(LPVOID unused)
    {
       
        Fullbright();
    
    }
    
    BOOL WINAPI DllMain(HINSTANCE mod, DWORD DWORD_INITALIZE, LPVOID res)
    {
        switch(DWORD_INITALIZE)
        {
        case DLL_PROCESS_ATTACH:  
            CreateThread(0, 0, &Init , 0, 0, 0); 
    
    		 MessageBoxA(0, "Fullbright enabled", "Gangnamstyle is shit",0); 
    
            break;
         
         case DLL_PROCESS_DETACH:
     
                                 MessageBoxA(0, "Fullbright disabled", "Gangnamstyle is very shit",0); 
    
            break;
        }
        return TRUE;
    }

    It would be nice if someone can tell me what i do wrong .


    Thanks.

    cheers =))
    Last edited by inmate; 10-27-2012 at 02:24 PM.

  2. #2
    Kenshin13's Avatar
    Join Date
    May 2011
    Gender
    male
    Location
    Cloud 9
    Posts
    3,473
    Reputation
    564
    Thanks
    5,881
    My Mood
    Psychedelic
    Is that how you create a thread? I think that may be incorrect...
    CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Init, 0, 0, 0);

    And try testing it without the breaks.

  3. #3
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,310
    My Mood
    Angelic
    The create thread isn't the problem... I think :P

    I'm not really good with asm, but I think "MOV dwFullBright, 4" should work.

    Code:
    void Fullbright(){
    	DWORD dwFullbright = 0x06098CEC; 
    
            __asm MOV dwFullbright, 4
    
    }
    Last edited by MarkHC; 10-27-2012 at 03:28 PM.


    CoD Minion from 09/19/2012 to 01/10/2013

  4. #4
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed
    Thanks for the answers

    with:

    Code:
    DWORD dwFullbright = 0x06098CEC; 
    
    	__asm{
    			
    		MOV dwFullbright, 9
    
    	}
    mw3 don´t crash, but the fullbright doesn´t work :/.

    I dont know why...

    cheers

  5. #5
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,310
    My Mood
    Angelic
    Quote Originally Posted by inmate View Post
    Thanks for the answers

    with:

    Code:
    DWORD dwFullbright = 0x06098CEC; 
    
    	__asm{
    			
    		MOV dwFullbright, 9
    
    	}
    mw3 don´t crash, but the fullbright doesn´t work :/.

    I dont know why...

    cheers
    9 is the default value... Write 4 for FullBright


    CoD Minion from 09/19/2012 to 01/10/2013

  6. #6
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed
    Ohh i fail

    Yeah thats right, but even when i write 4 it doesn´t work :O.

    cheers

  7. #7
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,310
    My Mood
    Angelic
    Got it to work(on 4D1) with:

    Code:
    void Loop(){
    	DWORD Fb = 0x5F9690C;
    	while(true){
    		__asm MOV EAX, Fb
    		__asm MOV DWORD PTR[EAX], 4
    		Sleep(1000);
    	}
    }
    Just change the offset :P


    CoD Minion from 09/19/2012 to 01/10/2013

  8. The Following User Says Thank You to MarkHC For This Useful Post:

    inmate (10-27-2012)

  9. #8
    Eidolon's Avatar
    Join Date
    Sep 2011
    Gender
    male
    Location
    Vanished
    Posts
    822
    Reputation
    54
    Thanks
    4,034
    My Mood
    Angelic
    Pushes / calls you only use when you are using a FUNCTION
    For an address simply use MOV as the guy up here said...
    Although this doesn't help simplifying your code a thing since it will probably be compiled as a tbyte
    Code:
    B8 09 00 00 00; MOV EAX, 9
    A3 EC 8C 09 06; MOV DWORD PTR DS[06098CEC], EAX
    So nothing different.

    Though nice that somebody finally takes up real coding challenges instead of making trainers all time with jorndel's class
    Last edited by Eidolon; 10-27-2012 at 04:10 PM.




    Yet, you are a pathetic human.

    Contributor since: 7.26.2012 - ended
    Donator since: 7.14.2012


  10. The Following User Says Thank You to Eidolon For This Useful Post:

    inmate (10-27-2012)

  11. #9
    inmate's Avatar
    Join Date
    Jul 2009
    Gender
    male
    Location
    Bottrop, NRW, Germany
    Posts
    131
    Reputation
    10
    Thanks
    193
    My Mood
    Amazed


    Thank you very much Insane & Anonymouss =)

    +rep

    cheers :P

  12. The Following User Says Thank You to inmate For This Useful Post:

    [MPGH]MarkHC (10-27-2012)

  13. #10
    master131's Avatar
    Join Date
    Apr 2010
    Gender
    male
    Location
    Melbourne, Australia
    Posts
    8,802
    Reputation
    3165
    Thanks
    73,322
    My Mood
    Breezy
    You don't need to use inline asm... You're only making it more complicated just to set a value inside an array... You could just use this (offsets for 1.9.453):
    Code:
    DWORD* mapLighting = (DWORD*)0x06098CEC;
    
    void EnableFullbright()
    {
        mapLighting[0] = 4;
        mapLighting[1] = 2; // Bonus: disables fog
    }
    
    void ResetLighting()
    {
        mapLighting[0] = 9;
        mapLighting[1] = 5;
    }
    Credits to BaberZz and CoMPStR. I only updated the address.
    Donate:
    BTC: 1GEny3y5tsYfw8E8A45upK6PKVAEcUDNv9


    Handy Tools/Hacks:
    Extreme Injector v3.6.1 *NEW* Windows 10 compatible!
    A powerful and advanced injector in a simple GUI.
    Can scramble DLLs on injection making them harder to detect and even make detected hacks work again!

    Minion Since: 13th January 2011
    Moderator Since: 6th May 2011
    Global Moderator Since: 29th April 2012
    Super User/Unknown Since: 23rd July 2013
    'Game Hacking' Team Since: 30th July 2013

    --My Art--
    [Roxas - Pixel Art, WIP]
    [Natsu - Drawn]
    [Natsu - Coloured]


    All drawings are coloured using Photoshop.

    --Gifts--
    [Kyle]

  14. The Following 2 Users Say Thank You to master131 For This Useful Post:

    inmate (10-30-2012),intervention61 (10-29-2012)

  15. #11
          ( ° ͜ʖ͡°)╭∩╮
    Former Staff
    MarkHC's Avatar
    Join Date
    Nov 2011
    Gender
    male
    Location
    127.0.0.1
    Posts
    2,751
    Reputation
    66
    Thanks
    14,310
    My Mood
    Angelic
    Quote Originally Posted by master131 View Post
    You don't need to use inline asm... You're only making it more complicated just to set a value inside an array... You could just use this (offsets for 1.9.453):
    Code:
    DWORD* mapLighting = (DWORD*)0x06098CEC;
    
    void EnableFullbright()
    {
        mapLighting[0] = 4;
        mapLighting[1] = 2; // Bonus: disables fog
    }
    
    void ResetLighting()
    {
        mapLighting[0] = 9;
        mapLighting[1] = 5;
    }
    Credits to BaberZz and CoMPStR. I only updated the address.
    Pretty sure he knows that... he's just "practicing" his asm, which is good


    CoD Minion from 09/19/2012 to 01/10/2013

  16. The Following User Says Thank You to MarkHC For This Useful Post:

    inmate (10-30-2012)

  17. #12
    killstreak's Avatar
    Join Date
    Dec 2009
    Gender
    male
    Location
    Brazil :D
    Posts
    419
    Reputation
    12
    Thanks
    402
    My Mood
    Fine
    Quote Originally Posted by -InSaNe- View Post
    Pretty sure he knows that... he's just "practicing" his asm, which is good
    It's always better to not use asm, if he really needs to practice asm he should practice with something that he really needs to use it lol

Similar Threads

  1. [Help Request] // What's wrong with this ASM addy for Unlimited Ammo ? //
    By AlvinGenius in forum Alliance of Valiant Arms (AVA) Help
    Replies: 7
    Last Post: 10-30-2012, 08:29 AM
  2. [Help] inline asm, jumping.
    By mavi2k in forum C++/C Programming
    Replies: 5
    Last Post: 06-01-2011, 04:29 AM
  3. Replies: 14
    Last Post: 10-22-2010, 08:37 PM
  4. Help with ASM in module...
    By gbitz in forum Visual Basic Programming
    Replies: 3
    Last Post: 03-13-2008, 08:07 PM
  5. [BIG RELEASE] Wr-Source Public with ASM Hacks
    By Evilbot in forum WarRock - International Hacks
    Replies: 27
    Last Post: 11-27-2007, 07:46 AM