L2Tower Discord
Let's keep the community alive with discord.
Discussions about plugins and scripts
L2Tower Discord
Thread Rating:
- 3 Vote(s) - 3 Average
- 1
- 2
- 3
- 4
- 5
Opcode obfuscation
|
Author |
Message |
horato
Expired VIP Member
Posts: 7
Joined: Jul 2012
Reputation: 0
Version:
1.4.1.92
|
Opcode obfuscation
Hi, is here anyone able to help me with opcode obfusaction on glory days? I tried to use this one:
Code:
public class OpcodeObfuscator
{
private boolean m_enabled;
private int m_rand_seed;
private int m_size1;
private int m_size2;
private int m_size3;
private int[] m_decodeTable1;
private int[] m_decodeTable2;
private int[] m_decodeTable3;
public OpcodeObfuscator()
{
disable();
}
public void disable()
{
m_enabled = false;
m_rand_seed = 0;
m_size1 = m_size2 = m_size3 = 0;
m_decodeTable1 = m_decodeTable2 = m_decodeTable3 = null;
}
public void init_tables(int paramInt)
{
int i = 0;
int j = 0;
int k = 0;
int l = 0;
m_size1 = 208;
m_size2 = 0x68; //0x63
m_size3 = 6;
m_decodeTable1 = new int[m_size1 + 1];
m_decodeTable2 = new int[m_size2 + 1];
m_decodeTable3 = new int[m_size3 + 1];
for (i = 0; i <= m_size1; ++i)
{
m_decodeTable1[i] = i;
}
for (i = 0; i <= m_size2; ++i)
{
m_decodeTable2[i] = i;
}
for (i = 0; i <= m_size3; ++i)
{
m_decodeTable3[i] = i;
}
pseudo_rand_seed(paramInt);
for (i = 1; i <= m_size1; ++i)
{
k = pseudo_rand() % (i + 1);
j = m_decodeTable1[k];
m_decodeTable1[k] = m_decodeTable1[i];
m_decodeTable1[i] = j;
}
for (i = 1; i <= m_size2; ++i)
{
k = pseudo_rand() % (i + 1);
j = m_decodeTable2[k];
m_decodeTable2[k] = m_decodeTable2[i];
m_decodeTable2[i] = j;
}
for (i = 1; i <= m_size3; ++i)
{
k = pseudo_rand() % (i + 1);
j = m_decodeTable3[k];
m_decodeTable3[k] = m_decodeTable3[i];
m_decodeTable3[i] = j;
}
for (l = 0; m_decodeTable1[l] != 18; ++l)
{
;
}
j = m_decodeTable1[18];
m_decodeTable1[18] = 18;
m_decodeTable1[l] = j;
for (l = 0; m_decodeTable1[l] != 177; ++l)
{
;
}
j = m_decodeTable1[177];
m_decodeTable1[177] = 177;
m_decodeTable1[l] = j;
m_enabled = true;
}
public int decodeSingleOpcode(int paramInt)
{
if (!(m_enabled))
{
return paramInt;
}
if (paramInt > m_size1)
{
return paramInt;
}
paramInt = m_decodeTable1[paramInt];
return paramInt;
}
public int decodeDoubleOpcode(int paramInt)
{
if (!(m_enabled))
{
return paramInt;
}
if (paramInt > m_size2)
{
return paramInt;
}
paramInt = m_decodeTable2[paramInt];
return paramInt;
}
public int decodeTripleOpcode(int paramInt)
{
return paramInt;
}
private void pseudo_rand_seed(int paramInt)
{
m_rand_seed = paramInt;
}
private int pseudo_rand()
{
int i = m_rand_seed * 214013 + 2531011 & 0xFFFFFFFF;
m_rand_seed = i;
int j = m_rand_seed >> 16 & 0x7FFF;
return j;
}
}
but without success... Is it changed since GOD? Thanks
|
|
12-19-2012 11:12 AM |
|
horato
Expired VIP Member
Posts: 7
Joined: Jul 2012
Reputation: 0
Version:
1.4.1.92
|
RE: Opcode obfuscation
bump
|
|
12-26-2012 13:18 PM |
|
User(s) browsing this thread: 1 Guest(s)