Solver Posted October 20, 2012 Share Posted October 20, 2012 Those are names, not indices. UE Explorer shows those function indices under "index". And these still wouldn't make sense. Link to comment Share on other sites More sharing options...
Solver Posted October 20, 2012 Share Posted October 20, 2012 (edited) Aha, yes, the object lengths are the problem, the offsets are being stored somewhere within the class, even though it's not immediately obvious. Duh, an idiot, should have realized that at once. EDIT: Okay, definite conclusion - changing functions in a way that also modifies their length is a pain. You have to pad them, and that still messes up some names somehow. An actual compiler would be better :D Edited October 20, 2012 by Solver Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 So, have you just been editing the UPKs in a hex editor, or using a repacking tool? I guess we need (in the short term) to figure out what the UPK format is, so we can change the function sizes. Maybe Gildor's tools are open source, or the format is documented somewhere. Link to comment Share on other sites More sharing options...
Solver Posted October 20, 2012 Share Posted October 20, 2012 Hex editor only. I assume if UPKs just used a simple LZO compression, a repackaging tool would have been available by now. Besides, it doesn't seem all that important to compress them per se, the important part seems to be to have a compiler for the scripts. Link to comment Share on other sites More sharing options...
kanet32 Posted October 20, 2012 Share Posted October 20, 2012 The reason I ask is because I think now that the UPKs aren't simple file archives. They must include metadata about the functions and classes stored in them. Hence why I'm assuming figuring out the UPK format will help us figure out how to change the stored object lengths. (Although, honestly, even if all they DID store were files, I would assume changing the lengths of those files would affect how the archive was parsed. I'm assuming the lengths of files in most archive formats isn't implicit.) Link to comment Share on other sites More sharing options...
dreadylein Posted October 20, 2012 Share Posted October 20, 2012 (edited) in theory the ue engine is able to cook source, their isnt a dedicatet editor, game engine, compiler etc, its just one binary for everything, but i dont have a clue if they just make code unreachable or completly strip them when compiling a retail build But you said something intressting mhmAnyone tried it with unpacking and repacking ? I just read it but if i remember right the upks has a list with offsets for all his data, if we extend one function we pretty much screw up every following, didnt realy looked into it so its more or less just a rumor for now :P Edited October 20, 2012 by dreadylein Link to comment Share on other sites More sharing options...
Solver Posted October 20, 2012 Share Posted October 20, 2012 Aren't upk files used in all Unreal engine games? If so, I'd expect the format to be well known - the engine itself has been used in an absolute truckload of games. Link to comment Share on other sites More sharing options...
dreadylein Posted October 20, 2012 Share Posted October 20, 2012 (edited) yes, its quite known, but changes from game to game slighty As i see it in another thread, Solver, how exactly did the game crash, on startup ? Btw hate the UE SDK wiki There a links for the bytecode, upk formate, the interpreter and everything, but only for licenses :D Edit: Well uhmRight out of the Readme of upk unpacker/repacker [[ What this? ]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] This program is performs unpack/re-pack the package file (UPK) of unreal engine3 (UE3).You can replace the unpacked file and can re-pack to UPK.(In re-pack processing, it does not support to an addition and deletion of a file.) * This program does not run on the UPK file of all UE3-games, since the format of a UPK file changes a little with games. Maybe we should try this :o Edited October 20, 2012 by dreadylein Link to comment Share on other sites More sharing options...
Solver Posted October 20, 2012 Share Posted October 20, 2012 Crashes I've had so far are that the game crashes on startup if the functions are not at the expected offsets within a class, or if the name of the function does not match the name which is referred to near the end of the function bytecode - byte number 0x45 in the two functions I posted. Link to comment Share on other sites More sharing options...
twinj Posted December 19, 2012 Share Posted December 19, 2012 (edited) Interesting thread. Will have took at the size issue more I think. Has anyone made any progress on upk headers? Edited December 19, 2012 by twinj Link to comment Share on other sites More sharing options...
Recommended Posts