// Returns 0xFFFF if not found word getPINcode() { static word *fwPINCode = NULL; if(fwPINCode == NULL) { short *pOffset; InitTAPex(); pOffset = (short*)FindInstructionSequence( "8f99a4a0 97390000 17240003 24190a2e 03e00008 00001025 14990003 2402ffff 03e00008 00001025 03e00008 00000000", "ffff0000 ffffffff fffffff0 ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff", 0x80160000, 0x80200000, 0, FALSE); if(pOffset == NULL) { TAP_Print("No PINCode variable - unsupported firmware (fw: %d:%x)\n",SysID,ApplID); return 0xFFFF; } fwPINCode = *(word**)(FWgp + pOffset[1]); } return *fwPINCode; } void GetToppyPIN(char *pin) { word code = getPINcode(); if(code == 0xFFFF) *pin = 0; else TAP_SPrint(pin, "%4.4d", code); }