Created
February 1, 2012 16:13
-
-
Save fredimachado/1717771 to your computer and use it in GitHub Desktop.
OpcodeTools with 4.3.2 15211 and 4.2.2 14545 for https://github.com/Chameleo/OpcodeTools/commit/c12e9ae5396fe07a8426e351edcf8a8445a1c310
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Formulas.cs b/Formulas.cs | |
index f65d65c..fabc88b 100644 | |
--- a/Formulas.cs | |
+++ b/Formulas.cs | |
@@ -372,6 +372,44 @@ namespace OpcodeTools | |
{ | |
return ((opcode & 0x8000) >> 13) | ((opcode & 0x80) >> 7) | ((opcode & 0x800) >> 10); | |
} | |
+ } | |
+ | |
+ public class Windows422 : FormulasBase | |
+ { | |
+ public override string ToString() | |
+ { | |
+ return "4.2.2.14545 Windows"; | |
+ } | |
+ | |
+ protected override bool AuthCheck(uint opcode) | |
+ { | |
+ return (opcode & 0xEDFE) == 384; | |
+ } | |
+ | |
+ protected override bool SpecialCheck(uint opcode) | |
+ { | |
+ return (opcode & 0x294D) == 8268; | |
+ } | |
+ | |
+ protected override bool NormalCheck(uint opcode) | |
+ { | |
+ return (opcode & 0x2942) == 2114 && opcode != 7363 && opcode != 52479; | |
+ } | |
+ | |
+ public override uint CalcCryptedFromOpcode(uint opcode) | |
+ { | |
+ return opcode & 1 | ((opcode & 0x3C | ((opcode & 0x80 | ((opcode & 0x600 | ((opcode & 0x1000 | (opcode >> 1) & 0x6000) >> 1)) >> 1)) >> 1)) >> 1); | |
+ } | |
+ | |
+ public override uint CalcSpecialFromOpcode(uint opcode) | |
+ { | |
+ return (opcode & 2 | ((opcode & 0x30 | (((opcode & 0x80) | ((opcode & 0x600 | ((opcode & 0x1000 | (opcode >> 1) & 0x6000) >> 1)) >> 1)) >> 1)) >> 2)) >> 1; | |
+ } | |
+ | |
+ public override uint CalcAuthFromOpcode(uint opcode) | |
+ { | |
+ return opcode & 1 | ((opcode & 0x200 | (opcode >> 2) & 0x400) >> 8); | |
+ } | |
} | |
public class Windows430 : FormulasBase | |
@@ -450,5 +488,43 @@ namespace OpcodeTools | |
{ | |
return ((opcode & 0x1000) >> 9) | opcode & 1 | ((opcode & 0x400) >> 8) | ((opcode & 0x20) >> 4); | |
} | |
+ } | |
+ | |
+ public class Windows432 : FormulasBase | |
+ { | |
+ public override string ToString() | |
+ { | |
+ return "4.3.2.15211 Windows"; | |
+ } | |
+ | |
+ protected override bool AuthCheck(uint opcode) | |
+ { | |
+ return (opcode & 0xEDDE) == 264; | |
+ } | |
+ | |
+ protected override bool SpecialCheck(uint opcode) | |
+ { | |
+ return (opcode & 0xE50A) == 1024; | |
+ } | |
+ | |
+ protected override bool NormalCheck(uint opcode) | |
+ { | |
+ return (opcode & 0x9701) != 1281; | |
+ } | |
+ | |
+ public override uint CalcCryptedFromOpcode(uint opcode) | |
+ { | |
+ return (((opcode & 0xFE) | ((opcode & 0x800 | (opcode >> 1) & 0x3000) >> 3)) >> 1); | |
+ } | |
+ | |
+ public override uint CalcSpecialFromOpcode(uint opcode) | |
+ { | |
+ return (opcode & 1 | (((opcode & 4) | (((opcode & 0xF0) | ((opcode & 0x200 | (opcode >> 1) & 0xC00) >> 1)) >> 1)) >> 1)); | |
+ } | |
+ | |
+ public override uint CalcAuthFromOpcode(uint opcode) | |
+ { | |
+ return (opcode & 1 | ((opcode & 0x20 | ((opcode & 0x200 | (opcode >> 2) & 0x400) >> 3)) >> 4)); | |
+ } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment