- Joined
- Dec 2, 2007
- Messages
- 18
- Reaction score
- 7
First of all, I come from China. This article is translated by Google, because my English is not good
Thank you
wdf file:
No file names, only the hash (like md5, only 4 bytes, it may be to reduce the wdf file size, etc.)
config.wdf
There are many configuration files. Most of lua (
But luac file is encrypted, decrypted as follows:
pDecrypted become standard luac
But ...
Chinese flyff modified lua source of opcodes
Add "and or not shl shr" The five opcodes
Here is the order of opcodes
Tired, rest a while...
Can I continue to write it in Chinese?:blush:
Thank you
wdf file:
No file names, only the hash (like md5, only 4 bytes, it may be to reduce the wdf file size, etc.)
config.wdf
There are many configuration files. Most of lua (
You must be registered to see links
) compiled files (temporarily called "luac file")But luac file is encrypted, decrypted as follows:
Code:
BYTE * pLuac; / / luac data
int nLen; / / luac file size
BYTE * pDecrypted; / / decrypted data, the size is nLen +1
for (int i = 0; i <nLen; i + +)
{
BYTE byTemp = (~ pLuac [i]) | 0x3D;
pLuac [i] = (byTemp <<4) | (byTemp>> 4);
}
pDecrypted [0] = 0x1B; / / reference to lua source
pDecrypted [1-3] = "Lua"; / / shorthand
memcpy (pDecrypted +4, pLuac +3, nLen-3); / / copy the remaining data
But ...
Chinese flyff modified lua source of opcodes
Add "and or not shl shr" The five opcodes
Here is the order of opcodes
Code:
typedef enum {
/*------------------------------------------------ ----------------------
name args description
-------------------------------------------------- ----------------------*/
OP_MOVE = 7, / * A B R (A): = R (B) * /
OP_LOADK = 8, / * A Bx R (A): = Kst (Bx) * /
OP_LOADBOOL = 9, / * ABC R (A): = (Bool) B; if (C) pc + + * /
OP_LOADNIL = 10, / * AB R (A): = ...: = R (B): = nil * /
OP_GETUPVAL = 11, / * A B R (A): = UpValue [B] * /
OP_GETGLOBAL = 0, / * A Bx R (A): = Gbl [Kst (Bx)] * /
OP_GETTABLE = 1, / * ABC R (A): = R (B) [RK (C)] * /
OP_SETGLOBAL = 2, / * A Bx Gbl [Kst (Bx)]: = R (A) * /
OP_SETUPVAL = 3, / * A B UpValue [B]: = R (A) * /
OP_SETTABLE = 4, / * ABC R (A) [RK (B)]: = RK (C) * /
OP_NEWTABLE = 5, / * ABC R (A): = {} (size = B, C) * /
OP_SELF = 6, / * ABC R (A +1): = R (B); R (A): = R (B) [RK (C)] * /
OP_ADD = 29, / * A B C R (A): = RK (B) + RK (C) * /
OP_SUB = 30, / * A B C R (A): = RK (B) - RK (C) * /
OP_MUL = 31, / * A B C R (A): = RK (B) * RK (C) * /
OP_DIV = 32, / * A B C R (A): = RK (B) / RK (C) * /
OP_MOD = 33, / * A B C R (A): = RK (B)% RK (C) * /
OP_POW = 34, / * A B C R (A): = RK (B) ^ RK (C) * /
OP_UNM = 35, / * A B R (A): =-R (B) * /
OP_NOT = 36, / * A B R (A): = not R (B) * /
OP_LEN = 37, / * A B R (A): = length of R (B) * /
OP_AND = 38, / * and ABC R (A): = RK (B) & RK (C) * /
OP_OR = 39, / * or A B C R (A): = RK (B) | RK (C) * /
OP_XOR = 40, / * xor ABC R (A): = RK (B) ^ RK (C) * /
OP_SHL = 41, / * shl ABC R (A): = RK (B) <<RK (C) * /
OP_SHR = 42, / * shr ABC R (A): = RK (B)>> RK (C) * /
OP_INY = 43, / * not A B R (A): = ~ R (B) * /
OP_CONCAT = 12, / * ABC R (A): = R (B) .. ... .. R (C) * /
OP_JMP = 13, / * sBx pc + = sBx * /
OP_EQ = 14, / * ABC if ((RK (B) == RK (C)) ~ = A) then pc + + * /
OP_LT = 15, / * ABC if ((RK (B) <RK (C)) ~ = A) then pc + + * /
OP_LE = 16, / * ABC if ((RK (B) <= RK (C)) ~ = A) then pc + + * /
OP_TEST = 17, / * AC if not (R (A) <=> C) then pc + + * /
OP_TESTSET = 18, / * ABC if (R (B) <=> C) then R (A): = R (B) else pc + + * /
OP_CALL = 19, / * ABC R (A), ..., R (A + C-2): = R (A) (R (A +1), ..., R (A + B-1) ) * /
OP_TAILCALL = 20, / * ABC return R (A) (R (A +1), ..., R (A + B-1)) * /
OP_RETURN = 21, / * AB return R (A), ..., R (A + B-2) (see note) * /
OP_FORLOOP = 22, / * A sBx R (A) + = R (A +2);
if R (A) <? = R (A +1) then {pc + = sBx; R (A +3) = R (A)} * /
OP_FORPREP = 23, / * A sBx R (A) -= R (A +2); pc + = sBx * /
OP_TFORLOOP = 24, / * AC R (A +3), ..., R (A +2 + C): = R (A) (R (A +1), R (A +2));
if R (A +3) ~ = nil then R (A +2) = R (A +3) else pc + + * /
OP_SETLIST = 25, / * ABC R (A) [(C-1) * FPF + i]: = R (A + i), 1 <= i <= B * /
OP_CLOSE = 26, / * A close all variables in the stack up to (> =) R (A) * /
OP_CLOSURE = 27, / * A Bx R (A): = closure (KPROTO [Bx], R (A), ..., R (A + n)) * /
OP_VARARG = 28 / * AB R (A), R (A +1), ..., R (A + B-1) = vararg * /
} OpCode;
////////////////////////////////////////////////// ////////////////////////
# Define NUM_OPCODES (cast (int, OP_INY) + 1)
Tired, rest a while...
Can I continue to write it in Chinese?:blush: