Guest User

Untitled

a guest
Oct 23rd, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. //Clean Code Sample - By Heero
  2.  
  3. #include <iostream>
  4.  
  5. using namespace std;
  6.  
  7. //Our PROGRAM or DLLS main function, where all INSTRUCTIONS are carried out.
  8. int main(int argc[], char* argv)
  9. {
  10. //Variable Table * - * The double-slash identifier: "//" is a C++ COMMENT
  11. int AddressCall = 0;
  12.  
  13. //Program Operation
  14. AddressCall = 0x00000000;
  15.  
  16. typedef void *AddressCallPointer = &AddressCall;
  17.  
  18. __asm{
  19. ;This is an example of how to use inline ASSEMBLY (Within C++)
  20. ;The ';' character is an ASSEMBLY COMMENT and will not be read
  21. ;by the ASSEMBLER, or COMPILER.
  22. ;
  23. push eax,0x00000000
  24. ;
  25. ;The above instruction 'push' takes the value of the ADDRESS
  26. ;0x00000000 and then applies it to the REGISTER 'eax' within
  27. ;your PROCESSOR.
  28. }
  29.  
  30. //Loop
  31. while(true) //While the program is running, execute the contents within '{' '}' characters.
  32. {
  33. if(GetASyncKey("VK_MENU") && GetASyncKey("G")) //ALT + G = Our Godmode Key Combonation
  34. {
  35. CallAddress();
  36. //Call the function CallAddress();
  37. //The Contents of CallAddress() is the ASSEMBLY INSTRUCTION
  38. //that is within the INLINE ASSEMBLY I covered earlier.
  39. }
  40. }
  41.  
  42. //Program Cleanup
  43. return 0;
  44. }
  45.  
  46. //This function will only be used if it is CALLED
  47. void CallAddress()
  48. {
  49. AddressCall;
  50. //This Allows us to CALL (Use) the INLINE ASSEMBLY INSTRUCTIONS
  51. //without them being called in an expected way. (By Gunz.exe)
  52. //INLINE FUNCTIONS, cannot be called the same way.
  53. }
Add Comment
Please, Sign In to add comment