Patcher

Discussion in 'Programming Chat & Support' started by Krzywy, July 18, 2007.

  1. Krzywy

    Krzywy Moderator

    Let's begin... i wrote a patcher it was to be steam patcher with all changed offsets included - Ati promo, gui unlock, no cd check and others... but i had a problemz with this and meybe some talented coder know how to change to virtual adress offset bcs it's problem when it's dll :)

    Code of patcher - it patches Lena's crackme :) and it work :)
    Code:
    //---------------------------------------------------------------------------
    
    #include <vcl.h>
    #pragma hdrstop
    
    #include "Unit1.h"
    #include <stdio.h>
    #include <stdlib.h>
    
    const unsigned long TARGET_FILE_SIZE = 12800;
    const char* TARGET_FILE_EXE = "reverseMe.exe";
    
    
    //---------------------------------------------------------------------------
    #pragma package(smart_init)
    #pragma resource "*.dfm"
    TForm1 *Form1;
    //---------------------------------------------------------------------------
    __fastcall TForm1::TForm1(TComponent* Owner)
        : TForm(Owner)
    {
    }
    //---------------------------------------------------------------------------
    
    void __fastcall TForm1::Image2Click(TObject *Sender)
    {
    Form1->Close();
    }
    //---------------------------------------------------------------------------
    
    void __fastcall TForm1::Image3Click(TObject *Sender)
    {
    unsigned long FILE_SIZE = 0;
    FILE *TARGET_FILE;
    char FILE_GUTS[TARGET_FILE_SIZE - 1];
    TARGET_FILE = fopen(TARGET_FILE_EXE,"rb+");
    int CurChar = 0;
    while(fgetc(TARGET_FILE)!=EOF){FILE_SIZE++;}
    
    fclose(TARGET_FILE);
    
        if(!TARGET_FILE)
        {
        ShowMessage("Can't find file to crack.nPatching failed.");
        }
        else
        {
        ShowMessage("Patching...");
    
            TARGET_FILE = fopen(TARGET_FILE_EXE,"rb+");
            FILE_SIZE = 0;
            while((CurChar=fgetc(TARGET_FILE))!=EOF)
            {
            FILE_GUTS[FILE_SIZE] = CurChar;
            FILE_SIZE++;
            }
            fclose(TARGET_FILE);
    
        FILE_GUTS[0x0000067B] = (char)0xEB;
        FILE_GUTS[0x000006B0] = (char)0x74;
        FILE_GUTS[0x000006BF] = (char)0x74;
        FILE_GUTS[0x000006D6] = (char)0x74;
    
        FILE_SIZE = 0;
        TARGET_FILE = fopen(TARGET_FILE_EXE,"rb+");
        while(FILE_SIZE <= TARGET_FILE_SIZE - 1)
        {
        fputc((int)FILE_GUTS[FILE_SIZE],TARGET_FILE);
        FILE_SIZE++;
        }
    
        ShowMessage("Done.");
    
        }
    }
    //---------------------------------------------------------------------------
    
    Can't do the same for steam bcs don't know that converted memory adresses and my converter works only with exe :)

    Here's Binari + Source
    Code:
    http://www.mkrzywy.ifastnet.com/Patcher.rar
    
     
  2. EriX920

    EriX920 FS Administrator

  3. Krzywy

    Krzywy Moderator

    Thanks I'll try this tommorow :)

    Meybe some steam patcher on way ??
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice