Thread: Help with a chunk of assembly code

  1. #1
    Registered User
    Join Date
    Sep 2018
    Posts
    15

    Help with a chunk of assembly code

    Hello, i'm trying to disassemble some code from assembly.

    Code:
    mov   eax, [rbp+INT_A]
    cdqe
    movzx edx, [rbp+CHAR_AB]
    mov   [rbp+rax+char_90], dl
    I believe CDQE is convert Dword into Qword so something like int A = *AB assuming AB is a pointer.
    I don't know how the last statement fits into the code.
    i think dl also comes up when i set char_90 = function or some other code.
    Last edited by Passwaters; 12-01-2018 at 12:24 AM. Reason: Formatting

  2. #2
    Programming Wraith GReaper's Avatar
    Join Date
    Apr 2009
    Location
    Greece
    Posts
    2,739
    It seems to me that it's taking a 32-bit value from the stack and converts it to 64-bit, take another 8-bit value from the stack and converts it to 32-bit (or is it 16-bit, can't remember which is the default). Then it uses the first number as offset to a byte array (which is on the stack too) in which it places the first byte of the second number...

    In other words:
    Code:
    {
        int INT_A;
        char CHAR_AB;
        char char_90[90];
    
        char_90[INT_A] = CHAR_AB;
    }
    Devoted my life to programming...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Not reading from file after a certain chunk of code
    By OSamo in forum C Programming
    Replies: 2
    Last Post: 01-24-2014, 11:14 AM
  2. is object code the same as assembly source code?
    By c_weed in forum Tech Board
    Replies: 3
    Last Post: 01-05-2012, 07:25 PM
  3. Generate Assembly code and Binary code also
    By Hannibal2010 in forum C Programming
    Replies: 16
    Last Post: 07-07-2011, 05:43 AM
  4. Convert assembly>machine code, machine code>assembly
    By wenxinleong in forum C Programming
    Replies: 12
    Last Post: 06-23-2011, 10:42 PM
  5. Chunk Split
    By bobbelPoP in forum C++ Programming
    Replies: 7
    Last Post: 08-15-2008, 08:32 PM

Tags for this Thread