d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Need Reverse Engineer Pro
12Next
Add Reply New Topic New Poll
Member
Posts: 27,518
Joined: May 10 2009
Gold: 13,891.00
Jun 17 2014 11:40pm
I AM WILLING TO PROVIDE SOME KIND OF INCENTIVE FOR THIS PROJECT.

Problem:

Rewrite
https://github.com/DarkstarProject/darkstar/blob/master/src/common/zlib.cpp
and
https://github.com/DarkstarProject/darkstar/blob/master/src/common/zlib.h

To work in an architecture and platform-independent way, preferably with some documentation on what it is really doing and how it is accomplished. Code currently only works properly on x86 platforms despite efforts to replicate it to at minimum work on x86_64. Final code should compile with any C++11 and/or C99 compliant compiler.

Please let me know (post or PM) if you are interested
So thankful for any help. So thankful

Even advice would be nice.
This problem has existed for months on months.
Anyone will the knowledge should be able to figure this out pretty quick.

This post was edited by Stealth on Jun 17 2014 11:42pm
Member
Posts: 27,518
Joined: May 10 2009
Gold: 13,891.00
Jun 18 2014 12:18am
Even any advice would be amazing!

If you know someone who knows someone....

I gotta get this figured out :(

Thank you!
Member
Posts: 24,488
Joined: Jul 11 2011
Gold: 1,272.50
Jun 18 2014 01:18am
Wait, so you want it re-written for x64?
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 18 2014 01:23am
What are you trying to accomplish here? Arch linux has a x86_64 binary of zlib...
Member
Posts: 27,518
Joined: May 10 2009
Gold: 13,891.00
Jun 19 2014 12:36am
Try to answer best I can

I want it written architecture-independent
that means it needs to compile on x86, x86_64, ARM, MIPS, or whatever else you throw at it

it *says* its zlib but if you look at it its not actually a zlib function
I did not write the code...it appears to be reverse-engineered from the ffxi client
if I understood what it was actually doing then I would at least have a starting point.

but as it stands it is just a black box function that has been in the code since long before I even started working on the project
Member
Posts: 13,425
Joined: Sep 29 2007
Gold: 0.00
Warn: 20%
Jun 19 2014 12:35pm
What exactly are you trying to do. You can cross compiles zlib already...

Code
#download zlib and extract it
cd zlib-x.x.x

#static
CC=arm-linux-gcc
./configure --prefix=/usr

#dynamic
#CC=arm-linux-gcc
#LDSHARED="arm-linux-gcc -shared -Wl,-soname,libz.so.1"
#./configure --shared --prefix=/usr

make
make install prefix=<root-directory>


Are you trying to compile the library once and have it magically work on all platforms?
Member
Posts: 3
Joined: Jun 19 2014
Gold: 0.00
Jun 19 2014 02:17pm
If you look carefully at the task and the actual code, you will see that this code is NOT zlib, and does not work in a way that is similar to zlib. I did a small test and the output it produces is nothing near anything zlib would produce, so go ahead and ditch the notion that this has anything to do with the actual zlib library. It appears to be a compression algorithm that makes use of custom dictionaries, which are also available at the original repository provided:

https://github.com/DarkstarProject/darkstar/blob/master/compress.dat
https://github.com/DarkstarProject/darkstar/blob/master/decompress.dat

If the functions can be reproduced using the official zlib, I don't see how.

As for compiling, if you notice it says it needs to *compile* on any platform, not *run* on any platform, plus the project in question has build systems in place for both windows and *nix systems which already build those files as part of the project.
Member
Posts: 27,518
Joined: May 10 2009
Gold: 13,891.00
Jun 21 2014 09:13am
We need your help!
The above post was not a solution. It was explaining the problem in detail

This post was edited by Stealth on Jun 21 2014 09:13am
Member
Posts: 11,610
Joined: Oct 28 2008
Gold: 1,795.00
Jun 21 2014 01:14pm
Quote (Stealth @ Jun 21 2014 09:13am)
We need your help!
The above post was not a solution. It was explaining the problem in detail


Problem being you can't compile anything? That doesn't seem like an issue any one of us can fix.
Member
Posts: 3
Joined: Jun 19 2014
Gold: 0.00
Jun 21 2014 07:34pm
The code compiles on x86. The code even compiles on other architectures (at least x86_64 under both gcc and MSVC12), but it doesn't have the right output on anything other than x86 (which makes it kind of useless). I can even tell you more or less *why* it doesn't have the right output on other architectures (the fixed 32-bit constants being used should be a clue), but without having more insight on what its trying to do I lack the skills to fix it by any method other than brute force. It needs to be rewritten so no matter where it runs or what architecture/platform it runs on it produces the same output as these functions produce on the x86 platform.

It is not helpful to respond if you are not going to even try to understand the problem before doing so.
Go Back To Programming & Development Topic List
12Next
Add Reply New Topic New Poll