• Amused
  • Angry
  • Annoyed
  • Awesome
  • Bemused
  • Cocky
  • Cool
  • Crazy
  • Crying
  • Down
  • Drunk
  • Embarrased
  • Enraged
  • Friendly
  • Geeky
  • Godly
  • Happy
  • Hateful
  • Hungry
  • Innocent
  • Meh
  • Piratey
  • Poorly
  • Sad
  • Secret
  • Shy
  • Sneaky
  • Tired
  • Wtf
  • At Work
  • CodenzHub
  • Coding
  • Deejaying
  • Donating
  • Drinking
  • Eating
  • Editing
  • Hacking
  • Hate Mailing
  • Jamin'
  • Lagging
  • Live Streaming
  • Lurking
  • No Status
  • Pawning
  • PC Gaming
  • PS Gaming
  • Raging
  • Reversing
  • Sleeping
  • Steam Gaming
  • Trolling
  • TwitchStreamer
  • Vodka!
  • Watching TV/Movie
  • Xbox Gaming
  • Youtuber
  • Zombies
  • Results 1 to 4 of 4
    1. #1
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      146

      Small Assembly question

      Silent VPN
      Hello I have a question about the lea instruction and arrays, This works fine:
      [PHP]
      char *msg = new char[6];
      msg = "hello";

      _asm{
      push 10h
      push 0
      mov eax, [msg]
      push eax
      push 0
      call MessageBox
      }
      }[/PHP]

      But why do I get an "operand size conflict" error here?

      [PHP]
      char msg2[] = "hey2";
      _asm{
      push 10h
      push 0
      mov eax, [msg2]
      push eax
      push 0
      call MessageBox
      }
      [/PHP]

      And why does it work with lea?

      [PHP]
      char msg2[] = "hey2";
      _asm{
      push 10h
      push 0
      lea eax, [msg2] // <-
      push eax
      push 0
      call MessageBox
      }
      [/PHP]
      Donate  

    2. #2
      Coder
      Kappa
       
      Hacking
       
      Szaka's Avatar
      Join Date
      Mar 2013
      Posts
      168
      Thanks (-->)
      1
      Thanks (<--)
      6
      mov will copy first 4 chars as a dword, and lea will load the address of beginning of the string

    3. #3
      Hacker
      ^.^
       
      Eating
       
      NTvalk's Avatar
      Join Date
      Jul 2013
      Location
      Your RAM
      Posts
      512
      Thanks (-->)
      176
      Thanks (<--)
      146
      Quote Originally Posted by Szaka View Post
      mov will copy first 4 chars as a dword, and lea will load the address of beginning of the string
      Alright well I thought it would mov the pointer.
      thread can be closed.

    4. #4
      Learning to hack games!
       
      Feeling Normal
       
      's Avatar
      Join Date
      Jan 1970
      Posts
      0
      Thanks (-->)
      294
      Thanks (<--)
      328
      Silent VPN
      Thread closed upon OP request!

    Similar Game Hacker Threads

    1. [Release] Small VAC Script Collection
      By c5 in forum AntiCheat - AntiDebug
      Replies: 5
      Last Post: 11-24-2015, 04:31 AM
    2. [Source Code] Small simple snipple for toggling features in trainers...
      By SICGames88 in forum Tutorials and Snippets
      Replies: 10
      Last Post: 09-11-2015, 10:27 AM
    3. [Help] Floats from assembly
      By hallen in forum C/C++
      Replies: 2
      Last Post: 04-12-2014, 03:07 AM
    4. [Help] ESP (small problem)
      By mihas404 in forum Hacking Help
      Replies: 18
      Last Post: 12-17-2013, 04:41 PM
    5. [H E L P] Small annoying error...
      By Derpman in forum C/C++
      Replies: 6
      Last Post: 03-11-2013, 12:48 PM

    Tags for this Thread