flat assembler
Message board for the users of flat assembler.
Index
> Main > [Question] Reguarding Flat Assembler Goto page Previous 1, 2 |
Author |
|
bitshifter 25 Oct 2009, 00:52
If you know what the offset is then just use standard file functions on it.
|
|||
25 Oct 2009, 00:52 |
|
bitshifter 25 Oct 2009, 02:06
Ahh, you need to get clever here...
You cant change the number of balls because its dynamic. Either change the code that increases the ball count, or change the code that checks the ball count. Edit: Here is simple demo which uses win32 file functions. Youre lucky i like win32 and i am so bored right now... Look up these funcs at MSDN, and add some error checking.
_________________ Coding a 3D game engine with fasm is like trying to eat an elephant, you just have to keep focused and take it one 'byte' at a time. |
|||||||||||
25 Oct 2009, 02:06 |
|
Black0ne 25 Oct 2009, 04:52
thanks i've looked at this and it replaces the first 17th byte which is somehow where the name is and replaced it with the work joe. this is what im trying to do with my patch. only instead of doing it through a notepad, i need to goto a specific address like 00A4134F and then make the change. but this is a useful example but I understand like 2% of this.code, I mean i understand what its doing but if you told me to write this code by hand, id have no clue wtf i would be doing. but seeing it i understand somewhat.
like Code: ; Change the desired 4 byte block. mov eax,[g_FileBuffer] add eax,17 ; index into the 17th byte (where my name is) mov dword[eax],'Joe.' ; Replace 4 bytes at offset. add eax,17. i dont see how you knew the name is at the 17th byte. did u write the scr.txt and then open it with Ollydbg or something? |
|||
25 Oct 2009, 04:52 |
|
revolution 25 Oct 2009, 06:00
Black0ne: File offsets do not equal memory addresses. I don't know where you got the address 00A4134F, but I suspect that the value is a memory address. Be sure that the address is not an uninitialised section in the file otherwise your "patch" cannot ever work. If that address is accurate then you will still have to find where in the disk file those bytes are that you want to change. For an .exe it is not as simple as it may seem. .exe files are not mapped 1-to-1 in the address space.
|
|||
25 Oct 2009, 06:00 |
|
bitshifter 25 Oct 2009, 12:30
FASM really should have a simple file io demo in the examples folder... *hint*
|
|||
25 Oct 2009, 12:30 |
|
ManOfSteel 25 Oct 2009, 12:39
So it took you 4 days and more than a page to tell us *clearly* that you just want to make a patch written in assembly?
Use Ollydbg to patch the specific location and write the modifications to the exe. Use a binary comparison utility (you may find one in most hex editors) to compare the original and the modified exe. Code a program that makes the changes to the location you found above. You'll need these APIs: CreateFile, SetFilePointer, WriteFile, CloseHandle. Of course, you could also check the exe file size and game version to make sure the user isn't patching the wrong file, add a nice "open file" dialog to let the user choose the location of the file to patch, etc. Quote:
You're really funny, you know? Can't they just use your patch, compare the patched version with the non-patched one and find out what you found out before them? Do you really think the makers of the game - who have the source in plain text, duh - don't already know where the "thing" is? This is just stupid. They already know it and they know their game is "vulnerable", but 1) don't care or 2) don't have enough resources (time, money, competencies, etc.) to implement or buy the proper protection that would make their software just *a little bit* more difficult to crack. |
|||
25 Oct 2009, 12:39 |
|
ManOfSteel 25 Oct 2009, 12:46
bitshifter wrote: FASM really should have a simple file io demo in the examples folder... *hint* Um, yes. And examples for a crack and keygen. And then why not a few worms and trojans too. . . . . . . . . . . Just kidding. |
|||
25 Oct 2009, 12:46 |
|
bitshifter 25 Oct 2009, 12:50
LOL
Yeah, might as well throw a shell hook in there too |
|||
25 Oct 2009, 12:50 |
|
Black0ne 25 Oct 2009, 15:43
ManOfSteel, the purpose of making the patch is to prevent those that use it from knowing whats done. I don't want to example step by step how to bypass the program so that everyone can do it step by step, i want to make sure that once its patched they will be forced to try and learn how its done. if i send out the source it will be patched in a week and for the leechers on the forums, they will simple take it and go until its blocked and never make an effort to further there own knowledge. that is what im trying to prevent, i want to show them that it can be done, even with my lack of knowledge I figured it out. but make it so that they will have to start trying to learn it themselves.
only I first have to learn asm. and I got some type of tutorial list from http://win32assembly.online.fr/ only all of it is based on MASM32 so when I try to apply that knowledge I got it all wrong since fasm does everything differently. also this clearly has mistakes but i was wondering is this anywhere near correct? Code: stack 200h entry codex:Start segment Addy ; Addy (address) segment 00446FAB ; the address that controls Collision segment enable db eb 6f ; eb 6f is no collision , so godmode! segment disable db 7b 6f ; 7b 6f is collision , so no godmode. segment codex Start: push eax ; from what i understand that saves eax at the current value. ; mov eax, [00446FAB] / disable <-- wasn't sure if i needed to move the value into eax if it was already there so. i commented it. cmp eax, [00446FAB] ; cmp eax (unmodified) to the value of the address containing collision, or i could just do cmp eax, disable jne _NotActive ; if it isnt the same then jump to change it. segment _NotActive pop eax ; from what i understand pop removes / clears the register eax. mov eax, enable ; then put enable / eb 6f ( no collision) into the address, creating god. |
|||
25 Oct 2009, 15:43 |
|
Goto page Previous 1, 2 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.