Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Nostale
You last visited: Today at 10:51

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Avoid crash for invalid MapObj item

Discussion on Avoid crash for invalid MapObj item within the Nostale forum part of the MMORPGs category.

Reply
 
Old   #1
 
ManuLeLe's Avatar
 
elite*gold: 0
Join Date: Apr 2015
Posts: 39
Received Thanks: 15
Avoid crash for invalid MapObj item

Hey everyone!

I just wanted to let you know that I've recently started diving back into in-memory hacking in NosTale. I'm patiently recreating the game's internal structures from scratch to gain a deeper understanding of its inner workings.

In-memory hacking requires a lot of patience and dedication, but it's incredibly fascinating and rewarding. I'm working hard to comprehend the data structures used within the game and finding safe ways to access pointers to items in the lists without encountering crashes or invalid memory access issues.

I would love to hear your advice and suggestions on safely accessing pointers to objects in the lists without crashing or encountering invalid memory issues. If you have any techniques or best practices to share, I'm all ears!

Right now I'm looping around lists like in this code snippet:
Code:
static bool IsPointerValid(const void* ptr)
{
    MEMORY_BASIC_INFORMATION mbi;
    SIZE_T result = VirtualQuery(ptr, &mbi, sizeof(mbi));
    return (result != 0 && mbi.Protect != PAGE_NOACCESS);
}

...

for (int i = 0; i < sceneMgr->NpcListPointer->Length; i++) {
                auto itemPtr = (MapNpcObj*)(sceneMgr->NpcListPointer)->FirstItemPtr[i];
                if(IsPointerValid(itemPtr) && IsPointerValid(itemPtr->NpcName))
                    std::cout << std::dec << itemPtr->NpcName << " " << itemPtr->MapX << ";" << itemPtr->MapY << std::endl;
}
but nevertheless, sometimes it takes 5 minutes to crash, sometimes 1, I guess it access the memory of an item deleted right after it checker for the list length.

Thank you in advance!
ManuLeLe is offline  
Old 05/31/2023, 10:29   #2
 
elite*gold: 0
Join Date: Dec 2011
Posts: 43
Received Thanks: 19
If you reference or do -> on an address which is 0 you crash. And because all item information depend on SceneManager you only have to check if its 0. I do it like this maybe it can help you:

Code:
uint32_t GetSceneManager()
{
    DWORD TSceneManager = test::SignatureScan().Scan("NostaleClientX.exe",
        "10 A0 A9 0B FF FF FF FF 00 00 00 00 00 00 00 00 00 00 00 00 FF FF FF FF", 0); // old pattern

    if (TSceneManager == 0) // check if 0
    {
        std::cout << "TSceneManager not found!" << std::endl;
        return 1;
    }

    uint32_t* ptr = (uint32_t*)TSceneManager; // if (TSceneManager == 0) you crash at this point 
    uint32_t val = *ptr;

    return val;
}
I think in your case you crash because SceneManager address can change over time its just luck you dont crash on start.
JONNST4R is offline  
Reply


Similar Threads Similar Threads
FusionCMS Item Store Item Adden invalid item
07/27/2015 - Web Development - 4 Replies
Hallo ich habe ein kleines Problem. Ich habe mir eine Lizenz für FusionCMS v6 (World of Warcraft CMS) gekauft und installiert. Als ich alles richtig eingestellt habe wollte ich ein Item hinzufügen über das Admin Panel aber jedes mal zeigt er mir invalid item. Wäre super wenn ihr mir helfen könntet das Problem zu beseitigen. Mfg
MapObj bug [5095]
01/07/2014 - CO2 Private Server - 4 Replies
can someone help me with a quick guide on how it's bug this MapObj I already did everything, that was the most I can! from ani files. http://imageshack.us/photo/my-images/834/ejva.jpg http://imageshack.us/a/img834/4747/ejva.th.jpg Ps: sorry for my English, I use translator!
need help about mapobj
08/28/2010 - CO2 Weapon, Armor, Effects & Interface edits - 5 Replies
i just cant the file contains the mapobj for the maps so watever i edit and hide ppl just return back normal in game if anyone can help tell me those files that would be gr8
invalid walk and invalid jump
03/04/2009 - Conquer Online 2 - 10 Replies
I think I found something important for speedhack makers I found that invalid walk and invalid jump messages happens when you have high ping(over 5k) and I think that all TQ done to stop speedhackers is they only added new kind of client check which reads your last position from the server and your new position and then compare them with the time cuz you can jump like 1 pixel in eac .5 sec(not sure) I think of this because : 1- this is the only possible check they can add they can't add...



All times are GMT +1. The time now is 10:56.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.