QuestionHelpAOBScan returning null

Posts 1–5 of 5 · Page 1 of 1
AOBScan/Pattern Scan returning null
I'm trying to find the address of this AOB in C ++:

89 ?? ?? 8B ?? ?? FC FF FF 85 ?? 0F

But it returns NULL, this AOB in Cheat Engine operates normally.
I'm using:

Code:
char BytePattern[] = "\x89\x00\x00\x8B\x00\x00\xFC\xFF\xFF\x85\x00\x0F";
char ByteMask[] = "x??x??xxxx?x"; //Our Mask

FindPattern("Game.exe", BytePattern, ByteMask);
Do you have your character set to compile as multi byte?
Quote Originally Posted by Cosmo_ View Post
Do you have your character set to compile as multi byte?
Yes. My entire code is this:

Code:
// dllmain.cpp : Defines the entry point for the DLL application.
#include "stdafx.h"
#include <Windows.h>
#include <iostream>
#include "Functions.h"
using namespace std;

#pragma comment( lib, "psapi.lib" )

//Define all Here, its easier.
char BytesToPatch[] = "\x8b"; //What we are replacing with, for example \x90\ = NOP.
char BytePattern[] = "\x89\x00\x00\x8B\x00\x00\xFC\xFF\xFF\x85\x00\x0F";
char ByteMask[] = "x??x??xxxx?x"; //Our Mask
int Position = 0; //0 means first.
int NoOfBytes = 1;

//Our Main Function
void InitiatePatch()
{
 DWORD ammoAddy = FindPattern("Transformice.exe", BytePattern, ByteMask);
	MessageBoxA(NULL, BytePattern , "",0 );
	MessageBoxA(NULL, ByteMask , "", 0);
	MsgBoxAddy(ammoAddy);
	WriteToMemory(ammoAddy, BytesToPatch, 1);
	}


BOOL WINAPI DllMain(
    HINSTANCE hinstDLL,  // handle to DLL module
    DWORD fdwReason,     // reason for calling function
    LPVOID lpReserved)     // reserved
{
    // Perform actions based on the reason for calling.
    switch(fdwReason)
    {
        case DLL_PROCESS_ATTACH:
            // Initialize once for each new process.
            // Return FALSE to fail DLL load.
            MessageBoxA(NULL, "Attached successfuly", "", 0);
            InitiatePatch();
            break;
    }
    // Successful DLL_PROCESS_ATTACH.
    return TRUE;
}
I think that line can be the problem:

Code:
#pragma comment( lib, "psapi.lib" )
For without it gives this error:

Code:
error LNK2001: unresolved external symbol _GetModuleInformation  16
Since you're calling a .lib did you link the dll that goes with it?
Quote Originally Posted by InunoTaishou View Post
Since you're calling a .lib did you link the dll that goes with it?
I added psapi.lib in the Project Settings > Linker> Input > Additional Dependencies
And then removed the line #pragma comment( lib, "psapi.lib" ).
(I think that's what you asked, I am Brazilian and I do not understand much English.)

But the AOBScan returns Null, and the OAB works in Cheat Engine (AOB to appear in Cheat Engine have to uncheck the checkbox "Writable")
This "Writable" may have something to do?
Posts 1–5 of 5 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us