Need Help Understanding Chunk of Code

Programming related discussions related to game research
Arefu
Posts: 3
Joined: Thu Feb 15, 2018 9:39 pm

Need Help Understanding Chunk of Code

Post by Arefu »

https://pastebin.com/iGwhCEV8


I see that this is the function I presume to be loading a lot of the game's core files, I can't seem to work out where it actually opens these files, the Load_File_To_PTR is strange, I can't see anywhere where it would be calling fopen or fopen_s, I've found out when the game runs it stores the result of that func to a vairable which points to memory.

I want to see how it lays out the data structure to read these files myself so I can make a program that lets people edit them.
But I can't figure it out, this is for my project; https://github.com/Arefu/Wolf/
Arefu
Posts: 3
Joined: Thu Feb 15, 2018 9:39 pm

Re: Need Help Understanding Chunk of Code

Post by Arefu »

So after a tad bit more research

Code: Select all

v4 = Load_File_To_Ptr(&Memory, "bin/CARD_INTID_YGO2.bin");

v4 is assigned the location in memory that Load_File_To_Ptr returns, it seems to be poking the whole file in memory, but I need to figure out how it's loading the other files and parsing their structures so I can manipulate them.