0x080484ad <+0>:     xor    %ebx,%ebx
   0x080484af <+2>:     mov    (%eax),%bl   *****
   0x080484b1 <+4>:     xor    $0x52,%bl
   0x080484b4 <+7>:     cmp    $0x11,%bl
   0x080484b7 <+10>:    jne    0x8048510 
   0x080484b9 <+12>:    mov    0x7(%eax),%bl
   0x080484bc <+15>:    sub    $0x16,%bl
   0x080484bf <+18>:    cmp    $0xd,%bl
   0x080484c2 <+21>:    jne    0x8048510 
   0x080484c4 <+23>:    mov    0x1(%eax),%bl

I am having a problem understanding the register %bl. The register %eax has the value of "12345678" (string) under the address. I understand that in the second line we are moving the value of $eax to %bl (8 bits). So it is supposed to take the first two numbers from the string "12", right? I wish some clarify this line. Thanks a lot.

  • No, 8 bits is just one character i.e. '1'.
    – kennytm
    Commented Feb 24, 2017 at 5:11

1 Answer 1


at&t syntax throws me off so i would go with intel syntax
I would also stick with hex as base in my answer

if eax holds an address like 0x80481234 and it points to a variable like 0x12345678
moving the byte to bl would make bl 0x78
0x78 is xorred by 0x52 and the result should be 0x11
so xorring 0x52 by 0x11 should get you the required input

enter image description here

  • 1
    @mylifeisdark If you find the answer helpful you should consider Accepting it, if you didn't already.
    – NirIzr
    Commented Mar 26, 2017 at 8:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.