Vivid Abstractions Where Programming Becomes An Abstraction

Tutorials

==In Construction==
Click here for the all tutorials (unsorted)


==Requests==
If you have any tutorial requests, post in the comment section below.

Comments (109) Trackbacks (0)
  1. if you could make a gravity gun for halo custom edition MULTIPLAYER which works 1.09?

  2. Hey mate :) did you decide to start on the tutorial we were talking about before? Would be an awesome idea and I’m sure a lot more people besides me would find it useful.

  3. Yes I already finished the application where I am going to demonstrate everything on. I am just thinking now how to structurize everything.

  4. Awesome! I’m really looking forward to this :D I appreciate you taking the request, I’ve been trying to mess around with Lineage 2 recently but having trouble finding a lot of things so hopefully this will help :) thanks again, Komo.

  5. DirectX Tuts!! : )

  6. A tutorial on asm basics, for injecting code, the best places to write jmp’s, creating variables in asm. If you could please. Your tutorials have always been very helpful.

  7. ASM Basics can be learned everywhere else…I can make certainly a tutorial on the last three things though :D Thanks!

  8. How would you find the rate of fire of a weapon in halo? Also how do you find dynamic address with findpattern, does it only worked with static ones, meaning you would have to find a static base pointer?

  9. FindPattern only works with static ones for example to find the static base pointer.

    Rate of Fire is a fixed value stored for every weapon. You can open up the Mapping Tools and look it up and search it in memory. Alternatively you can go into the fire weapon function and NOP some calls which delay the weapon fire which results in rapid fire.

  10. I’m trying to trace the dev command “cinematic_screen_effect_set_video 0 1″ to a function in asm. I can’t find the name in halo ce, only until after I use it. I think im looking for something like (i mot sure if this is close):
    push eax
    puch ecx
    call function

    then I just need to figure out how to call it with those parameters, because createremotethread only supports 1 parameter

    • I found it easily in IDA so it is hardcoded. HCE 1.09 0x00601E98.

      Set a HWBP on it and for me it broke
      005DC930 |> /0FB606 /MOVZX EAX,BYTE PTR DS:[ESI]

      Happy Reversing :P

      • IDA? could you make a tutorial showing how you did this?, and thanks for finding it.

        • You can do this in Olly as well (I did everything in Olly except the string search). Press M on the top of Olly, choose Halo .rdata data section and do a binary search for it.

  11. Could you help make a time freeze like the one from halo Dev trainer by sheep? I want to improve upon it.

    • I actually never really researched how he did it. You can use “Process Monitor” to see what his app does and research. There is also a dev command called “game_speed #” where # can be a number starting with 0 which freezes everything, 1 runs the game normal, 2+ runs it at a higher speed.

  12. I’ve found the static pointer to the dynamic player structure, however the second offset is tricky:

    addr of dynamic player structure
    addr of ptr offset [edx*4+08]
    addr of ptr haloce.exe+3FB3B0 offset 0×34

    I did a bit of researching and found that edx is between 0 and 0xFF
    but I don’t know where it comes from, do you know where?

    • Hmm not sure if you got everything right. Usually edx * 4 is a pointer array, where edx is the index of the pointer inside the array.

  13. I wanna make a forcepull gun or gravity gun like your video. the intial and final speed i got down so it can pull. i know how to push away too but on a different gun. it involves triggers though?A tutorial would be awesome .. btw nice website..

  14. Could you create more advanced tutorial about hooking?
    Or tutorial how to call functions using blackmagic and C#.

    • I never used Blackmagic and I dislike to use C# for purposes, which it is not intended to. It is not easy to create more advanced hooking tutorials, especially in a video tutorial. It would be nice if you could give me specific example because hooking strongly depends on the target.

      • Maybe a tutorial about finding/reversing the function, how to create function that does more than the normal one like logs some arguments/registers into a txtfile, more information like about the calling conventions and maybe even how to use the windows detours.

        I’d understand this kinda varies from side to side but theres few suggestions obviously it could be multiple tutorials as detours are kinda world of them own, but the calling conventions and finding/reversing the function would be more of a top priority.

  15. Hi,

    I’ve been trying out to stop an inside timer in a botting program for a game. Here is the problem: There are two free hours a day: one from 7-8 AM and a second hour from 5-6 PM, the rest having to pay to use. I firstly tried it the easy way: with TimeStopper. Luckily, it worked, but the program, when opened, starts the clock and is then stopped. However, this does not match with what I want as when I open the program at 12 AM, the clock will be actualized at 12 AM and the program will therefore not work. The only way I can do now is: open the program in a free hour and let it do the job, but then, when I close the program, I have to wait again for the next free hour.
    I tried to reverse it with OllyDBG, domain in which I’m not very good at all. I tried to NOP every adress with the text string (found with a text string search) “timer” in it, I figured out a function like the following: http://msdn.microsoft.com/en-us/library/ms724253(v=vs.85).aspx, but nothing happens, the program keeps going on… I then suspended the thread, and the hole program stopped, which seems normal, but when I reactivate it, the time jumps to the real time, meaning that it does not continue as nothing happens. I therefore deduced that there is like a background routine, but I’m not sure how to stop it…
    I also looked into the registry, but I wasn’t really sure about what I was doing, so I did not touch anything.

    Could you help me?

  16. I’m trying to use unit_kill function to kill the player, but when I place a HWBP on it I get the same address you got when you looked up cinematic_screen_effect_set_video. Is that address for console, to parse the command? How would I find the unit_kill function?

    and when I find it what type of paramter is unit? (unit_kill ) I tried player ID and Object ID but doesnt work, only (unit (list_get (players) 0))

  17. Hey i’ve found alot of your tutorials very useful, one thing i’ve never seen covered by any other tutorials is how you go about finding the actual addresses for say “melee swing 1″ or something, like an attack loop, i’ve been trying to create a attack speed hack for a game i just found and can’t edit weapon speeds so i was using ollydbg to try and find the actual code where the attack takes place so i could in a way loop it at a faster speed but i’ve no idea how i would go about even finding this, t hanks for all your great work so far, hopefully you can give me some advice.

    • You are on the right track. The problem with this is though, that this is heavily game dependent and a tutorial would be very rough.

      You need to go into the melee function (this is also game dependent on how to get there), towards the end there should be a delay call…when you remove it you can melee as fast as you want.

      • the game i’m trying with is argo by alaplaya if that helps is anyway, but i haven’t the slighest idea how i would even go about finding the melee function haha

  18. Did you release your gravity gun for halo? I couldn’t find a download link anywhere here.

  19. Is it possible to debug a dll made for halo, once you attach it? Every time I attach the dll i made to halo, the symbols don’t load, and it doesn’t hit any breakpoints.

    • nvm, I guess I thought visual studio would inject my dll once it attached, but it didn’t, so after using a dll injector to inject it, i can now debug it.

      • If you use the debug version of the DLL you are going to have it much easier. After you release your DLL you have to change the output to “Release” otherwise it might crash for some other people. If you want to have the program break at a certain line you can add _asm 0xCC to your code where you want Olly to break (make sure you don’t ignore 0xCC in the olly options).

  20. Have you ever thought about making an app/dll that would inject the rest of the dev functions into halo?

  21. hey, the past few months I’ve been learning c# and programing a few trainers for halo ce and halo’s ded server. Now that I look back on your trainer tut I realize all of the things that you put into your dll. I’d just like to say thanks for all the tuts.

  22. hey do you know any sites or can you make a or tutorial on how asm rep movs dword works and its purpose?

    I’m dissecting haloce code:
    004FA85E F3:A5 REP MOVS DWORD PTR ES:[EDI],DWORD PTR DS:[ESI];->ECX=00000000 ESI=400DE36C EDI=400DE4CC
    004FA860 8BCB MOV ECX,EBX;->ECX=00000160
    004FA862 83E1 03 AND ECX,3;->ECX=00000000
    004FA865 F3:A4 REP MOVS BYTE PTR ES:[EDI],BYTE PTR DS:[ESI]

    it seems to change the ecx register, but why so elaborate?

  23. Efficiency. Most of the time if it takes a lot of normal instructions to do a single task, and if it is used very often then processor companies add a new instruction that does exactly that.

    Look at the 3DNOW! instruction set and you know what I mean.

  24. My friends antivirus doesn’t like it when i use CreateThread inside of DllMain. I’ve tried function ptrs, and using asm to call a function that will jmp to it, but it still doesn’t like it. Do you have any ideas on how i can do this?

  25. Hey, a good tut would be how to get past dynamic addresses. what other methods are there other than code injection.

    • In my opinion there are no “dynamic addresses”. They all have a system behind them. If you start to learn ASM and the structure of the program/game you will understand.

      You don’t need to inject code either. Many times the objects in a game are stored in a table. That table contains an array of pointers which point to the objects in the game. If you find a pointer to the start of the table you can iterate through all the objects.

      I made a tutorial about memory structures so you might want to check that one out.

      • well, my problem is getting the dynamic base in mp for halo. i can’t find a static pointer that writes to it. but I can find one in sp. I will look at your tut again though. Thanks

        • Halo in MP? Well depends on what you want and it is not that easy.

          • After watching your tut on memory structures a few times I found a dynamic pointer that I can aob scan for in ce and using code injection I can store the address of dynamic base to a cave. thanks for the tuts

  26. Yo Pat, thanks for all the stuff you made man, they really helped, and by the way dude, i fell in love with the autoshot =P Seya later man

  27. I having a problem with the visual studio 2008 C++ compiler, when trying to call my class’s constructor.
    Halo_Process is a global variable.

    Halo_Process = RWMemory(main_module_name);

    When I follow it in the debugger, it goes through the constructor correctly then saves to my global variable, but right after that, it calls the deconstructor and the object is destroyed. Is there a setting or something I’m doing wrong here? Its not suppose to call the deconstrutor until it goes out of scope right?

    • Could you post a code snippet on pastebin.com?

        • Have you tried “= new RWMemory(…)”?

          • That’s what it was originally, and it worked, but changed it, because I didn’t want to use new, because of the over head, and I have this in a .NET timer thread set to 120 milliseconds. So i wanted to use a global variable so i wouldn’t have to allocate and deallocate so much.

            • I think’s because I’m using unmanaged within a managed environment. I’m going to try re programing this.

              • I think you are just not programming it right :P At some point you have to allocate the class. Why don’t you do it globally?

                • It is a global var, but halo may not be running when the app starts running. Though even if it was, it would need to figure if it was halo pc or ce, then initialize. I don’t like to use new, but I was thinking I could, instead of allocating and deallocating every 120 milliseconds, I could allocate it once it finds halo pc or ce, then delete when the game stops running or the app stops running. I should have done this in the first place. I’m going to try and learn win32 so to remove the .net dependencies.

  28. Heres a rookie win32 question: How do i display an combo box item Without highlighting it?

    Both the CB_SETCURSEL and WM_SETTEXT messages highlight it after displaying it.

    • Just highlight something else? I must admit I am not an expert myself though and I cannot remember how I solved this. :S

      • I was able to get most of the functionality of my win32 version of my app working, though it seems like changing the control’s appearance is nightmare. So i have even more questions:

        1: How do i get a menu bar control similar to the .NET menu strip? I noticed its not a normal menu attached to the main window, but a separate window. I want to have a transparent background.

        2: How can i get Transparent checkboxes? Using SetBkMode((HDC)wParam, TRANSPARENT); when the app is themed doesn’t work.

        3: Using SetBkMode((HDC)wParam, TRANSPARENT); on static controls (aka labels) works, however when i change the text, it draws the new text over the old, how do i “refresh” it?

        4: How do i get a Flat button appearance when the app is themed? Is there a way to do this without manually drawing the window?

        • Sorry I am stumped here since I have barely touched Win32 GUI Programming. It might be that you are better off using a library like “Qt”.

        • I figured out how to update the static control so it redraws itself:

          void SetControlText(HWND hMainWin, HWND hControl, LPCWSTR lpwString)
          {
          wchar_t str_buffer[16];
          GetWindowText(hControl, (LPWSTR)str_buffer, 16);
          //only change if its different
          if (!str_cmp((wchar_t*)str_buffer, (wchar_t*)lpwString))
          {
          SetWindowText(hControl, lpwString);
          //redraw control
          RECT rectButtonStatus;
          GetWindowRect(hControl, &rectButtonStatus);
          MapWindowRect(HWND_DESKTOP, hMainWin, &rectButtonStatus);

          InvalidateRect(hMainWin, &rectButtonStatus, FALSE);
          }
          }

          and to change static control color by handling the WM_CTLCOLORSTATIC message:

          HBRUSH OnCtlColorStatic(HWND hwnd, HDC hdc, HWND hwndChild, int type)
          {
          COLORREF textcolor;

          if (hwndChild == hControls[HHALO_TYPE])
          {
          textcolor = RGB(255,255,255);
          }
          else if (hwndChild == hControls[HHALO_STATUS])
          {
          textcolor = running_gt ? RGB(0,255,0) : RGB(255,0,0);
          }
          else if (hwndChild == hControls[HMAP_LBL])
          {
          textcolor = RGB(255,255,255);
          }

          .
          .
          .

          SetTextColor(hdc, textcolor);
          //transparent background for all static controls
          SetBkMode(hdc, TRANSPARENT);
          return GetStockBrush(NULL_BRUSH);
          }

        • For transparent themed checkboxes:

          I first dynamically link to the UxTheme.dll for compatibility for windows before XP:

          hUxTheme = GetModuleHandle(L”uxtheme.dll”);
          if (hUxTheme)
          {
          pIsAppThemed = (BOOL (__stdcall *)())GetProcAddress(hUxTheme, “IsAppThemed”);
          pDrawThemeParentBackground = (HRESULT (__stdcall *)(HWND hwnd, HDC hdc, RECT *prc))GetProcAddress(hUxTheme, “DrawThemeParentBackground”);
          }

          Then in the WM_CTLCOLORSTATIC handler:

          HBRUSH OnCtlColorStatic(HWND hwnd, HDC hdc, HWND hwndChild, int type)
          {
          HBRUSH stock_brush_type = WHITE_BRUSH;
          if (pIsAppThemed) theme_active = pIsAppThemed();

          switch (GetDlgCtrlID(hwndChild))
          {
          case IDC_CHECKBOX:
          if (theme_active)
          {
          if (pDrawThemeParentBackground) pDrawThemeParentBackground(hwndChild, hdc, NULL);
          }
          else
          {
          SetTextColor(hdc, WHITE_BRUSH);
          SetBkMode(hdc, TRANSPARENT);
          stock_brush_type = NULL_BRUSH;
          }

          break;
          }

          return GetStockBrush(stock_brush_type);
          }

          To change a themed checkbox’s textcolor, use a WM_NOTIFY handler like this:
          int OnNotify(HWND hwnd, int idCtrl, LPNMHDR pnmh)
          {
          int ret_val = 0;

          if (pnmh->code == NM_CUSTOMDRAW)
          {
          LPNMCUSTOMDRAW lpcd = (LPNMCUSTOMDRAW)pnmh;
          if (lpcd->dwDrawStage == CDDS_PREPAINT)
          {
          switch (idCtrl)
          {
          case IDC_CHECKBOX:
          {
          int str_len = GetWindowTextW(lpcd->hdr.hwndFrom, szBuffer, SZ_BUFFER_SIZE);

          HDC hdc = lpcd->hdc;//optimizer does this
          SetBkMode(hdc, TRANSPARENT);
          SetTextColor(hdc, GetSysColor(COLOR_HIGHLIGHT));
          TextOut(hdc, 18, 2, szBuffer, str_len);

          ret_val = CDRF_SKIPDEFAULT;
          break;
          }
          }
          }
          }

          return ret_val;
          }

        • The closest thing i could find to to a transparent menu bar, that doesn’t get included in the wondow’s size, it to use a button with TrackPopupMenu. Like this:

          HMENU hMenu = NULL;

          int OnCreate(HWND hwnd, LPCREATESTRUCT WinData)
          {
          hMenu = CreatePopupMenu();

          AppendMenu(hMenu , MF_STRING, IDM_ITEM1 ,L”item 1″);
          AppendMenu(hMenu , MF_STRING, IDM_ITEM2 ,L”item 2″);
          AppendMenu(hMenu , MF_SEPARATOR ,0 , L”");
          AppendMenu(hMenu , MF_STRING, IDM_ABOUT, L”About”);

          return TRUE;
          }

          void OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify)
          {
          switch (codeNotify)
          {
          case BN_CLICKED:
          switch(id)
          {
          case IDC_MENU_BUTTON:
          {
          RECT rControl;
          GetWindowRect(hwndCtl, &rControl);
          TrackPopupMenu(hMenu, TPM_LEFTBUTTON, rControl.left, rControl.top + 19, 0, hwnd, NULL);
          break;
          }

          case IDM_ITEM1:

          break;

          case IDM_ITEM2:

          break;

          case IDM_ABOUT:

          break;

          }
          }
          }

      • The WM_SETFONT message was sending a EM_SETSEL message, so i sent the CB_SETCURSEL after it changed the font, and it worked.

  29. Yo Pat, I made a portal gun like yours but its buggy could you help me out?
    his is how I have it setup in the timer
    float xport = Mem.ReadFloat(0x402BF9C4);
    float yport = Mem.ReadFloat(0x402BF9C8);
    float zport = Mem.ReadFloat(0x402BF9CC);
    int teleinx = 0x40473ADC;
    int teleiny = 0x40473AE0;
    int teleinz = 0x40473AE4;
    int teleoutx = 0x40475C64;
    int teleouty = 0x40475C68;
    int teleoutz = 0x40475C6C;

    if (checkBox1.Checked)
    {
    Mem.WriteFloat(teleinx, xport);
    Mem.WriteFloat(teleiny, yport);
    Mem.WriteFloat(teleinz, zport);
    }
    else
    {
    Mem.WriteFloat(teleoutx, xport);
    Mem.WriteFloat(teleouty, yport);
    Mem.WriteFloat(teleoutz, zport);
    }

  30. Hey, tell me what you think of my portal gun http://www.youtube.com/watch?v=JoEwiT2Goto also my aimbot is practically finished.

    • Nice work there =)

      • thanks, I got alot of help from your tuts. Pingo sent me an Aob scanner to use in my trainers so in a while I’ll probably release alot of things. I learned alot from reading sources and from pingo too. anyway I’ll have everything I’ve done so far with vids and sources up in a few weeks. your tuts really help.

  31. oh and sorry bought the double*now triple post, my internet was being gay and when it refreshed it posted the first before I could finish typing then I lost my internet for a while. I found the problem was a bad last shot address(x,y,zport).

  32. Out of curiosity, are there any Windows Programmer books that your would recommend?

    • I would always buy one language specific book (C#, C++). Just yesterday I bought a book on Framework Design which is quite handy if you want to write efficient code with common naming conventions etc.

  33. Here are my basic hacks including the Portal gun I just thought I’d post in case any1 wants to use them. It uses a sig scanner so It should work for all versions. I put two portal guns In there. one that move the BG teleporters around and another that works for all maps even custom maps Read the README http://www.4shared.com/file/2KL3LDGn/MY_HALO_HACKS.html
    Any comments would be appreciated.

  34. I finished converting my app from .NET to win32.

    .NET:
    8 to 10 threads
    about 6,700K memory

    win32:
    2 to 3 threads
    about 2,000K memory

  35. Whats Ur email?, I was wondering if you could test an app that I’m making and give me suggestions. I Tested on halo ce 1.0 and halo pc 1.4 so it should work for all versions.

  36. Hello !

    I don’t know how o contact you so I think this way is the only possible way. I want you to please you and the same time to give you to tutorial ideas.
    1. Try to make a video tutorial on how to make a Counter Strike cheat or a Need For Speed Most Wanted one.
    2. I saw somewhere a tutorial where that guy made a program which keylog windows calculator or windows virtual keyboard, by using API detours or API hooking, I don’t know exactly the method. He deleted his written tutorial. Maybe you will make a video tutorial on how to do this. What you say ?

    Please, do these video tutorials !

    Thank you in advance !

    PS: Please send me an email with your answer too !

  37. I found something interesting, you can force the main thread to use console by doing something like this:

    char *buffer = (char*)0×00652028;

    buffer[0] = ‘s’;
    buffer[1] = ‘v’;
    buffer[2] = ‘_’;
    buffer[3] = ‘p’;
    buffer[4] = ‘l’;
    buffer[5] = ‘a’;
    buffer[6] = ‘y’;
    buffer[7] = ‘e’;
    buffer[8] = ‘r’;
    buffer[9] = ‘s’;
    buffer[10] = 0;

    __asm
    {
    MOV EBX,0x651F74
    MOV WORD PTR[EBX],2

    MOV EDI,0x651F70
    MOV BYTE PTR[EDI],1

    MOV ESI,0x651F78
    MOV WORD PTR[ESI],0×38

    }


Leave a comment

(required)

No trackbacks yet.

SEO Powered by Platinum SEO from Techblissonline

Page optimized by WP Minify WordPress Plugin