Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Unreal helper reading FName names incorrectly #7

Open
samontenegro opened this issue Oct 18, 2022 · 0 comments
Open

[Bug]: Unreal helper reading FName names incorrectly #7

samontenegro opened this issue Oct 18, 2022 · 0 comments
Assignees
Labels
area: unreal bug Issue reports behavior which is not expected. high priority Issue is of high priority.

Comments

@samontenegro
Copy link

What helper class does this issue occur on?

Unreal

Description

The following issue was discovered when attempting to use the Unreal helper with Scorn. @just-ero and I recently observed that when trying to read FName names from the FName pool, the strings being read appear to be offset by 6 bytes which causes an over-read, resulting in mangled names which, in turn, cannot be converted into valid identifiers.

While the objects are (apparently) identified correctly, given that addresses do show up under ue.UObjects, not having proper names makes them unreachable through Make<T>.

Reproduction Steps

state("Scorn-Win64-Shipping") {}

startup
{
    Assembly.Load(File.ReadAllBytes(@"Components/asl-help")).CreateInstance("Unreal");
}

init
{

    vars.Helper.TryLoad = (Func<dynamic, bool>)(ue =>
    {   
        int counter = 0;
        foreach (var obj in ue.UObjects) {
            if (counter > 40) break;
            vars.Log(obj.Address);
            vars.Log(obj.ToString() == null);
            counter++;
        }


        return true;
    });
}

Error Messages

None

Regression?

See potential causes and fixes

Potential Causes and Fixes

While this could potentially be a knock-on from a recent change to fix an AOB scan error (GUObjectArray signature could not be resolved), we don't have confirmation yet.

In addition, this could also be caused by some struct alignment problems.

@samontenegro samontenegro added bug Issue reports behavior which is not expected. untriaged This issue has not been evaluated yet. labels Oct 18, 2022
@just-ero just-ero added area: unreal high priority Issue is of high priority. and removed untriaged This issue has not been evaluated yet. labels Oct 18, 2022
just-ero added a commit that referenced this issue Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: unreal bug Issue reports behavior which is not expected. high priority Issue is of high priority.
Projects
None yet
Development

No branches or pull requests

2 participants