• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Depressed
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Sleeping
  • Steam Gaming
  • Trolling
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 8 of 8
    1. #1
      Coder
      v-v
       
      Lurking
       
      Styx™'s Avatar
      Join Date
      Aug 2012
      Posts
      119
      Thanks (-->)
      1
      Thanks (<--)
      27

      Cool [TUTORIAL] Creating A File Patcher [Part1]

      Cheats-n-Trainers
      In this tutorial I will be teaching you how to make a file patcher for AssaultCube. I started to rush the tutorial towards the end so if i have made a mistake or left something out just reply and I will add/fix it.

      Also If someone could make a video tutorial out of this (with voice not notepad) as it is very long and would be easier to watch.


      Table of Contents:

      1. Step 1 (Preperation)
      2. Step 2 (Attaching OllyDBG to AssaultCube)
      3. Step 3 (Finding Addresses)
      4. Step 4 (Saving The modified file)
      5. Step 5 (Finding The Differences)
      6. Step 6 (Making The Patch)
      7. Step 7 (Patching AssaultCube)


      Files Required:

      HxD
      Visual Basic 2010 Express (Or a later version of the software)
      OllyDBG
      AssaultCube

      Step 1 (Preparation):

      Before we start to do anything you must first download and install all of the programs listed above as well as a backup of the un-modified 'ac_client.exe'.

      Installing Visual Basic 2010

      To install visual basic 2010 express simply download the web installer above and go through the install dialog as you would with any other program.

      Installing HxD

      To install HxD, click on the link above and select which language you would like, after downloading run the installer and go thought the install dialog as you would with any other program.

      Installing OllyDBG

      Unlike the other two files, OllyDBG Does not need to be installed, instead it comes inside a .zip file which you simply extract to a folder on your computer.

      Installing AssaultCube

      To install AssaultCube, click on the link above and select windows at the right side, after downloading run the installer and go thought the install dialog as you would with any other program.

      Backing Up 'ac_client.exe'

      In the method used in this tutorial you will need a back up of the original file to compare to a modifies version, to do this simply go to the installation folder for AssaultCube (Default: C:\Program Files (x86)\AssaultCube_v1.1.0.4) and double click the 'bin_win32' folder, once inside this folder copy the file 'ac_client' to your desktop.

      Step 2(Attaching OllyDBG To AssaultCube):

      To attach OllyDBG to AssaultCube you will first need to run AssaultCube and OllyDBG.

      After both programs are running, in OllyDBG click on File>Attach

      [TUTORIAL] Creating A File Patcher [Part1]

      After you click 'Attach' a new window (below) will pop-up

      [TUTORIAL] Creating A File Patcher [Part1]

      As you can see in the image above you must select 'ac_client' and then click 'Attach'.

      After OllyDBG has 'Attached' to ac_client, click the play button (below)

      [TUTORIAL] Creating A File Patcher [Part1]

      Step 3 (Finding Addresses):

      The next step is to find the addresses of the assembly code we want to change.

      Finding the ammo address:

      The first step is to press 'Ctrl+G', a window will pop-up (Below).

      [TUTORIAL] Creating A File Patcher [Part1]

      After the window pops-up, paste the address '0045B75F' into the textbox and click 'OK'.

      After you click 'OK' you will be taken to the address (Below), from here write the bytes (FF0E) into notepad.

      [TUTORIAL] Creating A File Patcher [Part1]

      Next double click the address and a new window will pop-up (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      In the image above you can see 'DEC' in the textbox, change this to 'INC' and click 'Assemble'.

      [TUTORIAL] Creating A File Patcher [Part1]

      Now if you look at the bytes again you will notice that they have changed and the new byte is highlighted red (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Finally write down the new bytes (FF06) into notepad.

      Finding the recoil address:

      Like with finding the ammo address the first step is to press 'Ctrl+G' but his time pasting the address '0045B70A'

      After you click 'OK' you will be taken to the address below in OllyDBG.

      [TUTORIAL] Creating A File Patcher [Part1]

      Next write the bytes highlighted above into notepad e.g.:

      Code:
      8B 
      16
      8B
      52
      14
      50
      8D
      4C
      24
      1C
      51
      8B
      CE
      FF
      D2
      The format above is the easiest for the next steps.

      Now that you have wrote all the addresses into notepad, double click the first address, a window will once again pop-up but instead of changing one of the commands, this time just replace all the text with 'NOP' (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      After pasting 'NOP' into the textbox click 'Assemble' until all of the addresses highlighted above have their bytes changed to '90' (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Now after each of the bytes you wrote into notepad earlier add '-> 90' e.g.:

      Code:
      8B -> 90
      16 -> 90
      8B -> 90
      52 -> 90
      14 -> 90
      50 -> 90
      8D -> 90
      4C -> 90
      24 -> 90
      1C -> 90
      51 -> 90
      8B -> 90
      CE -> 90
      FF -> 90
      D2 -> 90
      Step 4 (Saving the modified file):

      The final step for the modifications is to save the file as a .exe.

      Saving the modified file:

      Now that you have made all the modifications, simply right-click the address window in OllyDBG go down to 'Copy to executable' and then to 'All modifications' (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      After you click 'All modifications' a new window will pop-up, simply click 'Copy all' (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Another window will pop-up after clicking 'Copy all', just exit this window by clicking 'X' (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      After exiting this window another will pop-up, on this window just click yes (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Finally after click yes in the window above a final window will pop-up (below) asking where you want to save the .exe and what you want to call it, I recommend saving the file to your desktop and naming it 'COMP'.

      [TUTORIAL] Creating A File Patcher [Part1]

      After you have saved the modified file you can close OllyDBG and AssaultCube.
      Last edited by Styx™; 11-19-2012 at 04:19 PM.

    2. Thanks Helios, Cristlol, NTvalk, TheCvX, N/A thanked for this post
    3. #2
      Coder
      v-v
       
      Lurking
       
      Styx™'s Avatar
      Join Date
      Aug 2012
      Posts
      119
      Thanks (-->)
      1
      Thanks (<--)
      27

      [TUTORIAL] Creating A File Patcher [Part2]

      Step 5 (Finding The Differences):

      Earlier in the tutorial I asked you to make a backup of ac_client.exe, the back up is for this step and I recommend moving it to the desktop.

      In this step you will compare both the original file (ac_client.exe) and the modified file (COMP.exe) in the hex editor (HxD).

      Loading the files into HxD:

      To load the two files into HxD, simply run HxD then click File>Open (Below) and then select the two files.

      [TUTORIAL] Creating A File Patcher [Part1]

      Comparing the two files:

      After you have loaded both files, click Analysis>File Compare>Compare (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      After Clicking 'Compare' a new window should pop-up (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      In the window above the two files you loaded should automatically be entered into the textboxes, to finish click 'OK'

      Finding the differences:

      After you clicked 'OK' on the previous window, the first difference in the two files should be highlighted in HxD (Below).

      [TUTORIAL] Creating A File Patcher [Part1]

      If you look back at your notes in notepad, you will notice that the byte highlighted in the top window is the first byte from the recoil addresses, and in the bottom window you will notice that instead of '8B' the byte is '90' which is what we changed it to in OllyDBG.

      The only part we are interested is the text circled at the bottom of the window '5AB0A', this is out hex block (Offset), write this in notepad as e.g. 'Recoil Offset: 5AB0A'

      The next step is to continually hit 'F6' until you get to '0E' in the top window and '06' in the bottom window (below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Again you can see that the two bytes highlighted are the bytes we change in OllyDBG and again we are only interested in the 'Block' so again write into notepad 'Ammo Offset: 5AB60'.

      When you have done this you can close HxD and move onto the next step.

      Step 6 (Making The Patch):

      In This step we will create the patch itself in visual basic using my 'patchFile' Sub.

      Creating a new project

      To create a new project in visual basic simply click the new project button (below) or press 'Ctrl+N'

      [TUTORIAL] Creating A File Patcher [Part1]

      After you click the button above a new window will pop-up (below), click 'Windows Forms Application' and name the project 'AssaultCube Patch'

      [TUTORIAL] Creating A File Patcher [Part1]

      When the project loads, drag a button and two check boxes into the form and then resize it (example below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Optionally you can rename the forms title to 'AssaultCube Patch'

      The next step is to double click the button to show 'code view', one you do this write the code (below) into the buttons sub.

      [TUTORIAL] Creating A File Patcher [Part1]

      After you do this you will need to at the patchFile() sub (below).


      Code:
      Private Sub patchFile(ByVal strLocation As String, ByVal hOffset As Integer, ByVal hBytes As Integer())
              Dim writeFile As BinaryWriter = New BinaryWriter(File.OpenWrite(strLocation))
              For i = 0 To hBytes.Count - 1
                  writeFile.BaseStream.Position = hOffset + i
                  writeFile.BaseStream.WriteByte(hBytes(i))
              Next
              writeFile.Dispose()
          End Sub
      [TUTORIAL] Creating A File Patcher [Part1]

      Next you will need to declare the bytes at the top of the class under 'Public Class Form1' (Below).

      [TUTORIAL] Creating A File Patcher [Part1]

      The ' "" ' are only there to prevent errors in the image, instead you will write each byte that we wrote down in notepad for ammo and recoil.

      Make sure to put a '&H' before each byte to declare it as a hex value (Below).

      [TUTORIAL] Creating A File Patcher [Part1]

      Next you will add 'Imports System.IO' above 'Public Class Form1'

      Finally you will write the methods for the patching in the button sub (Below).

      [TUTORIAL] Creating A File Patcher [Part1]

      In the image above the red rectangle highlights the location of the file to patch, the orange is the 'Block' of the first byte (We wrote these down in notepad earlier for both ammo and recoil) and the blue is the bytes to patch (We declared them at the top of the class).

      The last thing to do in this patch is to build the application and save it somewhere.

      Step 7 (Patching AssaultCube):

      This is the final step where we will move our patch to the AssaultCube installation directory.

      To do this step simply move your patch the AssaultCube installation directory (Default: C:\Program Files (x86)\AssaultCube_v1.1.0.4) and then into the 'bin_win32' folder, one you have moved it to this folder simply right click the file, and click 'run as administrator' and then when the program loads check both boxes and click 'Patch'.

      Now exit the program and start AssaultCube.

      Done.

      Credits:

      Fleep - The addresses for the recoil hack (From his tutorial)
      xMeltdowNx - Writing This tutorial as well as the patch sub.

      Virustotal
      Jotti
      Attached Files Attached Files
      Last edited by Styx™; 11-19-2012 at 04:21 PM.

    4. Thanks Cristlol thanked for this post
    5. #3
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      Lokikol's Avatar
      Join Date
      Nov 2012
      Location
      Germany
      Posts
      6
      Thanks (-->)
      0
      Thanks (<--)
      0
      Nice Tutorial . I didn't expect this to be that easy.

    6. #4
      Hacker
      Learning to hack games!
       
      Pawning
       
      Fleep's Avatar
      Join Date
      May 2012
      Posts
      626
      Thanks (-->)
      208
      Thanks (<--)
      720
      *Approved, thanks for the great tutorial
      EDIT: Stickied for its great detail

      Fleep

    7. #5
      Coder
      Wishing Trove had logical
      values.
       
      Steam Gaming
       
      maymonaise's Avatar
      Join Date
      Nov 2012
      Location
      Rhode Island, United States (GMT -500)
      Posts
      213
      Thanks (-->)
      40
      Thanks (<--)
      13

      Good Work

      Thanks, it really helps out the coding noobs like me... :)
      Last edited by maymonaise; 12-21-2012 at 10:17 PM.
      "All you need is ignorance and confidence and the success is sure."
      -- Mark Twain

      "For a long time it puzzled me how something so expensive, so leading edge, could be so useless, and then it occurred to me that a computer
      is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly
      stupid things. They are, in short, a perfect match."
      -- Bill Bryson

    8. #6
      Coder
      v-v
       
      Lurking
       
      Styx™'s Avatar
      Join Date
      Aug 2012
      Posts
      119
      Thanks (-->)
      1
      Thanks (<--)
      27
      Quote Originally Posted by Lokikol View Post
      Nice Tutorial . I didn't expect this to be that easy.
      Its alot easier than everyone thinks

    9. #7
      Coder
      v-v
       
      Lurking
       
      Styx™'s Avatar
      Join Date
      Aug 2012
      Posts
      119
      Thanks (-->)
      1
      Thanks (<--)
      27
      Here are the functions for both read and write Link

    10. #8
      Newbie
      Learning to hack games!
       
      Feeling Normal
       
      nuttertools10's Avatar
      Join Date
      May 2013
      Posts
      1
      Thanks (-->)
      0
      Thanks (<--)
      0
      GuidedHacking Advertisements
      thank you++

    Similar Game Hacker Threads

    1. [Tutorial] AssaultCube noscope patcher and injector with Python
      By FireAway in forum Game Hacking Tutorials
      Replies: 2
      Last Post: 04-19-2016, 01:36 PM
    2. [Help] Cannot open include file: 'd3dx9.h': No such file or directory"
      By Raw Development in forum C/C++
      Replies: 11
      Last Post: 04-09-2016, 04:05 PM
    3. [Release] PoE 2.04 Multihack (Client-side Flyhack, Zoom Patcher, Auto-Potions)
      By Obsta in forum Other Game Hacks
      Replies: 4
      Last Post: 10-07-2015, 03:22 PM
    4. [Help] How to read unreadable text file that extracted from .exe file ?
      By man1343 in forum General Hacking Discussion
      Replies: 4
      Last Post: 10-26-2014, 03:56 AM
    5. AssaultCube Patcher
      By Styx™ in forum Assault Cube Hacks
      Replies: 7
      Last Post: 11-19-2012, 12:36 AM

    Tags for this Thread