Jump to content

How to Hack & Crack Unity Game Coding with LuaJIT/Lua5.3


caoyin

9 posts in this topic

Recommended Posts

To save time Many game-developer are trying to make unity game with some third-part lua plugin such as Slua or Xlua In this developing mode the source code are not in Ida but in lua script compressed in unity bundle asset.I found that many hackers dont know much about how to crack such game.so i decided to make a tut for that in detail and share my own lua tool to help you read rua bytecode.you cant find such tool anywhere except here. 

Slua github:https://github.com/leinlin/slua

Xlua:https://github.com/Tencent/xLua

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Luajit wiki:http://wiki.luajit.org/Bytecode-2.0  ;explaining how the luajit Vm bytecode work is complicated so please study it on your own

Luajit dis-asm tool: https://armconverter.com/luatools/ or https://iosddl.net/2d385e1427003585/jit.rar
Usage:luajit -blg XXX

Luajit example:https://imgur.com/vKWVyrZ

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The lua dis-asm tool are only work on lua version 5.3.5 The lastest version is 5.4 i will keep updating and sharing it to public

Lua5.3.5 wiki:https://the-ravi-programming-language.readthedocs.io/en/latest/lua_bytecode_reference.html

Lua5.3.5 dis-asm tool:https://iosddl.net/82d5111f913c37bc/luac.exe

Lua5.3.5 example:https://imgur.com/JsjfWdm

Usage:
  -l       list bytecode
  -d       decompile bytecode
  -i       dump instruction
  -o name  output to file 'name' (default is "luac.out")
  -p       parse only
  -s       strip debug information
  -v       show version information
  --       stop handling options
  -        stop handling options and process stdin
  -iABC    make a iABC instruction
  -iABx    make a ABx  instruction
  -iAsBx   make a AsBx instruction
  -iAx     make a iAx instruction

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

//inject code example

#include <Foundation/Foundation.h>
#include "Config.h"
#include <sys/socket.h> 
#import <AudioToolbox/AudioToolbox.h>
#include <sys/sysctl.h>
#import <AdSupport/ASIdentifierManager.h> 
#import "MediaPlayer/MPVolumeView.h"
#import "AudioToolbox/AudioToolbox.h"
#include <sys/stat.h>
#include <mach-o/dyld.h>
#include <mach-o/dyld.h>
#include <mach-o/ldsyms.h>
#include <OpenGLES/ES2/gl.h>
#include <OpenGLES/ES2/glext.h>
#include <vector>
# include <stdio.h>
# include <stdlib.h>

//modified lua script with winhex
unsigned char data[3410] = {
  0x2D, 0x2D, 0x20, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 0xB3, 0xE8, 0xAE, 0xA1, 0xE7, 0xAE, 0x97, 0x0D, 
  0x0A, 0x66, 0x75, 0x6E, 0x63, 0x74, 0x69, 0x6F, 0x6E, 0x20, 0x63, 0x61, 0x6C, 0x63, 0x75, 0x6C, 
  0x61, 0x74, 0x65, 0x44, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x28, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 
  0x5F, 0x74, 0x79, 0x70, 0x65, 0x2C, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x2C, 0x20, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2C, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x29, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x2D, 0x2D, 
  0x5B, 0x5B, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 
  0x20, 0x30, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x64, 0x61, 
  0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x2E, 0x38, 0x0D, 
  0x0A, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x5F, 0x74, 
  0x79, 0x70, 0x65, 0x20, 0x3D, 0x3D, 0x20, 0x42, 0x41, 0x54, 0x54, 0x4C, 0x45, 0x5F, 0x41, 0x54, 
  0x54, 0x41, 0x43, 0x4B, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 0x50, 0x48, 0x59, 0x53, 0x49, 0x43, 
  0x41, 0x4C, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 
  0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x70, 0x68, 0x79, 0x73, 
  0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 0x20, 0x2F, 0x20, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 
  0x61, 0x6C, 0x5F, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x65, 
  0x6C, 0x73, 0x65, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x65, 
  0x66, 0x65, 0x6E, 0x73, 0x65, 0x20, 0x2F, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 
  0x6F, 0x6D, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x0D, 
  0x0A, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 
  0x69, 0x66, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3E, 
  0x20, 0x30, 0x2E, 0x38, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 
  0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 
  0x20, 0x30, 0x2E, 0x38, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 
  0x0A, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x61, 0x74, 
  0x74, 0x61, 0x63, 0x6B, 0x20, 0x2A, 0x20, 0x28, 0x31, 0x20, 0x2D, 0x20, 0x64, 0x61, 0x6D, 0x61, 
  0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x29, 0x0D, 0x0A, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 
  0x72, 0x65, 0x74, 0x75, 0x72, 0x6E, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5D, 0x5D, 0x0D, 
  0x0A, 0x09, 0x0D, 0x0A, 0x09, 0x2D, 0x2D, 0x20, 0xE6, 0x94, 0xBB, 0xE5, 0x87, 0xBB, 0xE5, 0x8A, 
  0x9B, 0xE5, 0x80, 0xBC, 0xE4, 0xBF, 0xAE, 0xE5, 0xA4, 0x8D, 0xEF, 0xBC, 0x8C, 0xE9, 0x98, 0xB2, 
  0xE6, 0xAD, 0xA2, 0xE5, 0x87, 0xBA, 0xE7, 0x8E, 0xB0, 0x30, 0x2F, 0x30, 0xE7, 0x9A, 0x84, 0xE6, 
  0x83, 0x85, 0xE5, 0x86, 0xB5, 0x0D, 0x0A, 0x09, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x20, 0x3D, 
  0x20, 0x6D, 0x61, 0x74, 0x68, 0x2E, 0x6D, 0x61, 0x78, 0x28, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 
  0x2C, 0x20, 0x31, 0x29, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 
  0x6C, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 
  0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE5, 0x87, 0x8F, 0xE5, 0x85, 0x8D, 0xE4, 0xBC, 0xA4, 
  0xE5, 0xAE, 0xB3, 0x20, 0x20, 0x20, 0x28, 0xE8, 0xAE, 0xA1, 0xE7, 0xAE, 0x97, 0xE4, 0xBC, 0xA4, 
  0xE5, 0xAE, 0xB3, 0xE5, 0x90, 0x8E, 0xEF, 0xBC, 0x8C, 0xE5, 0x8F, 0x97, 0xE4, 0xBC, 0xA4, 0xE6, 
  0x96, 0xB9, 0x29, 0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x72, 0x65, 0x64, 0x75, 
  0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 
  0x20, 0x31, 0x30, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE5, 0x87, 0x8F, 0xE5, 0x85, 0x8D, 0xE4, 0xBC, 
  0xA4, 0xE5, 0xAE, 0xB3, 0xE7, 0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x20, 0x28, 0xE8, 
  0xAE, 0xA1, 0xE7, 0xAE, 0x97, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 0xB3, 0xE5, 0x90, 0x8E, 0xEF, 0xBC, 
  0x8C, 0xE5, 0x8F, 0x97, 0xE4, 0xBC, 0xA4, 0xE6, 0x96, 0xB9, 0x29, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 
  0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 
  0xB3, 0xE5, 0x80, 0xBC, 0xE5, 0xA2, 0x9E, 0xE5, 0x87, 0x8F, 0x20, 0x28, 0xE8, 0xAE, 0xA1, 0xE7, 
  0xAE, 0x97, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 0xB3, 0xE5, 0x90, 0x8E, 0xEF, 0xBC, 0x8C, 0xE6, 0x94, 
  0xBB, 0xE5, 0x87, 0xBB, 0xE6, 0x96, 0xB9, 0x29, 0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 
  0x20, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 
  0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x31, 0x30, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE4, 0xBC, 0xA4, 
  0xE5, 0xAE, 0xB3, 0xE7, 0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0xE5, 0xA2, 0x9E, 0xE5, 
  0x87, 0x8F, 0x20, 0x28, 0xE8, 0xAE, 0xA1, 0xE7, 0xAE, 0x97, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 0xB3, 
  0xE5, 0x90, 0x8E, 0xEF, 0xBC, 0x8C, 0xE6, 0x94, 0xBB, 0xE5, 0x87, 0xBB, 0xE6, 0x96, 0xB9, 0x29, 
  0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 
  0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 0x20, 
  0xE6, 0x8A, 0xA4, 0xE7, 0x94, 0xB2, 0xE7, 0xA9, 0xBF, 0xE9, 0x80, 0x8F, 0x0D, 0x0A, 0x09, 0x6C, 
  0x6F, 0x63, 0x61, 0x6C, 0x20, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 
  0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE6, 0xB3, 0x95, 0xE6, 0x9C, 0xAF, 0xE7, 
  0xA9, 0xBF, 0xE9, 0x80, 0x8F, 0x0D, 0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x70, 0x68, 
  0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x5F, 0x72, 0x61, 
  0x74, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 0x20, 0xE6, 0x8A, 0xA4, 0xE7, 0x94, 0xB2, 
  0xE7, 0xA9, 0xBF, 0xE9, 0x80, 0x8F, 0xE7, 0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 
  0x0A, 0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x69, 0x6E, 
  0x67, 0x6F, 0x72, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x2D, 0x2D, 
  0x20, 0xE6, 0xB3, 0x95, 0xE6, 0x9C, 0xAF, 0xE7, 0xA9, 0xBF, 0xE9, 0x80, 0x8F, 0xE7, 0x99, 0xBE, 
  0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x2D, 0x2D, 0x20, 0xE6, 0x94, 
  0xBB, 0xE5, 0x87, 0xBB, 0xE6, 0x96, 0xB9, 0xE7, 0x9A, 0x84, 0xE6, 0x83, 0x85, 0xE5, 0x86, 0xB5, 
  0x0D, 0x0A, 0x09, 0x69, 0x66, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 
  0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x70, 0x68, 0x79, 0x73, 0x69, 
  0x63, 0x61, 0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 
  0x5F, 0x64, 0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 0x5F, 0x69, 0x67, 0x6E, 0x6F, 0x72, 0x65, 0x5F, 
  0x76, 0x61, 0x6C, 0x75, 0x65, 0x0D, 0x0A, 0x09, 0x09, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x69, 
  0x6E, 0x67, 0x6F, 0x72, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 
  0x6F, 0x6D, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 
  0x5F, 0x69, 0x67, 0x6E, 0x6F, 0x72, 0x65, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x0D, 0x0A, 0x09, 
  0x09, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 
  0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 
  0x6F, 0x6D, 0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 0x65, 0x66, 0x65, 
  0x6E, 0x73, 0x65, 0x5F, 0x69, 0x67, 0x6E, 0x6F, 0x72, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 
  0x2D, 0x2D, 0x20, 0xE6, 0x8A, 0xA4, 0xE7, 0x94, 0xB2, 0xE7, 0xA9, 0xBF, 0xE9, 0x80, 0x8F, 0xE7, 
  0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 0x0A, 0x09, 0x09, 0x6D, 0x61, 0x67, 0x69, 
  0x63, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 
  0x5F, 0x64, 0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 0x5F, 0x69, 0x67, 0x6E, 0x6F, 0x72, 0x65, 0x5F, 
  0x72, 0x61, 0x74, 0x65, 0x20, 0x2D, 0x2D, 0x20, 0xE6, 0xB3, 0x95, 0xE6, 0x9C, 0xAF, 0xE7, 0xA9, 
  0xBF, 0xE9, 0x80, 0x8F, 0xE7, 0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 0x0A, 0x09, 
  0x09, 0x0D, 0x0A, 0x09, 0x09, 0x69, 0x66, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x5F, 0x74, 
  0x79, 0x70, 0x65, 0x20, 0x3D, 0x3D, 0x20, 0x42, 0x41, 0x54, 0x54, 0x4C, 0x45, 0x5F, 0x41, 0x54, 
  0x54, 0x41, 0x43, 0x4B, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 0x50, 0x48, 0x59, 0x53, 0x49, 0x43, 
  0x41, 0x4C, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x09, 0x09, 0x63, 0x68, 0x61, 0x6E, 
  0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 
  0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x0D, 0x0A, 0x09, 0x09, 
  0x09, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 
  0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 
  0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 
  0x5F, 0x72, 0x61, 0x74, 0x65, 0x0D, 0x0A, 0x09, 0x09, 0x65, 0x6C, 0x73, 0x65, 0x0D, 0x0A, 0x09, 
  0x09, 0x09, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 
  0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x2E, 0x6D, 0x61, 0x67, 
  0x69, 0x63, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x0D, 
  0x0A, 0x09, 0x09, 0x09, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 
  0x72, 0x6F, 0x6D, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 
  0x5F, 0x72, 0x61, 0x74, 0x65, 0x0D, 0x0A, 0x09, 0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 
  0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x69, 0x66, 0x20, 0x61, 0x74, 
  0x74, 0x61, 0x63, 0x6B, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3D, 0x3D, 0x20, 0x42, 0x41, 0x54, 
  0x54, 0x4C, 0x45, 0x5F, 0x41, 0x54, 0x54, 0x41, 0x43, 0x4B, 0x5F, 0x54, 0x59, 0x50, 0x45, 0x5F, 
  0x50, 0x48, 0x59, 0x53, 0x49, 0x43, 0x41, 0x4C, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 
  0x09, 0x09, 0x09, 0x0D, 0x0A, 0x09, 0x20, 0x20, 0x20, 0x20, 0x2D, 0x2D, 0x20, 0xE5, 0x87, 0x8F, 
  0xE5, 0x85, 0x8D, 0x62, 0x75, 0x66, 0x66, 0xE6, 0x83, 0x85, 0xE5, 0x86, 0xB5, 0x0D, 0x0A, 0x09, 
  0x09, 0x2D, 0x2D, 0x20, 0xE7, 0x99, 0xBE, 0xE5, 0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 0x0A, 0x09, 
  0x09, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 
  0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 
  0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 
  0x61, 0x6C, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x0D, 0x0A, 
  0x0D, 0x0A, 0x09, 0x09, 0x2D, 0x2D, 0x20, 0x0D, 0x0A, 0x09, 0x09, 0x69, 0x66, 0x20, 0x64, 0x61, 
  0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6E, 0x6F, 0x74, 
  0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x3A, 0x69, 0x73, 0x4A, 0x69, 
  0x6E, 0x5A, 0x68, 0x61, 0x6E, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x09, 
  0x09, 0x2D, 0x2D, 0x20, 0xE8, 0xBF, 0x9C, 0xE7, 0xA8, 0x8B, 0x20, 0x20, 0x0D, 0x0A, 0x09, 0x09, 
  0x09, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 
  0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2A, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x73, 
  0x68, 0x6F, 0x6F, 0x74, 0x65, 0x72, 0x5F, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2F, 0x20, 0x31, 0x30, 
  0x30, 0x0D, 0x0A, 0x09, 0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x69, 0x66, 
  0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x72, 0x65, 
  0x64, 0x75, 0x63, 0x65, 0x5F, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 0x61, 
  0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x3D, 0x20, 0x30, 0x20, 0x74, 
  0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x09, 0x09, 0x2D, 0x2D, 0x20, 0xE7, 0x89, 0xA9, 0xE7, 0x90, 
  0x86, 0xE5, 0x85, 0x8D, 0xE7, 0x96, 0xAB, 0x0D, 0x0A, 0x09, 0x09, 0x09, 0x64, 0x61, 0x6D, 0x61, 
  0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x3A, 0x61, 0x64, 0x64, 0x53, 0x68, 0x6F, 0x77, 
  0x57, 0x6F, 0x72, 0x64, 0x28, 0x33, 0x2C, 0x20, 0x34, 0x37, 0x30, 0x30, 0x30, 0x33, 0x29, 0x0D, 
  0x0A, 0x09, 0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x2D, 0x2D, 0x20, 0xE6, 
  0x95, 0xB0, 0xE5, 0x80, 0xBC, 0x0D, 0x0A, 0x09, 0x09, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 
  0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x70, 0x68, 0x79, 
  0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x76, 0x61, 0x6C, 
  0x75, 0x65, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x2D, 0x2D, 0x20, 0xE7, 0xA9, 0xBF, 0xE9, 0x80, 
  0x8F, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x20, 0x3D, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x20, 0x2A, 0x20, 0x61, 0x74, 0x74, 
  0x61, 0x63, 0x6B, 0x20, 0x2F, 0x20, 0x28, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x20, 0x2B, 0x20, 
  0x6D, 0x61, 0x74, 0x68, 0x2E, 0x6D, 0x61, 0x78, 0x28, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 
  0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x64, 
  0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 0x20, 0x2A, 0x20, 0x28, 0x31, 0x30, 0x30, 0x20, 0x2D, 0x20, 
  0x70, 0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x5F, 
  0x72, 0x61, 0x74, 0x65, 0x20, 0x29, 0x20, 0x2F, 0x20, 0x31, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x70, 
  0x68, 0x79, 0x73, 0x69, 0x63, 0x61, 0x6C, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x2C, 0x30, 
  0x29, 0x29, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6C, 0x73, 0x65, 0x0D, 0x0A, 0x09, 0x09, 
  0x20, 0x2D, 0x2D, 0x20, 0xE5, 0x87, 0x8F, 0xE5, 0x85, 0x8D, 0x62, 0x75, 0x66, 0x66, 0xE6, 0x83, 
  0x85, 0xE5, 0x86, 0xB5, 0x0D, 0x0A, 0x09, 0x09, 0x20, 0x2D, 0x2D, 0x20, 0xE7, 0x99, 0xBE, 0xE5, 
  0x88, 0x86, 0xE6, 0xAF, 0x94, 0x0D, 0x0A, 0x09, 0x09, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 
  0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 
  0x65, 0x5F, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 
  0x61, 0x74, 0x65, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x69, 0x66, 0x20, 0x64, 0x61, 0x6D, 0x61, 
  0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x20, 0x61, 0x6E, 0x64, 0x20, 0x6E, 0x6F, 0x74, 0x20, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x46, 0x72, 0x6F, 0x6D, 0x3A, 0x69, 0x73, 0x4A, 0x69, 0x6E, 0x5A, 
  0x68, 0x61, 0x6E, 0x28, 0x29, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x09, 0x09, 0x2D, 
  0x2D, 0x20, 0xE8, 0xBF, 0x9C, 0xE7, 0xA8, 0x8B, 0x20, 0x20, 0x0D, 0x0A, 0x09, 0x09, 0x09, 0x72, 
  0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 
  0x65, 0x20, 0x3D, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2A, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 
  0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x73, 0x68, 0x6F, 
  0x6F, 0x74, 0x65, 0x72, 0x5F, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2F, 0x20, 0x31, 0x30, 0x30, 0x0D, 0x0A, 0x09, 0x09, 
  0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x09, 0x2D, 0x2D, 0x20, 0xE6, 0x95, 0xB0, 0xE5, 
  0x80, 0xBC, 0x0D, 0x0A, 0x09, 0x09, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 
  0x65, 0x74, 0x2E, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 
  0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x76, 0x61, 0x6C, 0x75, 0x65, 0x0D, 0x0A, 0x0D, 0x0A, 
  0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 
  0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x20, 0x2A, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 
  0x20, 0x2F, 0x20, 0x28, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x20, 0x2B, 0x20, 0x6D, 0x61, 0x74, 
  0x68, 0x2E, 0x6D, 0x61, 0x78, 0x28, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x61, 0x72, 0x67, 
  0x65, 0x74, 0x2E, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x64, 0x65, 0x66, 0x65, 0x6E, 0x73, 0x65, 
  0x20, 0x2A, 0x20, 0x28, 0x31, 0x30, 0x30, 0x20, 0x2D, 0x20, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 
  0x69, 0x6E, 0x67, 0x6F, 0x72, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x29, 0x20, 0x2F, 0x20, 0x31, 
  0x30, 0x30, 0x20, 0x2D, 0x20, 0x6D, 0x61, 0x67, 0x69, 0x63, 0x5F, 0x69, 0x6E, 0x67, 0x6F, 0x72, 
  0x65, 0x2C, 0x30, 0x29, 0x29, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 
  0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x0D, 0x0A, 0x09, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 
  0x3D, 0x20, 0x28, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x2B, 0x20, 0x63, 0x68, 0x61, 0x6E, 
  0x67, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x29, 0x20, 0x2A, 0x20, 0x72, 0x65, 0x64, 
  0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 
  0x2F, 0x20, 0x31, 0x30, 0x30, 0x20, 0x2A, 0x20, 0x63, 0x68, 0x61, 0x6E, 0x67, 0x65, 0x5F, 0x64, 
  0x61, 0x6D, 0x61, 0x67, 0x65, 0x5F, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2F, 0x20, 0x31, 0x30, 0x30, 
  0x20, 0x2D, 0x20, 0x72, 0x65, 0x64, 0x75, 0x63, 0x65, 0x5F, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 
  0x20, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x69, 0x66, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 
  0x3C, 0x20, 0x30, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x09, 0x64, 0x61, 0x6D, 0x61, 
  0x67, 0x65, 0x20, 0x3D, 0x20, 0x30, 0x20, 0x0D, 0x0A, 0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 0x09, 
  0x0D, 0x0A, 0x20, 0x20, 0x20, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 0x3D, 0x20, 0x30, 
  0x0D, 0x0A, 0x09, 0x2D, 0x2D, 0x20, 0xE8, 0xBF, 0x94, 0xE5, 0x9B, 0x9E, 0xE5, 0x8A, 0xA0, 0xE4, 
  0xB8, 0xAA, 0xE4, 0xBC, 0xA4, 0xE5, 0xAE, 0xB3, 0xE7, 0xB1, 0xBB, 0xE5, 0x9E, 0x8B, 0x0D, 0x0A, 
  0x09, 0x6C, 0x6F, 0x63, 0x61, 0x6C, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x4F, 0x62, 0x6A, 
  0x20, 0x3D, 0x20, 0x7B, 0x7D, 0x0D, 0x0A, 0x09, 0x69, 0x66, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x54, 0x61, 0x72, 0x67, 0x65, 0x74, 0x2E, 0x74, 0x65, 0x61, 0x6D, 0x20, 0x3D, 0x3D, 0x20, 
  0x32, 0x20, 0x74, 0x68, 0x65, 0x6E, 0x0D, 0x0A, 0x09, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x20, 
  0x3D, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x0D, 0x0A, 0x09, 0x65, 0x6E, 0x64, 0x0D, 0x0A, 
  0x09, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x4F, 0x62, 0x6A, 0x2E, 0x64, 0x61, 0x6D, 0x61, 0x67, 
  0x65, 0x20, 0x3D, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x0D, 0x0A, 0x09, 0x64, 0x61, 0x6D, 
  0x61, 0x67, 0x65, 0x4F, 0x62, 0x6A, 0x2E, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x54, 0x79, 0x70, 
  0x65, 0x20, 0x3D, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x6B, 0x5F, 0x74, 0x79, 0x70, 0x65, 0x20, 
  0x20, 0x2D, 0x2D, 0x20, 0xE7, 0x89, 0xA9, 0xE7, 0x90, 0x86, 0xEF, 0xBC, 0x8C, 0xE9, 0xAD, 0x94, 
  0xE6, 0xB3, 0x95, 0x0D, 0x0A, 0x20, 0x20, 0x20, 0x0D, 0x0A, 0x0D, 0x0A, 0x09, 0x72, 0x65, 0x74, 
  0x75, 0x72, 0x6E, 0x20, 0x64, 0x61, 0x6D, 0x61, 0x67, 0x65, 0x4F, 0x62, 0x6A, 0x0D, 0x0A, 0x65, 
  0x6E, 0x64
};

typedef int (*_luaL_loadbuffer)(void* L,
                     const char *buff,
                     size_t sz,
                     const char *name);
_luaL_loadbuffer luaL_loadbuffer;

typedef void* (*_luaL_newstate)();
_luaL_newstate luaL_newstate;


typedef int (*_lua_Writer) (void* L, const void* p, size_t sz, void* ud);
_lua_Writer lua_Writer;

typedef int (*_lua_dump) (void *L, _lua_Writer writer, void *data);
_lua_dump lua_dump;

int MemoryWriter(void* ls, const void* p, size_t sz, void* ud)
{
    writeToFile(p,sz);
    return 0;
}

typedef const char* (*_lua_tostring)(void *L, int index);
_lua_tostring lua_tostring;

int (*_loadbuffer)(void* L,
                     const char *buff,
                     size_t sz,
                     const char *name);

int i = 0; // used as dumped file name
//L = lua state
//buff = script bytecode
//sz = script size
//name = script name
int $loadbuffer(void* L,const char *buff,size_t sz,const char *name) //hook loading function to dump all script of game
{   
    /*dump lua script to documents folder
    std::string path(N2C(NSHomeDirectory()));  //get app home Directory N2C mean convert NString to C_string
    path = path + "/Documents/" + std::to_string(i); //name dumped script with number in order
    FILE* file = fopen(path.c_str(),"wb+"); //create file handle
    i++                                        
    fwrite(buff,sz,1,file);   //write buff to file
    fclose(file);
    */
    
    //inject 
    if(sz > 100 && memcmp((void*)buff,(void*)data,100) == 0)  //if buff is target lua then replace the original buff with ours
    {
       return _loadbuffer(L,(const char*)data,sizeof(data),name); //return modified script 
    }
  
    return _loadbuffer(L,buff,sz,name);  //if not target return original lua script

}


CNConstructor(SexyAss) 
{
  MSHookFunction( ((void*)CNAddr(0x0015D5A0 + 1))  , (void *)$loadbuffer, (void **)&_loadbuffer); // hook lua_loadbuffer

}  


      
 

 

 

 

Updated by caoyin
  • Like 8
  • Winner 3
  • Thanks 1
  • Haha 1
  • Agree 1
  • Informative 2
Link to comment
Share on other sites

  • Our picks

    • Merge Dragons! v11.3.0 +1 Cheat
      Modded/Hacked App: Merge Dragons! By Gram Games
      Bundle ID: com.gramgames.mergedragons
      iTunes Store Link: https://apps.apple.com/us/app/merge-dragons/id1208952944

       

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - unlimited currencies





      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using Filza or iFile, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will need to press on 'Install' or 'Installer' from the options on your screen.
      STEP 5: Let Filza / iFile finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: If the hack is a Mod Menu, which is usually the case nowadays, the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 251 replies
    • Limbus Company v1.45.0 +2 Cheats
      Modded/Hacked App: Limbus Company By Project Moon Co., Ltd.
      Bundle ID: com.ProjectMoon.LimbusCompany
      iTunes Store Link: https://apps.apple.com/us/app/limbus-company/id6444112366?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Auto Win


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 141 replies
    • Invincible: Guarding the Globe v1.1.19 +2 Cheats
      Modded/Hacked App: Invincible: Guarding the Globe By Ubisoft
      Bundle ID: com.ubisoft.invincible.guardians.globe.idle.superhero.rpg.battle.afk
      iTunes Store Link: https://apps.apple.com/us/app/invincible-guarding-the-globe/id6449294809?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 74 replies
    • Archer Forest : Idle Defence v14.06.01 +4 Cheats
      Modded/Hacked App: Archer Forest : Idle Defence By Game Duo Co.,Ltd.
      Bundle ID: net.gameduo.archer
      iTunes Store Link: https://apps.apple.com/us/app/archer-forest-idle-defence/id1519590205?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia or Sileo).


      Hack Features:
      - Custom Damage
      - No Skill Cooldown
      - Attack Speed Multiplier
      - Unlimited Gold
      - Unlimited Gems
      - Unlimited Stone

      * I don't recommend using currency cheats because


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above.
      STEP 2: Copy the file over to your iDevice using any of the file managers mentioned above or skip this step if you're downloading from your iDevice.
      STEP 3: Using Filza or iFile, browse to where you saved the downloaded .deb file and tap on it.
      STEP 4: Once you tap on the file, you will need to press on 'Install' or 'Installer' from the options on your screen.
      STEP 5: Let Filza / iFile finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 6: If the hack is a Mod Menu, which is usually the case nowadays, the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 7: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - @Zahir


      Cheat Video/Screenshots:

      N/A
      • 563 replies
    • Ella's Battle: Idle RPG v1.0.4 +2 Cheats
      Modded/Hacked App: Ella's Battle: Idle RPG By Game Duo Co.,Ltd.
      Bundle ID: net.gameduo.ellarpg
      iTunes Store Link: https://apps.apple.com/us/app/ellas-battle-idle-rpg/id6474592985?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 9 replies
    • Otherworld Mercenary Corps v0.8.1 +2 Cheats
      Modded/Hacked App: Otherworld Mercenary Corps By baobob lab
      Bundle ID: com.blb.ios.Mercenary
      iTunes Store Link: https://apps.apple.com/us/app/otherworld-mercenary-corps/id6471457105?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Never Die


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
        • Thanks
      • 35 replies
    • Jobmania Eternal Dungeon v2.21.3 +3 Cheats
      Modded/Hacked App: Jobmania Eternal Dungeon By Aubrey Puan
      Bundle ID: com.aubjective.jobmania
      iTunes Store Link: https://apps.apple.com/us/app/jobmania-eternal-dungeon/id1643100440?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier
      - Add Currenies  -> Battle -> Market -> Buy & Retreat
      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 9 replies
    • ASTRA: Knights of Veda v1.1.0 +2 Cheats
      Modded/Hacked App: ASTRA: Knights of Veda By HYBE IM Co.,Ltd.
      Bundle ID: com.hybeim.astra
      iTunes Store Link: https://apps.apple.com/us/app/astra-knights-of-veda/id6449925651?uo=4


      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iGameGod / Filza / iMazing or any other file managers for iOS.
      - Cydia Substrate, ElleKit, Substitute or libhooker depending on your jailbreak.
      - PreferenceLoader (from Cydia, Sileo or Zebra).


      Hack Features:
      - Damage Multiplier
      - Defense Multiplier


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/


      iOS Hack Download Link:

      Hidden Content
      Download Hack







      Installation Instructions:
      STEP 1: Download the .deb Cydia hack file from the link above. Use Safari/Google Chrome or other iOS browsers to download.
      STEP 2: Once the file has downloaded, tap on it and then you will be prompted on whether you want to open the deb with iGameGod or copy it to Filza.
      STEP 3: If necessary, tap on the downloaded file, and then, you will need to press 'Install' from the options on your screen.
      STEP 4: Let iGameGod/Filza finish the cheat installation. Make sure it successfully installs, otherwise see the note below.
      STEP 5: If the hack is a Mod Menu — which is usually the case nowadays — the cheat features can be toggled in-game. Some cheats have options that can be enabled from your iDevice settings.
      STEP 6: Turn on the features you want and play the game. You may need to follow further instructions inside the hack's popup in-game.

       

      NOTE: If you have any questions or problems, read our Troubleshooting topic & Frequently Asked Questions & Answers topic. If you still haven't found a solution, post your issue down below and we'll do our best to help! If the hack does work for you, please post your feedback below and help out other fellow members that are encountering issues.


      Credits:
      - AlyssaX64


      Cheat Video/Screenshots:

      N/A
      • 71 replies
    • Modded/Hacked App: Transformers: Earth Wars By Space Ape Ltd
      Bundle ID: com.backflipstudios.transformersearthwars
      iTunes Store Link: https://apps.apple.com/us/app/transformers-earth-wars/id1058526204?uo=4


      Hack Features:
      - Infinite Mana

      I update hacks based on how popular their topic on iOSGods is.
      Jailbreak required hack(s): https://iosgods.com/topic/51838-iosgods-exclusive-transformers-earth-wars-v167-4-cheats/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
        • Winner
      • 163 replies
    • Ace Fishing: Wild Catch v9.0.1 +4 Cheats
      Modded/Hacked App: Ace Fishing: Wild Catch By Com2uS Corp.
      Bundle ID: com.com2us.acefishing.normal.freefull.apple.global.ios.universal
      iTunes Store Link: https://apps.apple.com/us/app/ace-fishing-wild-catch/id694972182?uo=4


      Hack Features:
      - No Line Break
      - Set Tension Gauge [ 1 = low, 2 = center, 3 = high ]
      - Set Fish HP
      - Set Damage


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/
      • 295 replies
    • Left to Survive: Zombie TPS Cheats v6.4.3 +10 Hacks
      Modded/Hacked App: Left to Survive: Zombie TPS By MY COM
      Bundle ID: com.glu.zbs
      iTunes Store Link: https://apps.apple.com/us/app/left-to-survive-zombie-tps/id1090501422

      Hack Features:
      - No Bullet Disperse 
      - Unlimited Ammo
      - No Recoil
      - Increased Fire-rate 

      - One Hit Campaign 
      - Grenades and Med-kits Dont Subtract
      - God Mode
      - God Mode PVP

      - Unlock Chapters early 
      - Weapons Unlocked Ready to buy 


      Non-Jailbroken & No Jailbreak required hack(s): https://iosgods.com/forum/79-no-jailbreak-section/
      Modded Android APK(s): https://iosgods.com/forum/68-android-section/
      For more fun, check out the Club(s): https://iosgods.com/clubs/

      • 1,530 replies
    • Legend of Solgard v2.45.0 - [ x Player Damage & More ]
      Modded/Hacked App: Legend of Solgard By King
      Bundle ID: com.midasplayer.apps.solgard
      iTunes Store Link: https://apps.apple.com/us/app/legend-of-solgard/id1281263906

      Mod Requirements:
      - Jailbroken iPhone/iPad/iPod Touch.
      - iFile / Filza / iFunBox / iTools or any other file managers for iOS.
      - Cydia Substrate or Substitute.
      - PreferenceLoader (from Cydia).


      Hack Features:
      - x Player Damage - x1 - 30
      - God Mode

      All features are unlinked and only for player, you!
      • 557 replies
×
  • Create New...

Important Information

We would like to place cookies on your device to help make this website better. The website cannot give you the best user experience without cookies. You can accept or decline our cookies. You may also adjust your cookie settings. Privacy Policy - Guidelines