Good afternoon,
I have a problem reading a txt file in my dll
Code:

bool LeProtect ()
{
char str [255];
FILE * arq;
arq = fopen ("protect.ps", "r");
if (arch)
{
while (! feof (arch))
{
fgets (str, 255, arch);
printf ("% s", str);
}
}
fclose (arq);
}

MUGUARD_PROCDUMP g_ProcessesDumps [MAX_PROCESS_DUMP] =
{
LeProtect ()
};

protect.ps
Code:

0x41988D {{0x55, 0x8B, 0xEC, 0x6A, 0xFF, 0x68, 0xD8, 0xC3, 0x42, 0x00, 0x68, 0x14, 0x9A, 0x41, 0x00, 0x64, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00, 0x83, 0xEC, 0x68}}, / / Tcp Monitor 2.1.0.3
{0x512950, {0x55, 0x8B, 0xEC, 0x83, 0xC4, 0xF0, 0x53, 0xB8, 0x50, 0x23, 0x51, 0x00, 0xE8, 0x63, 0x3C, 0xEF, 0xFF, 0x8B, 0x1D, 0x7C, 0xA2, 0x51, 0x00, 0x8B, 0x03, 0xE8, 0xA6, 0x87, 0xF6, 0xFF, 0x8B, 0x0D}}, / / ADR 1.0.0.0
0x496CA0 {{0x55, 0x8B, 0xEC, 0x6A, 0xFF, 0x68, 0x88, 0x15, 0x4F, 0x00, 0x68, 0xC8, 0x6B, 0x49, 0x00, 0x64, 0xA1, 0x00, 0x00, 0x00, 0x00, 0x50, 0x64, 0x89, 0x25, 0x00, 0x00, 0x00, 0x00, 0x83, 0xEC, 0x58}}, / / tsearch 1.6.0.0
0x44EB02 {{0xE8, 0xC5, 0xC0, 0x00, 0x00, 0xE9, 0x78, 0xFE, 0xFF, 0xFF, 0xCC, 0xCC, 0xCC, 0xCC, 0x51, 0x8D, 0x4C, 0x24, 0x08, 0x2B, 0xC8, 0x83, 0xE1, 0x0F, 0x03, 0xC1, 0x1B, 0xC9, 0x0B, 0xC1, 0x59, 0xE9}}, / / Procexp

Yet it is working.
What can it be?

grateful.

Recommended Answers

All 6 Replies

I think you need to check the name of your FILE pointer. It seems to change from "arq" to "arch" then back to "arq"...

Need to read the txt so that the code in the dll to be like this:

MUGUARD_PROCDUMP g_ProcessesDumps [MAX_PROCESS_DUMP] =
{
0x60CA50 {{0x55, 0x8B, 0xEC, 0x83, 0xC4, 0xEC, 0x53, 0x33, 0xC0, 0x89, 0x45, 0xEC, 0xB8, 0xD0, 0xC1, 0x60, 0x00, 0xE8, 0x42, 0xAC, 0xDF, 0xFF, 0x8B, 0x1D, 0x58, 0x43, 0x61, 0x00, 0x33, 0xC0, 0x55, 0x68}} / / Cheat Engine 5.6
};

It has nothing to do colleague
what I need is to read data from a text file and the data is within the:

MUGUARD_PROCDUMP g_ProcessesDumps [MAX_PROCESS_DUMP] =
{
CODE HER
};

for example changing it to:

MUGUARD_PROCDUMP g_ProcessesDumps [MAX_PROCESS_DUMP] =
{
0x60CA50 {{0x55, 0x8B, 0xEC, 0x83, 0xC4, 0xEC, 0x53, 0x33, 0xC0, 0x89, 0x45, 0xEC, 0xB8, 0xD0, 0xC1, 0x60, 0x00, 0xE8, 0x42, 0xAC, 0xDF, 0xFF, 0x8B, 0x1D, 0x58, 0x43, 0x61, 0x00, 0x33, 0xC0, 0x55, 0x68}} / / Cheat Engine 5.6
};

The cheat engine and others are the dumps of the program that is blocked by my dll

So are you writing an anti-cheat program then?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.