Guest User

omega decoder sources

a guest
Dec 4th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 6.89 KB | None | 0 0
  1. /*
  2.  * Decompiled with CFR 0_123.
  3.  *
  4.  * Could not load the following classes:
  5.  *  
  6.  *  $php_module_m0f8e34485f84488d91ef415b0472a0f0_class0
  7.  *  $php_module_m3e6718be6b2b43f28e27b3cd29f9309c_class0
  8.  *  org.develnext.jphp.zend.ext.standard.StringFunctions
  9.  *  php.runtime.Memory
  10.  *  php.runtime.env.Environment
  11.  *  php.runtime.env.TraceInfo
  12.  *  php.runtime.ext.core.ArrayFunctions
  13.  *  php.runtime.ext.core.StringFunctions
  14.  *  php.runtime.invoke.cache.ClassCallCache
  15.  *  php.runtime.invoke.cache.ConstantCallCache
  16.  *  php.runtime.invoke.cache.FunctionCallCache
  17.  *  php.runtime.invoke.cache.MethodCallCache
  18.  *  php.runtime.invoke.cache.PropertyCallCache
  19.  *  php.runtime.lang.ForeachIterator
  20.  *  php.runtime.memory.LongMemory
  21.  *  php.runtime.memory.ReferenceMemory
  22.  *  php.runtime.memory.StringMemory
  23.  *  php.runtime.reflection.ClassEntity
  24.  */
  25. import org.develnext.jphp.zend.ext.standard.StringFunctions;
  26. import php.runtime.Memory;
  27. import php.runtime.env.Environment;
  28. import php.runtime.env.TraceInfo;
  29. import php.runtime.ext.core.ArrayFunctions;
  30. import php.runtime.invoke.cache.ClassCallCache;
  31. import php.runtime.invoke.cache.ConstantCallCache;
  32. import php.runtime.invoke.cache.FunctionCallCache;
  33. import php.runtime.invoke.cache.MethodCallCache;
  34. import php.runtime.invoke.cache.PropertyCallCache;
  35. import php.runtime.lang.ForeachIterator;
  36. import php.runtime.memory.LongMemory;
  37. import php.runtime.memory.ReferenceMemory;
  38. import php.runtime.memory.StringMemory;
  39. import php.runtime.reflection.ClassEntity;
  40.  
  41. public class $php_module_m3e6718be6b2b43f28e27b3cd29f9309c_class0
  42. extends .php_module_m0f8e34485f84488d91ef415b0472a0f0_class0 {
  43.     public static final String $FN = "D:\\1\\2\\backkkkkkkkk\\1\\src\\app\\modules\\EncDec.php";
  44.     public static TraceInfo[] $TRC = new TraceInfo[]{TraceInfo.valueOf((String)$FN, (long)11, (long)8), TraceInfo.valueOf((String)$FN, (long)12, (long)17), TraceInfo.valueOf((String)$FN, (long)14, (long)21), TraceInfo.valueOf((String)$FN, (long)17, (long)55), TraceInfo.valueOf((String)$FN, (long)18, (long)38), TraceInfo.valueOf((String)$FN, (long)19, (long)39), TraceInfo.valueOf((String)$FN, (long)20, (long)43), TraceInfo.valueOf((String)$FN, (long)20, (long)63), TraceInfo.valueOf((String)$FN, (long)20, (long)92)};
  45.     public static Memory[] $MEM = new Memory[]{StringMemory.valueOf((String)":"), LongMemory.valueOf((long)0), LongMemory.valueOf((long)0), LongMemory.valueOf((long)0), LongMemory.valueOf((long)0), LongMemory.valueOf((long)0)};
  46.     public static Memory[][] $AMEM = new Memory[0][];
  47.     public static FunctionCallCache $CALL_FUNC_CACHE = new FunctionCallCache();
  48.     public static MethodCallCache $CALL_METH_CACHE = new MethodCallCache();
  49.     public static PropertyCallCache $CALL_PROP_CACHE;
  50.     public static ConstantCallCache $CALL_CONST_CACHE;
  51.     public static ClassCallCache $CALL_CLASS_CACHE;
  52.     public static final String $CL = "app\\modules\\EncDec";
  53.  
  54.     public $php_module_m3e6718be6b2b43f28e27b3cd29f9309c_class0(Environment environment, ClassEntity classEntity) {
  55.         $php_module_m3e6718be6b2b43f28e27b3cd29f9309c_class0 $php_module_m3e6718be6b2b43f28e27b3cd29f9309c_class0;
  56.         super(environment, classEntity);
  57.     }
  58.  
  59.     public static Memory decode$34(Environment environment, Memory[] arrmemory) {
  60.         ReferenceMemory privateKey;
  61.         ReferenceMemory data = new ReferenceMemory();
  62.         if (Memory.assignRight((Memory)arrmemory[0], (Memory)data) == null) {
  63.             Memory.assignRight((Memory)Memory.NULL, (Memory)data);
  64.         }
  65.         if (Memory.assignRight((Memory)arrmemory[1], (Memory)(privateKey = new ReferenceMemory())) == null) {
  66.             Memory.assignRight((Memory)Memory.NULL, (Memory)privateKey);
  67.         }
  68.         ReferenceMemory item = new ReferenceMemory();
  69.         Memory signature = Memory.NULL;
  70.         ReferenceMemory keys = new ReferenceMemory();
  71.         Memory i = Memory.NULL;
  72.         ReferenceMemory publicKey = new ReferenceMemory();
  73.         ReferenceMemory chr = new ReferenceMemory();
  74.         Memory publicPos = Memory.NULL;
  75.         Memory rkey = Memory.NULL;
  76.         Memory decoded = Memory.NULL;
  77.         Memory privatePos = Memory.NULL;
  78.         ReferenceMemory encoded = new ReferenceMemory();
  79.         Memory publicEKey = Memory.NULL;
  80.         publicKey.assign(StringFunctions.substr((String)data.toString(), (int)((int)0), (int)((int)32)));
  81.         signature = StringFunctions.substr((String)data.toString(), (int)((int)-32));
  82.         encoded.assign(StringFunctions.explode((String)":", (String)StringFunctions.substr((String)data.toString(), (int)((int)32), (int)((int)-32)).toString()));
  83.         publicEKey = StringFunctions.md5((Environment)environment, (Memory)StringMemory.valueOf((String)privateKey.concat(publicKey.toImmutable())).toValue());
  84.         ForeachIterator foreachIterator = environment.__getIterator($TRC[0], (Memory)encoded, false, false);
  85.         while (foreachIterator.next()) {
  86.             Memory.assignRight((Memory)foreachIterator.getValue().toImmutable(), (Memory)item);
  87.             keys.refOfPush($TRC[1]).assign(StringFunctions.md5((Environment)environment, (Memory)StringMemory.valueOf((String)item.concat(privateKey.toImmutable())).toValue()));
  88.         }
  89.         rkey = StringFunctions.md5((Environment)environment, (Memory)StringFunctions.implode((Environment)environment, (TraceInfo)$TRC[2], (Memory)$MEM[0], (Memory)keys.toValue()).toValue());
  90.         if (rkey.equal(signature.toImmutable())) {
  91.             i = $MEM[1];
  92.             privatePos = $MEM[2];
  93.             publicPos = $MEM[3];
  94.             while (i.smaller(ArrayFunctions.count((Environment)environment, (TraceInfo)$TRC[3], (Memory)encoded.toValue()))) {
  95.                 if (StringFunctions.strlen((Environment)environment, (TraceInfo)$TRC[4], (Memory)publicKey.toValue()).minus(1).greaterRight(publicPos)) {
  96.                     publicPos = $MEM[4];
  97.                 }
  98.                 if (StringFunctions.strlen((Environment)environment, (TraceInfo)$TRC[5], (Memory)privateKey.toValue()).minus(1).greaterRight(privatePos)) {
  99.                     privatePos = $MEM[5];
  100.                 }
  101.                 Memory.assignRight((Memory)LongMemory.valueOf((long)(encoded.valueOfIndex($TRC[6], i).toLong() - (long)php.runtime.ext.core.StringFunctions.ord((char)publicKey.valueOfIndex($TRC[7], publicPos).toChar()) - (long)php.runtime.ext.core.StringFunctions.ord((char)privateKey.valueOfIndex($TRC[8], privatePos).toChar()))), (Memory)chr);
  102.                 decoded = StringMemory.valueOf((String)decoded.concat(php.runtime.ext.core.StringFunctions.chr((int)((int)chr.toLong()))));
  103.                 i = i.inc();
  104.                 privatePos = privatePos.inc();
  105.                 publicPos = publicPos.inc();
  106.             }
  107.         }
  108.         return decoded.toImmutable();
  109.     }
  110.  
  111.     static {
  112.         $CALL_CONST_CACHE = new ConstantCallCache();
  113.         $CALL_PROP_CACHE = new PropertyCallCache();
  114.         $CALL_CLASS_CACHE = new ClassCallCache();
  115.     }
  116. }
Advertisement
Add Comment
Please, Sign In to add comment