User Tools

Site Tools


godot_reverse_engineering

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
godot_reverse_engineering [2025/05/17 21:47] – winwinnergodot_reverse_engineering [2026/03/25 13:49] (current) – winwinner
Line 1: Line 1:
-decomp using https://github.com/GDRETools/gdsdecomp+{{keywords>godot,ghidra,decompilation,encryption,REC,Anomalous coffee machine,gdsdecomp}}
  
 +====== De-compiling encrypted Godot games ======
  
-====== Anomalous coffee machine ======+de-compile using https://github.com/GDRETools/gdsdecomp 
 + 
 +===== Instructions ===== 
 + 
 +  * load the binary you want to decompile in ghidra 
 +  * click search->for instruction patterns 
 +  * click enter bytes manually 
 +  * input the following hex after changing it to hex mode 
 + 
 +<code> 
 +48 85 c0 
 +0f 84 00 00 00 00 
 +48 83 78 00 20 
 +0f 85 00 00 00 00 
 +</code> 
 + 
 +  * click apply 
 +  * click the O(mask all operands) 
 +  * uncheck the 0x20 in the CMP 
 +{{:ghidra-godot-dark-mode-key-match.png?direct&400|}} 
 +  * click find all 
 +  * click the only result (if this changes in the future just know that if you decompile the function it should have "p_key.size() != 32" in an error code.) 
 +  * take note of which register is being tested 
 +  * load the game in a debugger and set a break point for the test address 
 +  * read 32 bits from the pointer at the address being tested 
 + 
 +linux debug steps for windows game: 
 +<code> 
 +winedbg your_game.exe 
 + 
 +Wine-dbg>break *0x140cf1d67 (example address for REC) 
 +Breakpoint 1 at 0x00000140cf1d67 rec+0xcf1d67 
 +Wine-dbg>cont 
 +Stopped on breakpoint 1 at 0x00000140cf1d67 rec+0xcf1d67 
 +Wine-dbg>disassemble 
 +0x00000140cf1d67 rec+0xcf1d67: testq %rdx, %rdx (note the rdx register being tested) 
 +...(rest of the disassemble) 
 +Wine-dbg>x /32b $rdx (read 32 bytes out of the address contained in rdx) 
 +0x007f9bde7c7ab0:  5e 0e 4d e3 a9 01 9f 0b 92 a8 f9 35 cf c4 4e 7a 
 +0x007f9bde7c7ac0:  4b 5f 3a 14 20 1b 47 7d f8 96 5d ba 67 18 97 39 
 +</code> 
 + 
 +windows: 
 +<code> 
 +todo 
 +</code> 
 + 
 + 
 + 
 +===== Examples ===== 
 + 
 +==== Anomalous coffee machine ====
  
 url: https://horubrain.itch.io/anomalous-coffee-machine url: https://horubrain.itch.io/anomalous-coffee-machine
Line 14: Line 66:
 957aba86a4f9009237ccc763f22c8bfda51c9794f0db7749360591987c0dea49  957aba86a4f9009237ccc763f22c8bfda51c9794f0db7749360591987c0dea49 
 </code> </code>
 +
 +==== REC ====
 +
 +url: https://moondev64.itch.io/rec
 +
 +godot version: 4.4.1
 +
 +key extracted from version: 0.5.0.2
 +
 +encryption key(windows):
 +<code>
 +5e0e4de3a9019f0b92a8f935cfc44e7a4b5f3a14201b477df8965dba67189739
 +</code>
 +
godot_reverse_engineering.1747514830.txt.gz · Last modified: by winwinner

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki