[WIP] Silkroad's GFXFileManager API

06/18/2012 07:28 pushedx#1
This is something I started working on recently for fun. The idea is to get rid of PK2s and be able to use free/loose files (for development) or a custom archive format (for pservers). It's still under heavy development, but I have made some interesting progress. I can start the game via a launcher and play normally without any PK2s (in my video, I start through OllyDbg).

Video:
(watch in 1080p!)

Pros:
  • All PK2 tools / hex edits are useless (with a custom format that aims to eliminate them).
  • GFXFileManager can now be properly protected with protections that make use of code macros.
  • New security measures can be implemented into the DLL to provide more security alongside the client and other injected DLLs.

Cons:
  • Full API support for GFXFileManager writing and reading will take some time and a lot of testing to get it 'stable'.
  • Client interface cannot be easily changed, as you would have to codecave everything and handle new logic in an injected DLL.
  • If someone dedicates to reversing your new format and releases the tools to work with it, you are back to square 1 (so stopping this should be the main focus).

I just want to mention that this idea is nothing new. I played around with the concept a long time ago as did a few others (0x33 days). However, there was no real use for it back then compared to now. Being able to extract PK2s and then import them back using tools was good enough.

With server files released now, a custom file format would give people a real challenge compared to looking for blowfish keys or any other minor changes in PK2 handling. However, it comes at a great expense because it would have to be thoroughly tested and checked to make sure there are no flaws that would lead for the file format to be easily reversed.

I have a few ideas for some things, but I'm not sure I'll actually carry them out, as it's a lot of work I might not even use. I thought I'd still share it though. I'll post more updates in this thread later as they come along.
06/18/2012 11:06 theonly112#2
As always really cool work. Finally no more importing... exporting.... just to test something.

Hopefully you'll realease it. ^^
06/18/2012 13:15 LastThief*#3
O_O : that's all what I can say
06/18/2012 14:57 Nezekan#4
Déjà vu
06/18/2012 20:37 ZiCo*#5
HE IZ OP xDDD
06/18/2012 21:58 ÑõÑ_Ŝŧóp#6
amazing :O
06/19/2012 05:06 pushedx#7
Another update. I think I have most of the crashes and instability issues fixed. I've not had any crashes or lockups since applying the updates. Silkroad.exe is now supported for non-patching and just starting the game. Using an unmodified client with Hack Shield does not yield any disconnects.

There is one bug I'm trying to figure out though. Some GUI elements have white textures instead of showing up normally. I'm not sure what is causing it, because the files that are used exist and show up fine in my DDJ viewer. I'll have to work that one out as it's quite odd.

Video:
06/20/2012 13:21 PortalDark#8
this is amazing
i hate that there is no more people like you(at least that share)
keep going and good luck
06/20/2012 15:12 ÑõÑ_Ŝŧóp#9
Quote:
Originally Posted by PortalDark View Post
i hate that there is no more people like you(at least that share)
well,since server files was released,every kid is acting like a pro in sro scene,even with no knowledge at all,they only know editing pk2s and database and they think they are pros,the sad truth is the community think they are pros,too...
most of them use PK2 tools at example and they even know who coded them...
Can you count developers who didn't quite sro scene yet?
who will like such a release? these kids? don't think so... thats why such great project is ignored.. 2bad
06/20/2012 21:35 PortalDark#10
Quote:
Originally Posted by ÑõÑ_Ŝŧóp View Post
well,since server files was released,every kid is acting like a pro in sro scene,even with no knowledge at all,they only know editing pk2s and database and they think they are pros,the sad truth is the community think they are pros,too...
most of them use PK2 tools at example and they even know who coded them...
Can you count developers who didn't quite sro scene yet?
who will like such a release? these kids? don't think so... thats why such great project is ignored.. 2bad
well, i havent seen lots of those kids
you can recognoize a wannabepro or a real dev out of all those that come with releases here. And pushedx has proven that he is not the wannabe. He even prove that way before server files where public
Lots of other people out there are like pushedx(jamalauta, cherno, last, and if recall, you for example) had helped this community as well
06/20/2012 22:22 ÑõÑ_Ŝŧóp#11
Quote:
Originally Posted by PortalDark View Post
well, i havent seen lots of those kids
you can recognoize a wannabepro or a real dev out of all those that come with releases here. And pushedx has proven that he is not the wannabe. He even prove that way before server files where public
Lots of other people out there are like pushedx(jamalauta, cherno, last, and if recall, you for example) had helped this community as well
I didn't mean pushedx with my speech,seriously i have seen a releases with such queries "select * from _Char where CharName = 'YOUR_CHAR_NAME_HERE'"
and they call that a release,ppl reply with "thanks! you are awesome! you are pro! omg you are amazing!! amazing query!!" srsly what happened to sro scene?!
every time I check epvpers I feel very sad about this section because of these wannabe's...
anyway,I hope my speech changes something...
06/20/2012 23:03 PortalDark#12
Quote:
Originally Posted by ÑõÑ_Ŝŧóp View Post
I didn't mean pushedx with my speech,seriously i have seen a releases with such queries "select * from _Char where CharName = 'YOUR_CHAR_NAME_HERE'"
and they call that a release,ppl reply with "thanks! you are awesome! you are pro! omg you are amazing!! amazing query!!" srsly what happened to sro scene?!
every time I check epvpers I feel very sad about this section because of these wannabe's...
anyway,I hope my speech changes something...
you hold truth on your words
kids this days consider 2-3 queries to assign silks/pluses to be a release
i completely get your words now
06/23/2012 09:29 kevin_owner#13
Awesome! This will make it a lot easier for pk2 editors to tryout new stuff.

About the new formats instead of using the .pk2 files. Can't you just call the GFXFileManager's method's to get the files you want? and if they decide to change the file format you just copy the new GFXFilemanager?
06/23/2012 18:23 PortalDark#14
pushedx
with this kind of API, could it be used to compress even more the client?(lets say using a compressing method like 7z)
06/24/2012 19:04 Nezekan#15
Quote:
Originally Posted by PortalDark View Post
pushedx
with this kind of API, could it be used to compress even more the client?(lets say using a compressing method like 7z)
Everything is possible, but I wonder why you would want to do that. The files need to be loaded in as quickly as possible, and compression algorithms are certainly not built for speed, the client isn't that big anyway, the only reason you might want it to be smaller is for distribution but you'd not need this project for that