locked
inline assembly problem RRS feed

  • Question

  • Hello , how i can fix this code without converting it manually to bytes ?

    int address = 0x12345;

    _declspec(naked) int test()
    {
    _asm mov ds:[address] , 1 //code injection -->> wrong address
    _asm mov ds:[0x12345] , 1 //code injection -->> Correct address

    //inside the target process it writes the address of the variable , not the address that i want (0x12345) and it takes time to convert it manually to array of bytes

    }

    Monday, November 2, 2020 2:40 PM