TRANSCRIPTEnglish

Reversing Unreal Engine 4 and Finding GName, GObject and GWorld (Reversing my friends game Part 1)

23m 56s4,127 words663 segmentsEnglish

FULL TRANSCRIPT

0:00

hello everybody i'm russell j

0:03

and as the title says today i'm going to

0:05

be reversing my friends game

0:07

along with going into a little bit of an

0:09

in-depth explanation on how to find

0:11

g-names g objects g-world and a couple

0:14

other things that you would want

0:15

if you plan to reverse unreal engine 4

0:17

games or generate sdks if you're into

0:19

that which i very much

0:20

am so full disclaimer that i did get

0:24

permission from my friend to reverse his

0:25

game i'm not a douche bag

0:28

to that degree so i will feel no remorse

0:31

doing this and you can try this on his

0:32

game but he'll have an update out

0:34

already because this is a previous

0:35

version so yeah

0:37

have fun with that but basically i'm

0:40

going to say a couple things right off

0:42

the bat

0:42

this will not this will be preferably

0:45

for

0:46

games made with unreal engine 4.22

0:50

and lower because at 4.23 g

0:53

names was deprecated and replaced with f

0:56

name it's a complete it's you know a

0:58

different thing but

0:59

you can use it the same but base i'm not

1:02

going to go over that in this tutorial

1:04

this is for unreal engine 4.22

1:06

or lower so pretty much what we're going

1:09

to want to do

1:10

is if you are new to reversing unreal

1:12

engine 4 games or

1:14

you know you should have some experience

1:16

with things like ida

1:17

or understanding what patterns are

1:20

if not i'll explain a little bit of that

1:22

but you should have a basic

1:24

understanding and you should be using

1:25

ue4 you know to a degree that you will

1:28

understand

1:30

things reversing you want to use it

1:31

really before you reverse it

1:33

so what i'm going to do is i'm going to

1:36

go over how to find g

1:37

names which is the global name array has

1:39

all the names in a game

1:40

the global objects array it's an array

1:42

of all the objects in a game

1:44

and global world uh g world which is

1:47

basically a pointer to all the objects

1:48

in the world

1:49

so that's that we're also going to be

1:52

searching for something called process

1:54

event

1:55

now process event is

1:58

basically a function that you can use

2:02

in 104 games to call other functions in

2:05

fact the parameters are even you

2:06

functions and the struct

2:08

or you know a struct of parameters that

2:10

you want to use for the function you

2:11

want to call

2:12

and that's very useful because if you

2:13

decide to generate an sdk

2:16

for you know let's say this game sector

2:18

452

2:19

well then if you want to generate an sdk

2:21

you can't really call any functions or

2:23

anything

2:24

without having the pattern to

2:27

process event so it is a very important

2:30

thing in my mind you don't need it to

2:31

generate an sdk but you damn well needed

2:33

to use it

2:34

to the degree i like to use it so yeah

2:37

there's that

2:38

but pretty much that's what i'm going to

2:40

be going over

2:41

i will say that there is a better

2:43

tutorial that explains if you

2:45

want to learn more if you're watching

2:46

and like hey what's this whole g name g

2:48

object bullcrap i will have a link in

2:50

the in the description and actually up

2:52

on the screen

2:54

basically this guy made a video that

2:56

explains it

2:58

better than i could explain it so if you

3:00

don't know what i'm talking about and

3:01

you're very confused and you're just

3:02

starting to reverse uv4 games

3:04

you're going to want to watch that guy's

3:05

video and learn more about what

3:07

everything is that guy made a very good

3:09

video

3:10

so to start off if you are reverse new

3:14

to reversing ue4 games

3:16

which i assume you are good rule of

3:18

thumb is to

3:19

create a test game for yourself

3:23

i have a test game up in ida right now

3:25

that i made

3:26

basically you want the test game to have

3:29

a pdb

3:30

or include debug files and if you don't

3:32

know if you're not being able to get it

3:33

when you

3:34

well package a project the engine has to

3:37

have engine

3:37

debugging symbols included which is like

3:40

another 10 gig

3:41

download but it is very good for

3:43

practicing

3:44

because when you have a pdb which i hope

3:46

you know but a pdb allows you to view

3:48

all the functions in a game this game

3:51

right here that i have is a test game

3:53

uh it's literally just the uh default

3:55

first person shooter template

3:57

or yeah so but if i look for a function

4:00

for example something as simple as

4:02

jump

4:06

you just give it just a second to load

4:08

through all the stuff you can see a

4:10

bunch of functions a character can jump

4:12

internal

4:13

however if i was to do that to my

4:15

friend's game which doesn't have an sd

4:17

which doesn't have a pdb nothing will

4:19

pop up because none of the functions are

4:21

named

4:22

so it's always good to kind of match up

4:24

take a look at a game that you made that

4:26

you know the functions to

4:28

and basically compare stuff and see

4:31

you know what works and what doesn't so

4:33

first off i'm going to show you how to

4:35

get the g

4:35

world g object and g names and actually

4:39

process event

4:40

with a game that you have a pdb with so

4:42

let's get this out of the way first for

4:43

pdb users i know a lot of games like

4:45

satisfactory and stuff do that so if

4:47

you're into that

4:48

let's just get that out of the way and

4:49

then i'll reverse the game and i'll show

4:51

you how to do it so if you do not have a

4:52

pdb just skip ahead from here

4:55

so for a pdb if you want to scan for g

4:58

names you're going to want to go into

4:59

the function box by the way

5:01

assuming you've used ida before you're

5:04

going to want to

5:06

wait until the initial analysis is

5:07

complete you will know that when this

5:09

yellow ball right here turns green like

5:11

it is now

5:12

you'll be able to search for much more

5:14

things and there will be a lot more

5:15

results

5:16

once you let the analysis fix uh finish

5:19

uh secondly let's go into options

5:22

general and you want to set the op codes

5:24

to 10.

5:25

basically the op codes are the bytes

5:27

that are displayed over here so if i set

5:29

them back to 10

5:30

you can see they appear and it'll be

5:34

easier to copy and paste and overall

5:35

just easier

5:36

if you're in graph view just press space

5:38

to get out of it

5:39

you should know the basics of ida now

5:41

back to the good stuff

5:43

so for g names the function that you

5:45

want to search for is

5:47

fname get names

5:51

right here and basically you are going

5:54

to want to copy the bytes from

5:56

here the move to the jnz

5:59

so basically these right here and i'll

6:02

just copy and paste them over real quick

6:04

to show you

6:07

these are the three bites that you were

6:08

going to want

6:14

should be 12 bites you can have more but

6:16

this is what i do

6:19

and that is that's good right there so

6:21

you have the gnames bytes right there

6:23

perfect if you want to find the g

6:26

object you don't have to search for

6:28

anything

6:29

uh function wise you just select g

6:31

object

6:33

copy this this is an address so to go to

6:35

an address in

6:36

ida you want to press the g button let's

6:39

paste this address in there

6:41

press ok it takes you to here where it's

6:44

actually named

6:45

then you just click the xref and boom

6:48

there is your g object array so again

6:51

according to right here this document i

6:54

have that i made

6:55

you want to have the bytes from the li

6:57

and the call so let's just go over there

7:00

should be another 12 bytes you can do

7:02

more again

7:05

okay there we go

7:08

and if you are you know more in depth

7:10

when we get the pattern scanning and

7:12

stuff you can just use patterns and

7:13

sometimes you'll never have to update

7:14

the actual game if you have good wild

7:16

cards

7:18

so that's done now g world

7:21

it's just like g object you're gonna

7:24

copy this address

7:25

you're gonna press the g button search

7:28

for the address

7:29

go to the xref and down here it states

7:32

you're going to want

7:33

move test and jnz so if we look at this

7:37

we can see should be another 12 if i'm

7:39

not mistaken

7:42

boom boom

7:48

boom so there you go there's that

7:52

very easy very simple when you have a

7:54

pdb i'm also going to show you process

7:56

event

7:57

you just literally go into the function

7:59

search search view object

8:01

colon colon process event

8:07

and there you go you can copy any bytes

8:08

from here i like to do these two little

8:10

moves right here like 11

8:13

bytes so that's perfect so right there

8:17

you have what you're looking for so

8:18

you're fine now

8:20

again that was for with the pdb now

8:22

we're going to go over

8:24

to without a pdb we're going to actually

8:27

start reversing my friend's game

8:28

as i wanted to do but now you have this

8:30

little info if you ever come across a

8:32

game with the pdb

8:33

or just want to practice for yourself

8:34

because this will come up later just

8:36

remember that

8:37

so if you go into here we did process

8:40

event there is another thing i forgot to

8:41

talk about which is create default

8:43

object

8:44

i don't really feel like going into this

8:46

because honestly most games have the

8:48

exact same pattern this little thing

8:50

right here these patterns right here but

8:52

for the hell of it

8:54

and um if you have a game with the pdb

8:56

you can just type in

8:58

create default object

9:02

you class create default object you can

9:04

just copy the bytes here but

9:06

i've never had a game that didn't work

9:08

with the pattern that was provided so

9:10

you really don't need that but there you

9:11

go a little bonus tip of the day

9:13

wow so let's start reversing games

9:17

like you probably have that don't have

9:18

pdbs because developers aren't that cool

9:21

anymore

9:22

so this game doesn't have a pdb so we're

9:25

going to be abusing strings

9:26

hopefully you did watch you know the

9:28

front part the first part so you know

9:30

how to set the op codes and you

9:32

you know know the importance of ida and

9:33

stuff how to get out of graph view

9:36

so what we're going to want to do you're

9:38

going to want to go to view

9:40

open sub views and strings again

9:44

the ball up here turn from yellow to

9:45

green so it is finished analyzing

9:51

let it do its little thing with its

9:53

generating strings it's going to

9:54

generate a lot of them

9:55

we're only going to be searching for a

9:57

few them a few that work for us so let's

9:59

get rid of this little tab here

10:02

i like to have a little document open

10:04

just to you know

10:05

keep a record of things for later all

10:07

right

10:08

all the strings are done generating so

10:11

what we're going to want to do

10:12

is i have two strings you can abuse here

10:14

but this one right here is the one that

10:15

i see in most ue4 games

10:17

so let's just copy this this string

10:20

we're going to be abusing it

10:21

beat the hell out of the strings you see

10:24

the string

10:25

it's been found in the string list we

10:27

want to click it

10:28

and we want to go to xref so basically

10:31

the way the string

10:32

you know search works is this string

10:34

isn't a function

10:35

and in that function you know when you

10:37

go to the x ref it takes you to the

10:39

function it's actually listed in

10:41

click you click the sub is a function

10:44

it takes you to the function in fact i

10:46

think it is a version function if i'm

10:48

yes it is

10:49

so this is perfect so what we're going

10:51

to want to do

10:52

if you watch the first part you remember

10:55

that when we were searching

10:57

for the g names and we found it

11:00

it looked like this this was the

11:02

structure of it well

11:04

the structure should be the same for

11:05

this game as the engine versions are

11:07

relatively close

11:08

in fact if i even scroll down a bit

11:11

what do you see here in the pdb version

11:13

of the game

11:14

you see the same exact layout

11:17

except this function isn't named this

11:20

one is get os version but it has the

11:22

same exact stuff the same setup the same

11:24

bytes not same bytes the same strings so

11:28

in fact

11:28

nice little tip on how to rename

11:30

function

11:32

let's take copy this name of the

11:33

function over to here you don't have to

11:35

do this ain't mandatory at all but just

11:36

so we don't lose our track

11:39

boom that's how you name a function but

11:41

as you can see it's exactly the same

11:43

and if in the pdb when you scroll up

11:46

you see the nice little g names right

11:48

here should mean

11:50

for the non-pdb game after searching for

11:52

this string

11:53

when you scroll up you should also get

11:56

the g names

11:57

so there we go that is the g names

12:01

now i do have it written to the side so

12:03

you don't have to have another thing of

12:05

i to open

12:06

but pretty much you want to copy the

12:08

move the test and the jnz

12:10

there is what the g g names are supposed

12:13

to look like and

12:14

we found them over here it's very simple

12:17

so now let's copy down the three bytes i

12:19

said we want the move

12:24

we want the test

12:28

and we want the jnz

12:33

there we found the g names one down a

12:35

couple more to go

12:37

so now that you understand the basic of

12:39

abusing the string and

12:40

you know comparing i'm going to be

12:42

comparing some more

12:44

so we have g names down and i'm actually

12:46

in fact i'm going to name the function

12:48

because i don't want to lose this in

12:49

case i decide the modest game in the

12:51

future so

12:52

there's the name boom now if we search

12:55

it in here

12:57

f name get named void yeah

13:01

peers should be fine excuse me

13:05

so i also have a little bit of notes

13:07

here the g

13:08

name should always start with 48 a b 0

13:11

5. i've always seen that

13:13

so as you can see 48 ab05 started with

13:16

it we have the three we copied it down

13:18

we're perfect

13:19

now for g objects we are going to want

13:22

to abuse the string

13:26

this string called a accent grave i

13:28

don't know how to say that so let's go

13:30

with it yay

13:32

so let's do the same thing we did before

13:33

let's search for the string

13:35

and it says we want the first result

13:37

usually so let's go to the first result

13:39

again you want to click the xref this

13:41

function

13:43

perfect now it's a little far

13:47

up for g objects it's not right above

13:51

if you remember but a good comparison is

13:54

if you have another game open again with

13:56

the pdb

13:57

you can search for the string in here

13:58

too

14:00

and see if it appears it appeared here

14:04

let's go to the xref if i scroll up a

14:07

bit

14:08

on uh the pdb game we can see

14:11

that it gets to a point where it shows

14:13

the g objects it is in this function

14:15

list

14:16

so in theory now that we have a string

14:19

that properly works

14:20

one of the ones i listed if we to scroll

14:23

up

14:24

and we compare each function to this

14:27

setup

14:28

we should find the g objects this way so

14:30

let's scroll up a bit

14:32

nope nope nope nope

14:36

nope nope nope nope

14:40

nope nope nope nope

14:43

nope nope jesus christ nope

14:50

nope you can see we're still scrolling

14:53

up

14:54

oh but what is this right here this

14:56

looks a little familiar

14:58

srw lock look right down here

15:02

in the pdb game there is something else

15:04

called

15:05

uh initialize srw lock and it has the

15:08

same type of setup

15:10

and above this is apparently the g

15:13

object array if we look above there it

15:17

is

15:17

there's the g object array and again you

15:20

can compare it with this

15:21

notepad i have here which basically

15:23

tells you the setup it should be it

15:24

should be a sub

15:25

lee call lee add jump sub something like

15:28

that and

15:29

if you look it seems to be exactly what

15:32

it is

15:32

now does it start with 48 ad 0d

15:37

4880 we [ __ ] got it

15:40

so now g object

15:43

g object now according to this and

15:47

according to what i say

15:48

we want the 12 bytes here on the li and

15:50

the call so let's just copy these babies

15:53

over

15:56

for the record i even get confused every

15:58

now and then and again i'm not some kind

16:00

of you know

16:01

i'm not a pro reverser i'm just some one

16:04

who's

16:04

bored pretty much wow i really screwed

16:07

up notepad plus plus there

16:09

but i get confused sometimes i got

16:12

you will not believe how many times i

16:14

saw this

16:15

in a non-pdb game didn't see the

16:18

initialize srw lock and thought oh my

16:20

god i found the g

16:21

names or g object so it's all right to

16:24

make mistakes

16:25

you know you just gotta learn from them

16:26

see what you did wrong

16:28

so we got the g objects i'm actually

16:31

gonna label this

16:32

so that we have it in the future lee

16:36

yep let's rename this to that

16:41

just some housekeeping

16:45

there we go now what we're going to want

16:48

to find

16:48

next is g world

16:53

i have another string that we can abuse

16:55

so

16:56

if we look at this g world should almost

16:59

always look

17:00

somewhat similar to this and it should

17:03

always start usually

17:04

with always start usually am i talking

17:06

about always or usually

17:08

most of the time i'll say that it'll

17:09

save my ass

17:11

so the string that i have to abuse is

17:13

failed to load unreal engine class

17:15

the first result so let's search for

17:18

that in the friends game

17:22

there's a result let's go to the xref

17:26

it's the same one here it doesn't matter

17:27

what you press and i note here to scroll

17:29

down

17:30

if you remember we've been scrolling up

17:32

so to have the note to scroll down

17:34

really remember so what we're going to

17:35

be looking for is in the instruction

17:37

list

17:37

we're going to scroll until we find a

17:40

move ss

17:41

x corps you commit blah blah blah or

17:43

something similar to this kind of setup

17:46

i'm not going to compare it to a pdb

17:47

because i feel like that's taking more

17:49

time and i think you got the idea the

17:50

first time

17:51

so now that we have it let's start

17:54

scrolling down until we see it i'm not

17:56

going to say no million times

17:57

i'm just going to be going with my line

18:03

so this here this isn't it yet

18:08

you can keep scrolling it is a bit far

18:10

down and depending on the game it could

18:12

be very far down but you just want to

18:13

keep scrolling

18:14

it's a new function here

18:17

a lot of moves but not the move we're

18:19

looking for

18:20

no oh

18:24

is this let's see nope does not look set

18:28

up right

18:29

it looks like it in the beginning but it

18:31

isn't let's keep scrolling then

18:37

oh right here

18:41

is this it move ss yep it's a d word

18:45

one one zero one

18:49

the rba yes this looks like it is and

18:51

let's compare it

18:52

with the game with the pdb if i search

18:56

for g

18:57

world is it set up the same

19:02

why yes it is and as i said in here we

19:04

want the move the test and the j and z

19:07

just like the g names so what we're

19:09

gonna want to do is let's go down

19:11

until we see the move perfect let's copy

19:14

this bad boy

19:16

let's paste it right here let's copy

19:19

this

19:21

paste it right here and finally the j z

19:24

i don't know why i said j and z

19:27

perfect should be another 12 you can do

19:30

more again but this works fine

19:32

and just for some housekeeping i'm going

19:34

to label g

19:36

world

19:41

yeah alright i was right i was a little

19:43

confused there for a second

19:46

boom so we found three now

19:49

let's search for process event which is

19:51

the next thing on our list

19:54

process event

20:00

if we go back over to our g docs

20:03

we scroll down now i have a couple ways

20:05

that i use to find process event i'm

20:07

going to show you the string abuse and

20:08

i'm going to show you the possible sig

20:10

that i have i went through many unreal

20:12

engine games

20:13

and i found this sig works for a lot of

20:14

them so maybe it'll work for you

20:19

so pretty much let's abuse this string

20:21

right here i have

20:23

access none no context and it says to

20:25

scroll down

20:27

and this should be the setup hopefully

20:30

and a lot of and some games will not

20:31

have the setup so it'll take a little

20:32

digging on your part

20:34

to find it sometimes but for this game

20:36

and this purpose

20:37

this is what we're gonna do so let's go

20:39

to strings

20:41

let's search the string perfect there's

20:44

a result

20:46

an x-ray perfect sometimes they won't

20:48

have extras which really sucks but there

20:50

it is so

20:50

that just click it and i say to scroll

20:54

down so let's scroll down

20:56

jesus oh

20:59

oh wow it was right there it was right

21:04

beneath it it will not always be like

21:05

that but yeah if you scroll down from

21:07

the xref

21:08

look at the comparison

21:12

more importantly though look at this it

21:15

looks identical

21:17

and let's go into quickly the

21:20

pdb game and let's search for the

21:22

process event here

21:28

object process event it looks

21:32

like it's fairly similar might not be a

21:34

hundred percent but let's take a look

21:37

yeah it looks like it is so what we're

21:40

gonna want from here you can pick any

21:41

bites you want for this because it is

21:43

just a function

21:44

but i like these little two moves right

21:46

here

21:47

so let's do them these should be 11

21:49

bytes if i recall

21:53

and boom that was the first method of

21:55

finding the process event

21:56

now let's name it real quick so that i

21:58

can see which sig one is right when i do

22:00

the sig thing

22:01

so let's name this function process

22:03

event like it should be called

22:06

boom done so now that was one method of

22:10

finding process event

22:11

the other method i have is this possible

22:14

sig here

22:15

you would copy it you would press alt

22:18

and b

22:18

to pull up a pattern scan find all the

22:21

currencies you want to select and you

22:23

would search this pattern

22:26

now again it wouldn't actually have the

22:29

name because i just put the name when i

22:31

found it with the string

22:33

so you know it is here but you would

22:35

usually go through these

22:36

if you find this as an easier option and

22:38

once you scroll through these you should

22:40

find the process event one which we did

22:42

in fact find

22:43

so bravo

22:46

so yes we did find in fact the correct

22:49

process event

22:50

because there is another one but we

22:52

didn't search for that so we have the g

22:54

name g object g world and the process

22:56

event all in bytes because bytes are

22:58

better than offsets in my opinion

23:01

so there is that so we are done the

23:03

first part

23:04

needed in reversing my friends game or

23:07

your game

23:09

so that's the end of this part the next

23:10

part will involve

23:12

updating an sd update oh god my words

23:16

updating the sdk gen to

23:19

you know the correct uh [ __ ] classes

23:22

or whatever

23:23

uh through reclass and through you know

23:26

visual studio the project we make i'll

23:29

show you how to update the patterns and

23:31

stuff the sdk gens i use which are

23:34

basically both from connector but one of

23:36

them's a little modified that someone

23:37

posted so that's pretty good

23:39

i like that but yeah so we have the most

23:42

important

23:43

patterns that we need and hopefully to

23:45

shed some light on how to

23:46

find them my method i'm no expert but

23:50

you know

23:50

and uh yeah i'll see you all later

UNLOCK MORE

Sign up free to access premium features

INTERACTIVE VIEWER

Watch the video with synced subtitles, adjustable overlay, and full playback control.

SIGN UP FREE TO UNLOCK

AI SUMMARY

Get an instant AI-generated summary of the video content, key points, and takeaways.

SIGN UP FREE TO UNLOCK

TRANSLATE

Translate the transcript to 100+ languages with one click. Download in any format.

SIGN UP FREE TO UNLOCK

MIND MAP

Visualize the transcript as an interactive mind map. Understand structure at a glance.

SIGN UP FREE TO UNLOCK

CHAT WITH TRANSCRIPT

Ask questions about the video content. Get answers powered by AI directly from the transcript.

SIGN UP FREE TO UNLOCK

GET MORE FROM YOUR TRANSCRIPTS

Sign up for free and unlock interactive viewer, AI summaries, translations, mind maps, and more. No credit card required.