This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

virus?

i got this code and it worked but now it makes error. works with proteos. can processor cpu have another virus?

void Secret_Code(unsigned char *input,unsigned long len)
{ unsigned int k; unsigned int nps = 0; for(k = 0; k < len; k++) { if(input[k] == 0xCC) { if(input[k + 1] == 0xCC && input[k + 2] == 0xCC && input[k + 3] == 0xCC) { switch(rand()%3) { case 0: input[k] = 0x57; input[k + 1] = 0x5F; k = k + 1; break; case 1: input[k] = 0xC0; input[k + 1] = 0xFE; input[k + 2] = 0xC8; input[k + 3] = 0xFE; k=k+3; break; case 2: input[k] = 0xF8; k++; break; } } } else if(input[k] == 0x90) { nps = NpsInARow(input,k); if(nps > 1) { printf("Found (In a row: %d)!\n",nps); } switch(nps){ case 3: input[k] = 0x14; input[k + 1] = 0x21; input[k + 2] = rand(); k = k + 2; break; case 4: input[k] = 0x56; input[k + 1] = 0x19; input[k + 2] = 0x47; input[k + 3] = 0x29; k = k + 3; break; case 5: input[k] = 0x73; input[k + 1] = 0x23; input[k + 2] = 0x95; input[k + 3] = 0x02; input[k + 4] = rand(); k = k + 4; break;

} } }
}

Parents
  • I still don't see why this code would be useful for anything and why ask on an open forum to people who wont understand it anyway. It doesn't protect any code and it doesn't obfuscate any code. As soon a an executable is built with "pernament" options the fill chars are only used in between different modules linked to the same binary executable. If we use "optimize for size" they are never used.

    So what's the idea behind replacing 0x90 and 0xCC?

Reply
  • I still don't see why this code would be useful for anything and why ask on an open forum to people who wont understand it anyway. It doesn't protect any code and it doesn't obfuscate any code. As soon a an executable is built with "pernament" options the fill chars are only used in between different modules linked to the same binary executable. If we use "optimize for size" they are never used.

    So what's the idea behind replacing 0x90 and 0xCC?

Children