Depexes are postfix, so you push the GUIDs you want to work with onto a stack, then perform the desired operation on them(which pops the GUIDs off the stack). The result is pushed onto the stack and the process repeated until the END opcode is reached. If the entire depex evaluates to true, the module is loaded and executed. if not, the module is pushed back into the queue to try again later.
Depexes (if there are any) are usually in the _2_ file. Most of the ones I've looked at begin with the byte 0x02 (the PUSH opcode) and all of them so far have ended with the byte 0x08 (the END opcode).
A couple examples:
The file 6CDF9BAA-0934-43C2-A85F-286386097604_2_1156.rom (SystemHddPwdSmm.efi) contains the following depex:
Code:
02 4D 95 90 13 95 DA 27 42 93 28 72 82 C2 17 DA
A8 02 73 B7 41 E5 11 DD 0C 42 B0 26 DF 99 36 53
F8 BF 03 02 5F 8A 18 69 BD 6B C7 46 9C 16 55 F1
94 BE FC DF 03 02 68 D6 B3 D0 CF 16 EB 4F 95 F5
1C A3 69 3C FE 56 03 02 67 45 23 01 AB 89 EF CD
01 23 45 67 89 AB CD EF 03 08
breaking it down you get
02 : push
4D 95 90 13 95 DA 27 42 93 28 72 82 C2 17 DA A8 : GUID
02 : push
73 B7 41 E5 11 DD 0C 42 B0 26 DF 99 36 53 F8 BF : GUID
03 : and
02 : push
5F 8A 18 69 BD 6B C7 46 9C 16 55 F1 94 BE FC DF : GUID
03 : and
02 : push
68 D6 B3 D0 CF 16 EB 4F 95 F5 1C A3 69 3C FE 56 : GUID
03 : and
02 : push
67 45 23 01 AB 89 EF CD 01 23 45 67 89 AB CD EF : GUID
03 : and
08 : end
(I don't know if the GUID are in little endian or not)
In the file 1C6B2FAF-D8BD-44D1-A91E-7321B4C2F3D1_2_23.rom (SystemBootScriptSaveDxe.efi) you see
which breaks down to
06 : true
08 : end
So basically, this module has no dependencies and will always load when it's discovered by the DXE dispatcher.
I hope all that makes sense.