Giter VIP home page Giter VIP logo

cocos2dx-xxtea-decryptor's Introduction

cocos2dx-xxtea-decryptor

cocos2dx xxtea source decryptor (LUAC, JSC and more)

Release binary was built in x86 mode, output path of decrypted file will be located in the "parent directory+\out" folder of the file/director

Usage: exeName.exe [key] [sign] [input file/dir]

How to find xxtea key:

Search for decrypt function in the cocos2dx binary, and hook using frida, 3rd argument is normally the key

EXAMPLE FRIDA SCRIPT TO DUMP XXTEA KEY

The decompiled function should look similar to this, left side code is from here image image

var module_name_libcocos2dlua_so='libcocos2dlua.so';  //change libcocos2dlua.so to the correct binary name

function start_timer_for_intercept() {
  setTimeout(
    function() {
      var offset_of_xxtea_decrypt_00a5be08=0x95be08;//update offset of decrypt function to the correct one <- can be found using ghidra
      var dynamic_address_of_xxtea_decrypt_00a5be08=Module.findBaseAddress(module_name_libcocos2dlua_so).add(offset_of_xxtea_decrypt_00a5be08);
      Interceptor.attach(dynamic_address_of_xxtea_decrypt_00a5be08, {
                 onEnter: function(args) {
                    console.log("Entered xxtea_decrypt_00a5be08");
                    console.log("[key]-> " + args[2].readCString()) // print XXTEA key 
                    //console.log('args[0]='+args[0]+' , args[1]='+args[1]+' , args[2]='+args[2]+' , args[3]='+args[3]+' , args[4]='+args[4]);
                    // this.context.x0=0x1;
                  },
                  onLeave: function(retval) {
                    //console.log("Exited xxtea_decrypt_00a5be08, retval:"+retval);
                    // retval.replace(0x1);
                  }
       });
    }, 2000);//milliseconds
}
start_timer_for_intercept();

How to find xxtea sign:

open multiple encrypted files in a text editor, they should have a common string at the start of the file, that is the sign image

In this example the key is "akskees"

cocos2dx-xxtea-decryptor's People

Contributors

lambwheit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.