Thread: C++ fail Code?

Results 1 to 2 of 2
  1. #1
    RoflPwned's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Posts
    6
    Reputation
    10
    Thanks
    0
    My Mood
    Angelic

    Post C++ fail Code?

    ZOMGDKHFkadgkfhgDSJhfDSfjgDSF!!!!ZOMGGGGGGGGGGGGGGGGGGGGGGGG


    I CAN'T FIGURE OUT WTH IS WRONG WITH THIS!!


    THIS IS THE CODE I USED FOR THE XTRAP BYPASS I'M MAKING!!!



    #include "stdafx.h"

    #define HackDetect1 0x00435FA6
    BYTE HD1[] = {0xEB, 0x35};
    #define HackDetect2 0x0043CE36
    BYTE HD2[] = {0xEB, 0x35};
    #define HackDetect3 0x0043DCF0
    BYTE HD3[] = {0xEB, 0x35};
    #define HackDetect4 0x0043DCD1
    BYTE HD4[] = {0xEB, 0x1F};
    #define HackDetect5 0x0043DCE9
    BYTE HD5[] = {0xEB, 0x07};
    #define IsDebuggerPresent 0x00499517
    BYTE IDP[] = {0x90};
    #define ZCheckHackProcess1 0x00441E35
    BYTE ZCHP1[] = {0xEB, 0x34};
    #define ZCheckHackProcess2 0x00441E62
    BYTE ZCHP2[] = {0xEB, 0x2C};
    #define ZCheckHackProcess3 0x00441EBD
    BYTE ZCHP3[] = {0xEB, 0x09};
    #define AbnormalBehavior 0x00440353
    BYTE AB[] = {0xE9, 0x8A, 0x00, 0x00, 0x00};

    //Write To Memory
    DWORD OldProtection;
    void WriteToMemory(DWORD Offset, DWORD Pointer, DWORD Length){
    VirtualProtect((void *)Offset, Length, PAGE_EXECUTE_READWRITE, &OldProtection);
    RtlMoveMemory((void *)Offset, (const void*)Pointer, Length);
    VirtualProtect((void *)Offset, Length, OldProtection, &OldProtection);
    }
    void ModifyMemory( BYTE *Offset, BYTE *ByteArray, DWORD Length){
    for(DWORD i = 0; i < Length; i++)
    WriteToMemory((DWORD)Offset + i, (DWORD)ByteArray + i, 1);
    }

    void Bypass()
    {
    ModifyMemory((BYTE*)HackDetect1, HD1, 2);
    ModifyMemory((BYTE*)HackDetect2, HD2, 2);
    //ModifyMemory((BYTE*)HackDetect3, HD3, 2);
    ModifyMemory((BYTE*)HackDetect4, HD4, 2);
    ModifyMemory((BYTE*)HackDetect5, HD5, 2);
    //ModifyMemory((BYTE*)IsDebuggerPresent, IDP, 1);
    //ModifyMemory((BYTE*)ZCheckHackProcess1, ZCHP1, 2);
    //ModifyMemory((BYTE*)ZCheckHackProcess2, ZCHP2, 2);
    //ModifyMemory((BYTE*)ZCheckHackProcess3, ZCHP3, 2);
    ModifyMemory((BYTE*)AbnormalBehavior, AB, 5);
    }

    bool APIENTRY DllMain(HMODULE hModule, DWORD dwReason, LPVOID lpvReserved){
    if(dwReason == DLL_PROCESS_ATTACH){
    DisableThreadLibraryCalls(hModule);
    Bypass();
    return true;
    }
    return true;
    }

    AND WHEN I ENTER IT INTO "Microsoft Visual C++ 2008 Express Edition" AS A DLL IT DOESN'T COMPLIEEEEEEEEEEEEE!!!! RAWR PLEASE SOME 1 HELP ME WITH THIS!!!!!!!!


    ;~; So mad atm.... sryz

    Prob wrong Section?

  2. #2
    Shark23's Avatar
    Join Date
    Mar 2010
    Gender
    male
    Location
    Kansas
    Posts
    425
    Reputation
    10
    Thanks
    55
    My Mood
    Cool
    There's a C++ section for a reason....
    Assembly Programmer