Stack object attributes
EDIT TO ADD:
Ok, I've been snooping around in SimPE for a bit, and it seems like the following might do it:
In the Instruction Wizard, where you would normally select "Stack Object ID", you now go to the very bottom of the list, and select "Stack Object's master definition" instead.
In the field after it on the same line, you can then open the scroll menu and find "guid_1 - Read Only" and "guid_2 - Read Only". These supposedly are the two parts of the GUID of the object in Stack Object ID.
Thus, if you wish to know whether you stack object has a GUID of 0x01234567, you would compare guid_1 to 0x0123, and guid_2 to 0x4567. At least, that is what I suspect that it should in theory look like. Could also be the other way around, after all.
I cannot be certain that it'll work, because I've never had a need for this kind of code. But I hope that this will help you on your way.