// Returns 1 if PIN window showing int IsPinShowing() { static TYPE_Win *fwPINwin = NULL; if(fwPINwin == NULL) { word *pOffset; InitTAPex(); pOffset = (word*)FindInstructionSequence( "3c0481ce 0c04d10f 248418ac 3c058019 24a5b024 0c054ad5 3404e300 8fbf0014", "ffff0000 fc000000 ffff0000 ffff0000 ffff0000 fc000000 ffffffff ffff0000", 0x80170000, 0x80210000, 0, FALSE); if(pOffset == NULL) { TAP_Print("No PINCode window - unsupported firmware (fw: %d:%x)\n",SysID,ApplID); return 0; } fwPINwin = (TYPE_Win*)((pOffset[1]<<16)+(short)pOffset[5]); } return fwPINwin->saveBuf != NULL; }