Funny, i was just reading that when I saw this reply.
But I didn't actually find an answer to my question if an exe can be translated to asm.
Funny, i was just reading that when I saw this reply.
But I didn't actually find an answer to my question if an exe can be translated to asm.
Last edited by maxorator; 06-27-2006 at 02:38 PM.
Yes, you can convert machine code to assembly. (Disassembling.) However, you lose comments, notation, variable names, labels, etc - anything to explain what the code actually does, other than the raw commands themselves, making the code very hard to comprehend. (As, I think, already seen in this thread.)
long time; /* know C? */
Unprecedented performance: Nothing ever ran this slow before.
Any sufficiently advanced bug is indistinguishable from a feature.
Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31.
The best way to accelerate an IBM is at 9.8 m/s/s.
recursion (re - cur' - zhun) n. 1. (see recursion)
That code is stupid. I've looked at it many times and cannot fathom why someone would want to do that.
It uses 3 registers, eax, ecx, and edx. Eax and edx are explicit return registers as well as ecx, but ecx is normally used as a count register in preparation for a string operation - usually using the rep prefix.
It is far easier to access structures in pure asm code and/or in inline assembly code. Inline assembly will allow you to access structures provided you load the base address of the structure. An example from MSVC help file:
If you are attempting to access variables in memory based on information from a hack site about hacking Vice City - I think this discussion is over. I won't help you poke around in another process's memory.Code:// InlineAssembler_Accessing_C_asm_Blocks.cpp // processor: x86 #include <stdio.h> struct first_type { char *weasel; int same_name; }; struct second_type { int wonton; long same_name; }; int main() { struct first_type hal; struct second_type oat; __asm { lea ebx, hal mov ecx, [ebx]hal.same_name ; Must use 'hal' mov esi, [ebx].weasel ; Can omit 'hal' } return 0; }
Well, actually, if you've noticed, the program is not made by me and is "Vice City Multiplayer" and I am just trying to understand what it's functions do.
It just seems that the real coders weren't very smart...
Last edited by maxorator; 06-28-2006 at 03:24 AM.
Even without comments and variable names it is possible to understand the code (if it is not too complicated program).
I just like the idea that I can "change" simple programs. (For example change strings.)
Last edited by maxorator; 06-28-2006 at 04:24 AM.
Well if it's understanding of C++ code you're after, then find something else.
This is either
- A half-assed attempt at reverse engineering ASM code back to C++
- A deliberate attempt at obfuscation by turning what was a C++ program into a mixed-language mess.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
If at first you don't succeed, try writing your phone number on the exam paper.
I highly doubt this came out of Rockstar Games. This code is horrible.
No, actually Vice City Multiplayer was developed by some other people (some very HORRIBLE coders).
Code://---------------------------------------------------------- // // VC:MP Multiplayer Modification For GTA:VC // Copyright 2004-2005 SA:MP team // // File Author: kyeman // //----------------------------------------------------------
just a question being as this topic has been mentioned.
I know _asm is the inline assembly keyword, but can anyone tell me what type/brand of assembly language this is? for example there are many x86 assemblers, masm, tasm, nasm, fasm, etc. so what would this be?
say for example I want to learn some Assembly soon. just to use inline in my C++ programs (I don't intend on leaving C++ for Assembly, Assembly seems TOO low level for me, languages like Pascal are TOO high level for me, C is just right, for me at least). what assembler do you recommend that I should learn/use?
Last edited by Bleech; 06-28-2006 at 08:46 PM.
Intel Core 2 Quad Q6600 @ 2.40 GHz
3072 MB PC2-5300 DDR2
2 x 320 GB SATA (640 GB)
NVIDIA GeForce 8400GS 256 MB PCI-E
This is x86 assembly language, otherwise known as 8086 assembly. TASM, MASM, FASM, BASM, NASM - all just assemblers.
Since this is inline assembly and based on the example, I'd say this is Visual Studio's inline assembler syntax. Note that it does differ from MASM in several ways.
Hi there,
For more information about assembler in the Windows environment (or in general) I hope you don't mind pointing out a forum dedicated to it at www.asmcommunity.net/board/ .