Solved Question regarding the UE4-SdkGen

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

notgoodatall

HTML-Hacker
Dank Tier Donator
May 18, 2020
28
343
1
Anticheat
N/A
Tutorial Link:
N/A
How long you been coding/hacking?
~4months
Coding Language
C++
Hello, a few days ago I started to learn about Unreal Engine, how to find GNames/GObjects and how to finally dump an SDK. I am slowly starting to understand everything and was already able to fix a bunch of engine classes for my game (i am using KN4CK3R´s UE4 SdkGen btw). There is only one thing I dont fully understand yet and that is this code snippet:

NamesStore.cpp/ObjectsStore.cpp:
TNameEntryArray* GlobalNames = nullptr;

bool NamesStore::Initialize()
{
    auto address = FindPattern(GetModuleHandleW(L"UE4-Core-Win64-Shipping.dll"), reinterpret_cast<const unsigned char*>("\x48\x8B\x1D\x00\x00\x00\x00\x48\x85\xDB\x75\x35"), "xxx????xxxxx");
    if (address == -1)
    {
        return false;
    }
    
    auto offset = *reinterpret_cast<uint32_t*>(address + 3);
    GlobalNames = reinterpret_cast<decltype(GlobalNames)>(*reinterpret_cast<uintptr_t*>(address + 7 + offset));

    return true;
}
So I get what this function does but the way it does it confuses me. My questions are:
1. Where do I get that signature from? For GNames I tried it with the static TNameEntryArray* instance in "FName::GetNames()" but that did not work (probably for obvious reasons)
2. What is happening in line 11/12? Why adding the 3 and then the 7, I thought what we get from the sig scan already is the address of the TNameEntryArray* and if its not what does the pattern scan give us then?

As you guys can see I am just overall confused about the way they get GNames/GObjects with the pattern scan and I was not able to find any information that helped me.
It would be awesome if someone could just try to explain to me how this code snippet works so I can get GNames/GObjects on my own in the future.
 

Rake

Cesspool Admin
Administrator
Jan 21, 2014
11,573
78,998
2,316
did you checkout this? Tutorial - How to easily make signatures for Unreal Engine 4 Games

"\x48\x8B\x1D\x00\x00\x00\x00\x48\x85\xDB\x75\x35"

note that the 4 byte relative offset where the zeros are is offset +3 from the address of the pattern, that's why you add 3, because you want that 4 byte relative offset

the first instruction in this signature, following the relative offset you just grabbed is the 0x48, which is address + 7, that's why you add 7

address + 7 + offset
this is offsetting you to the location of GlobalNames
 

notgoodatall

HTML-Hacker
Dank Tier Donator
May 18, 2020
28
343
1
did you checkout this? Tutorial - How to easily make signatures for Unreal Engine 4 Games

"\x48\x8B\x1D\x00\x00\x00\x00\x48\x85\xDB\x75\x35"

note that the 4 byte relative offset where the zeros are is offset +3 from the address of the pattern, that's why you add 3, because you want that 4 byte relative offset

the first instruction in this signature, following the relative offset you just grabbed is the 0x48, which is address + 7, that's why you add 7

address + 7 + offset
this is offsetting you to the location of GlobalNames
Thanks alot man, looks like I just lacked knowledge about sig scanning. This makes perfect sense now!
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Community Mods League of Legends Accounts