Skip to content

Instantly share code, notes, and snippets.

@brahimmachkouri
Created December 23, 2015 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brahimmachkouri/e5dabd3b83aeb94f1956 to your computer and use it in GitHub Desktop.
Save brahimmachkouri/e5dabd3b83aeb94f1956 to your computer and use it in GitHub Desktop.
Trainer made with Cheat Engine
<?xml version="1.0" encoding="utf-8"?>
<CheatTable CheatEngineTableVersion="18">
<Forms>
<CETrainer Class="TTrainerForm" Encoding="Ascii85">#Zygh):Zrz)lwuh!4U{_PKXm45=pp7$,ERtX].p)A2(C7yIOVQ%5m57Kj3$9K;QEHFThRGHtohFPMi]uexCRFh],TF!tvShA.yBx9K.zHQ#%Oj*j/zNvi0?A:m5PQ%hoT^!hF^HjoKe+CdaLJni-Ipq(zpapu;Ps$mIs(R[hHS$@+s:FrD)DKBf}Z/@@5Rm:9,;Nd-V2C/qAiiWYRpz)y[)!eqv%RJ)Q)#@J!j)V!HlYrFdNTAr?VSqc]D9GDY,!}-w)]eCmEp{(B%w#VpoZW?HG(N*8Z0PE).m{w7hdVB![vT8S*%bnf)oa;r{$uJTb2wg,AlI72)/hkql)IxgTF@;AX!t@I*+gx08P%X=N%.yR@-DKbPhI{r_U^#o:Q!cAuH#1R^MR!WBq1{D(orild^HS8kZ%=aSn28i1*3J?3sRo[U!.MspyHjnQX#0Hk^w61lwDfXZj_[piod^oqpL)9Zp69H=Ix5FGwfYyEY;W//6ZqoBL?4%vGcGK(WqfoRCc(T@/8IV%({MhjKHJiUqY/QXkG4@3)2J6:S=hAQ+6-[DFHA2[$6OSyMJ83TXxnUcRW^8wu1vF8L-hhg8f6;Dd(xX4ExfFYc%]oF;TF+DZ4679uC$wW%1(WK:1kgQM(,WEmet]I]q;-z6pB;PO4j3Z/)gzrJn!Zsno{s8;Le=FsiVf)a[6)^rIOwd37K[Nzp8K5:yu8m;P97FzNkoSr$dUB3ZE{6SG[C2;13!Ddrn^9;9l^[srC.{-_jela7F*vON9Oa</CETrainer>
</Forms>
<CheatEntries>
<CheatEntry>
<ID>0</ID>
<Description>"Grenades infinies"</Description>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : Broforce_beta.exe
Version: 1.0
Date : 2015-12-23
Author : sub
Infinite Grenades - Grenades Infinies
}
[ENABLE]
aobscan(INJECT,8B 45 0C 89 86 0C 04 00 00 8B 05) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
mov [ebp+0C],8 // 8 grenades
mov eax,[ebp+0C]
mov [esi+40C],eax
jmp return
INJECT:
jmp code
nop
nop
nop
nop
return:
registersymbol(INJECT)
[DISABLE]
INJECT:
db 8B 45 0C 89 86 0C 04 00 00
unregistersymbol(INJECT)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: 1176D72E
1176D711: 8B EC - mov ebp,esp
1176D713: 56 - push esi
1176D714: 83 EC 04 - sub esp,04
1176D717: 8B 75 08 - mov esi,[ebp+08]
1176D71A: 83 EC 0C - sub esp,0C
1176D71D: 56 - push esi
1176D71E: E8 05 5B FF FF - call 11763228
1176D723: 83 C4 10 - add esp,10
1176D726: 85 C0 - test eax,eax
1176D728: 0F 84 5A 00 00 00 - je 1176D788
// ---------- INJECTING HERE ----------
1176D72E: 8B 45 0C - mov eax,[ebp+0C]
1176D731: 89 86 0C 04 00 00 - mov [esi+0000040C],eax
// ---------- DONE INJECTING ----------
1176D737: 8B 05 34 7F 6A 04 - mov eax,[046A7F34]
1176D73D: 89 45 F8 - mov [ebp-08],eax
1176D740: 85 F6 - test esi,esi
1176D742: 0F 84 46 00 00 00 - je 1176D78E
1176D748: 83 EC 0C - sub esp,0C
1176D74B: 68 B4 BD 27 0D - push 0D27BDB4
1176D750: E8 53 34 4F F3 - call 04C60BA8
1176D755: 83 C4 10 - add esp,10
1176D758: 8B C8 - mov ecx,eax
1176D75A: 8B 45 F8 - mov eax,[ebp-08]
}
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>115</Key>
</Keys>
<Description>Grenades Infinies</Description>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
<CheatEntry>
<ID>1</ID>
<Description>"Vies Infinies"</Description>
<LastState Activated="0"/>
<Color>80000008</Color>
<VariableType>Auto Assembler Script</VariableType>
<AssemblerScript>{ Game : Broforce_beta.exe
Version: 1.0
Date : 2015-12-23
Author : sub
Infinite Lives - Vies Infinies
}
[ENABLE]
aobscan(INJECT2,8B 4D 0C 8B 45 08 89 88 B4) // should be unique
alloc(newmem,$1000)
label(code)
label(return)
newmem:
code:
mov [ebp+0C],9 // 9 vies
mov ecx,[ebp+0C]
mov eax,[ebp+08]
jmp return
INJECT2:
jmp code
nop
return:
registersymbol(INJECT2)
[DISABLE]
INJECT2:
db 8B 4D 0C 8B 45 08
unregistersymbol(INJECT2)
dealloc(newmem)
{
// ORIGINAL CODE - INJECTION POINT: 1300385E
1300383E: E8 F5 D6 9A F1 - call 049B0F38
13003843: 68 CB 00 00 00 - push 000000CB
13003848: EB EF - jmp 13003839
1300384A: 00 00 - add [eax],al
1300384C: 68 98 3B D5 0B - push 0BD53B98
13003851: E9 D2 C7 9A F1 - jmp 049B0028
13003856: 00 00 - add [eax],al
13003858: 55 - push ebp
13003859: 8B EC - mov ebp,esp
1300385B: 83 EC 08 - sub esp,08
// ---------- INJECTING HERE ----------
1300385E: 8B 4D 0C - mov ecx,[ebp+0C]
13003861: 8B 45 08 - mov eax,[ebp+08]
// ---------- DONE INJECTING ----------
13003864: 89 88 B4 00 00 00 - mov [eax+000000B4],ecx
1300386A: 8B 40 70 - mov eax,[eax+70]
1300386D: 83 EC 08 - sub esp,08
13003870: 6A 00 - push 00
13003872: 50 - push eax
13003873: E8 C0 3C FC F1 - call 04FC7538
13003878: 83 C4 10 - add esp,10
1300387B: 85 C0 - test eax,eax
1300387D: 74 17 - je 13003896
1300387F: 8B 45 08 - mov eax,[ebp+08]
}
</AssemblerScript>
<Hotkeys>
<Hotkey>
<Action>Toggle Activation</Action>
<Keys>
<Key>116</Key>
</Keys>
<Description>Vies Infinies</Description>
<ID>0</ID>
</Hotkey>
</Hotkeys>
</CheatEntry>
</CheatEntries>
<UserdefinedSymbols/>
<LuaScript>--TRAINERGENERATORSTART--
--This is autogenerated code. Changing code in this block will
--get erased and rewritten if you regenerate the trainer code
--Uncomment the following line if this is a Cheat Table format trainer and you don't want CE to show (Tip, save as .CETRAINER alternatively)
--hideAllCEWindows()
RequiredCEVersion=6.4
if (getCEVersion==nil) or (getCEVersion()&lt;RequiredCEVersion) then
messageDialog('Please install Cheat Engine '..RequiredCEVersion, mtError, mbOK)
closeCE()
end
addresslist=getAddressList()
memrec0=addresslist.getMemoryRecordByID(0)
memrec1=addresslist.getMemoryRecordByID(1)
memrec0_hotkey0=memrec0.getHotkeyByID(0)
memrec1_hotkey0=memrec1.getHotkeyByID(0)
function onPostHotkey0(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
CETrainer.CHEAT0.setActive(isActive) --gui update, nothing else
if gPlaySoundOnAction then
if isActive then
playSound(gActivateSound)
else
playSound(gDeactivateSound)
end
end
end
memrec0_hotkey0.onPostHotkey=onPostHotkey0
function onPostHotkey1(Hotkey)
--Executed after the "toggle*" cheat got executed
local memrec=Hotkey.Owner
local isActive=memrec.Active --get the state after the hotkey got triggered
CETrainer.CHEAT1.setActive(isActive) --gui update, nothing else
if gPlaySoundOnAction then
if isActive then
playSound(gActivateSound)
else
playSound(gDeactivateSound)
end
end
end
memrec1_hotkey0.onPostHotkey=onPostHotkey1
CETrainer.SEPERATOR.Visible=false
getAutoAttachList().add("Broforce_beta.exe")
function popupTrainerHotkeyFunction()
CETrainer.show()
end
--registerHotkey(popupTrainerHotkeyFunction, 36)
getFreezeTimer().Interval=250
gPlaySoundOnAction=true
gActivateSound=findTableFile([[Activate]])
gDeactivateSound=findTableFile([[Deactivate]])
CETrainer.show()
function AboutClick()
showMessage(gAboutText)
end
gAboutText=[[This trainer was made by Cheat Engine
www.cheatengine.org]]
function CloseClick()
--called by the close button onClick event, and when closing the form
closeCE()
return caFree --onClick doesn't care, but onClose would like a result
end
--TRAINERGENERATORSTOP--
</LuaScript>
</CheatTable>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment