Rybka 1.0 source code

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
User avatar
Rebel
Posts: 4543
Joined: Thu Aug 18, 2011 10:04 am

Rybka 1.0 source code

Post by Rebel » Tue Jan 31, 2012 7:44 pm

With the help of the Hex-rays decompiler you can download the C-source code of Rybka 1.0 Beta and now with the Fruit source code left, the Rybka source code right decide yourself what was copied and what not.

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.

Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.

The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.

Since publishing disassembled work of others is forbidden by EU law I asked Vas for permission to publish the Rybka 1.0 sources and he did not hesitate for one moment.

Download link at: http://www.top-5000.nl/sourcecode.htm

Ed

Terry McCracken
Posts: 15844
Joined: Wed Aug 01, 2007 2:16 am
Location: Canada

Re: Rybka 1.0 source code

Post by Terry McCracken » Tue Jan 31, 2012 8:07 pm

Nope, no one is safe anymore. This problem could have been averted if the computer chess community hadn't been asleep and caught with their pawns down.
Terry McCracken

Daniel Shawul
Posts: 3724
Joined: Tue Mar 14, 2006 10:34 am
Location: Ethiopia
Contact:

Re: Rybka 1.0 source code

Post by Daniel Shawul » Tue Jan 31, 2012 8:08 pm

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.
Hex-rays is one badass decompiler. The source code it produces is very much readable once you get used to the style. I have successfully used it to find a _bug_ that made my engine a lot more weaker. I had only an exe of the good version at that time.

The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do). Decompiling compiled c code is going the same route...

Lion
Posts: 509
Joined: Fri Mar 31, 2006 11:26 am
Location: Switzerland

Re: Rybka 1.0 source code

Post by Lion » Tue Jan 31, 2012 9:03 pm

Thanks!
I have no competence in programming do I will ask you what is your own opinion ?

User avatar
rvida
Posts: 481
Joined: Thu Apr 16, 2009 10:00 am
Location: Slovakia, EU

Re: Rybka 1.0 source code

Post by rvida » Tue Jan 31, 2012 9:36 pm

Rebel wrote: Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file.
lol, really "scientific" reasoning :roll:

If program XX is single long C-file, and hexrays produces one long C-file => conclusion: program XX was for sure produced by hexrays... Sure there is no other way to have a long C-file...

copy *.c bigfile.c
regards

melajara
Posts: 213
Joined: Thu Dec 16, 2010 3:39 pm

Re: Rybka 1.0 source code

Post by melajara » Tue Jan 31, 2012 9:48 pm

Daniel Shawul wrote:
...
The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do).
I disagree. Java decompilers so far are (sometimes) unable to

1, decipher actual type from base type on method's arguments
2, correctly resolve local variables
3, correctly handle exceptions and finally clauses.

Even worse, sometimes they produce syntactically correct (i.e. compilable) code but semantically wrong code
(e.g. erroneous loops reconstruction when facing an irreducible control flow graph or even missing static initializations).

This is so for the venerable jad, jd, fernflower and the academic dava.

Furthermore, no one has been updated to Java7
Per ardua ad astra

bob
Posts: 20408
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob » Tue Jan 31, 2012 10:06 pm

Terry McCracken wrote:Nope, no one is safe anymore. This problem could have been averted if the computer chess community hadn't been asleep and caught with their pawns down.
I don't think it is a matter of "sleeping" or "getting caught". This has been inevitable for many years. And has been possible for a few years...

bob
Posts: 20408
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob » Tue Jan 31, 2012 10:09 pm

Rebel wrote:With the help of the Hex-rays decompiler you can download the C-source code of Rybka 1.0 Beta and now with the Fruit source code left, the Rybka source code right decide yourself what was copied and what not.

The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.

Without much doubt it also explains how the Rybka 3 hackers created Ippolit as the original Ippolit source code came in one long C-file created by the Hex-rays decompiler, like the source code of Rybka 1.0 Beta offered on this page comes as one long C-code file. It confirms what many already noticed, parts of the Ippolit source code are computer generated and indeed the Hex-rays decompiler does exactly that.

The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.

Since publishing disassembled work of others is forbidden by EU law I asked Vas for permission to publish the Rybka 1.0 sources and he did not hesitate for one moment.

Download link at: http://www.top-5000.nl/sourcecode.htm

Ed
Before I look at such a mess in any depth, is this a 32 bit decompile? Sure looks like it, and it is actually (to me) harder to read than the asm code. Messy doesn't begin to describe this...

bob
Posts: 20408
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: Rybka 1.0 source code

Post by bob » Tue Jan 31, 2012 10:10 pm

Daniel Shawul wrote:
The Hex-rays decompiler creates surprisingly well readable code extracted from the Rybka 1.0 executable or any other executable for that matter.
Hex-rays is one badass decompiler. The source code it produces is very much readable once you get used to the style. I have successfully used it to find a _bug_ that made my engine a lot more weaker. I had only an exe of the good version at that time.

The Java decompilers produce such a readable code I don't feel the need to store source code of my java projects anymore (the jar file will do). Decompiling compiled c code is going the same route...
It is not so easy to read if it is a completely stripped executable. You get no variable names, no procedure names, just a LOT of difficult to read stuff...

Would be fun to take something known, compile it and then decompile it, to see how close it looks...

User avatar
towforce
Posts: 9204
Joined: Wed Mar 08, 2006 11:57 pm
Location: Birmingham UK

Re: Rybka 1.0 source code

Post by towforce » Tue Jan 31, 2012 10:16 pm

Rebel wrote:The bad news is that any program may become the target of hackers. I received decompiled versions of Hiarcs, Rybka 4 and others. Nobody is safe any longer.
Expect proprietary code with creative methods to increasingly be hosted on servers - where hackers cannot easily read it.

This is also a good thing for customers if rarely used code can be paid for on a usage basis. Also running hosted code is usually more convenient than installing a program on one's own computer.

It also eliminates pesky maintenance and compatibility issues.
"free speech requires rules to filter the functional from the dysfunctional" - link
Expect nothing. Appreciate everything!

Post Reply