Results 1 to 3 of 3
  1. #1
    marco0999's Avatar
    Join Date
    Jun 2020
    Gender
    male
    Posts
    2
    Reputation
    10
    Thanks
    0

    memory scanner info

    Hi,

    I like to add the force feedback on games that don't support it.

    To do this I was thinked to intercept when the game play some specific audio wav file (ex. collision.wav , damage.wav, connon.wav, etc..)

    I have tried with a memory scanner to see when the audio file will load. Here a part of code:

    Code:
    
                while (proc_min_address_l < proc_max_address_l)
                {
                    // 28 = sizeof(MEMORY_BASIC_INFORMATION)
                    VirtualQueryEx(processHandle, proc_min_address, out mem_basic_info, 28);
    
                    // if this memory chunk is accessible
                    if (mem_basic_info.Protect == PAGE_READWRITE && mem_basic_info.State == MEM_COMMIT && (mem_basic_info.lType == MEM_MAPPED || mem_basic_info.lType == MEM_PRIVATE))
                    {
                        byte[] buffer = new byte[mem_basic_info.RegionSize];
    
                        // read everything in the buffer above
                        ReadProcessMemory((int)processHandle, mem_basic_info.BaseAddress, buffer, mem_basic_info.RegionSize, ref bytesRead);
    
                        string result = System.Text.Encoding.ASCII.GetString(buffer);
    
                        if (resul*****ntains(TextToFind))
                            MatchCount++;
    
                        // then output this in the file
                        //for (int i = 0; i < mem_basic_info.RegionSize; i++)
                        //    sw.WriteLine("0x{0} : {1}", (mem_basic_info.BaseAddress + i).ToString("X"), (char)buffer[i]);
                    }
    
                    // move to the next memory chunk
                    proc_min_address_l += mem_basic_info.RegionSize;
                    proc_min_address = new IntPtr(proc_min_address_l);
                }
    unfortunatenly there is a problem, this code work only the first time, becouse in the memory when the time pass there are multiple match of 'TextToFind' (MatchCount) so it is not easy to detect when the game play again a wav file.

    So I have thinked a solution like this:

    for each memory scan I load a temp stucture array that contain information of every match (wav_name and base_address) ex:

    Code:
    Arr[0].FileName='Collision.wav';
    Arr[0].BaseAdress= 54354646;
    
    Arr[1].FileName='Collision.wav';
    Arr[1].BaseAdress= 67576575;
    
    Arr[2].FileName='Collision.wav';
    Arr[2].BaseAdress= 354664;
    after every scan I can do a check like this:

    Code:
    if (Updated_Array != Previous_Array_Copy)
      // the wav file was load
    theorically this work ? Or there is another easy way to do this ?

    thanks !!

  2. #2
    Dave84311's Avatar
    Join Date
    Dec 2005
    Gender
    male
    Location
    The Wild Wild West
    Posts
    35,836
    Reputation
    5782
    Thanks
    41,290
    My Mood
    Devilish
    Find the function that does the music call or windows APIs. Hook either and find out what is being passed in.





    THE EYE OF AN ADMINISTRATOR IS UPON YOU. ANY WRONG YOU DO IM GONNA SEE, WHEN YOU'RE ON MPGH, LOOK BEHIND YOU, 'CAUSE THATS WHERE IM GONNA BE


    "First they ignore you. Then they laugh at you. Then they fight you. Then you lose.” - Dave84311

    HAVING VIRTUAL DETOX

  3. #3
    Lampmagicalbible's Avatar
    Join Date
    Feb 2020
    Gender
    male
    Posts
    29
    Reputation
    10
    Thanks
    4

    stupid advice

    Okay I am not a programmer and just need 15 posts to send a PM. You can look up memory functions and formats on google patents and find out there through documentation.

Similar Threads

  1. [Help Request] Finding offsets through memory scanner
    By Jabberwock in forum C++/C Programming
    Replies: 0
    Last Post: 08-29-2012, 12:00 PM
  2. [Help] Creating Memory Scanner
    By .REZ in forum Visual Basic Programming
    Replies: 7
    Last Post: 07-20-2011, 07:24 AM
  3. [Release] Similar to Cheat Engine -MHS- Memory Scanner
    By randomnamekabe in forum Combat Arms Hacks & Cheats
    Replies: 75
    Last Post: 06-22-2010, 06:53 PM
  4. [Release] Undetected Memory Scanner (UCE)
    By Tukjedude in forum C++/C Programming
    Replies: 17
    Last Post: 06-04-2010, 05:01 AM
  5. [Info] Detection rate; How to lower it. | Online Scanner Info V2
    By latex6666 in forum WarRock - International Hacks
    Replies: 10
    Last Post: 11-28-2007, 03:43 PM