define pcodeop encls_ecreate; define pcodeop encls_eadd; define pcodeop encls_einit; define pcodeop encls_einit_ZF; define pcodeop encls_eremove; define pcodeop encls_eremove_ZF; define pcodeop encls_edbgrd; define pcodeop encls_edbgrd_RBX; define pcodeop encls_edbgwr; define pcodeop encls_eextend; define pcodeop encls_eldb; define pcodeop encls_eldb_ZF; define pcodeop encls_eldu; define pcodeop encls_eldu_ZF; define pcodeop encls_eblock; define pcodeop encls_eblock_ZF; define pcodeop encls_epa; define pcodeop encls_ewb; define pcodeop encls_ewb_ZF; define pcodeop encls_ewb_CF; define pcodeop encls_etrack; define pcodeop encls_etrack_ZF; define pcodeop encls_eaug; define pcodeop encls_emodpr; define pcodeop encls_emodpr_ZF; define pcodeop encls_emodt; define pcodeop encls_emodt_ZF; define pcodeop encls_unknown; :ENCLS is vexMode=0 & byte=0x0f; byte=0x01; byte=0xcf { if ( EAX != 0x0 ) goto ; encls_ecreate( RBX, RCX ); goto ; if ( EAX != 0x1 ) goto ; encls_eadd( RBX, RCX ); goto ; if ( EAX != 0x2 ) goto ; RAX = encls_einit( RBX, RCX, RDX ); ZF = encls_einit_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x3 ) goto ; RAX = encls_eremove( RCX ); ZF = encls_eremove_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x4 ) goto ; RAX = encls_edbgrd( RCX ); RBX = encls_edbgrd_RBX( RCX ); goto ; if ( EAX != 0x5 ) goto ; RAX = encls_edbgwr( RBX, RCX ); goto ; if ( EAX != 0x6 ) goto ; encls_eextend( RBX, RCX ); goto ; if ( EAX != 0x7 ) goto ; RAX = encls_eldb( RBX, RCX, RDX ); ZF = encls_eldb_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x8 ) goto ; RAX = encls_eldu( RBX, RCX, RDX ); ZF = encls_eldu_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x9 ) goto ; RAX = encls_eblock( RCX ); ZF = encls_eblock_ZF( RCX ); PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0xA ) goto ; encls_epa( RBX, RCX ); goto ; if ( EAX != 0xB ) goto ; RAX = encls_ewb( RBX, RCX, RDX ); ZF = encls_ewb_ZF( RBX, RCX, RDX ); CF = encls_ewb_CF( RBX, RCX, RDX ); PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0xC ) goto ; RAX = encls_etrack( RCX ); ZF = encls_etrack_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0xD ) goto ; encls_eaug( RBX, RCX, RDX ); goto ; if ( EAX != 0xE ) goto ; RAX = encls_emodpr( RBX, RCX ); ZF = encls_emodpr_ZF( RCX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0xF ) goto ; RAX = encls_emodt( RBX, RCX ); ZF = encls_emodt_ZF( RCX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; encls_unknown(); } define pcodeop enclu_ereport; define pcodeop enclu_egetkey; define pcodeop enclu_egetkey_ZF; define pcodeop enclu_eenter_EAX; define pcodeop enclu_eenter_RCX; define pcodeop enclu_eenter_TF; define pcodeop enclu_eresume; define pcodeop enclu_eexit; define pcodeop enclu_eexit_TF; define pcodeop enclu_eaccept; define pcodeop enclu_eaccept_ZF; define pcodeop enclu_emodpe; define pcodeop enclu_eacceptcopy; define pcodeop enclu_eacceptcopy_ZF; define pcodeop enclu_unknown; :ENCLU is vexMode=0 & byte=0x0f; byte=0x01; byte=0xd7 { if ( EAX != 0x0 ) goto ; enclu_ereport( RBX, RCX, RDX ); goto ; if ( EAX != 0x1 ) goto ; RAX = enclu_egetkey( RBX, RCX ); ZF = enclu_egetkey_ZF( RBX, RCX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x2 ) goto ; tempBX:8 = RBX; tempCX:8 = RCX; EAX = enclu_eenter_EAX( tempBX, tempCX ); RCX = enclu_eenter_RCX( tempBX, tempCX ); TF = enclu_eenter_TF( tempBX, tempCX ); goto ; if ( EAX != 0x3 ) goto ; TF = enclu_eresume( RBX, RCX ); goto ; if ( EAX != 0x4 ) goto ; RCX = enclu_eexit( RBX ); TF = enclu_eexit_TF( RBX ); goto ; if ( EAX != 0x5 ) goto ; RAX = enclu_eaccept( RBX, RCX ); ZF = enclu_eaccept_ZF( RBX, RCX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; if ( EAX != 0x6 ) goto ; enclu_emodpe( RBX, RCX ); goto ; if ( EAX != 0x7 ) goto ; RAX = enclu_eacceptcopy( RBX, RCX, RDX ); ZF = enclu_eacceptcopy_ZF( RBX, RCX, RDX ); CF = 0; PF = 0; AF = 0; OF = 0; SF = 0; goto ; enclu_unknown(); }