Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const BYTE mainKey[16] = {
- 0x64, 0x45, 0x1B, 0xD1,
- 0x63, 0xA0, 0x93, 0x19,
- 0x5C, 0xFF, 0xFC, 0x1D,
- 0xE4, 0x3D, 0x18, 0x2A,
- };
- struct security_s {
- bool findSection(BYTE* dosBase, int* lpOutOffset, int *lpOutsize);
- bool unpack();
- };
- security_s security;
- bool security_s::findSection(BYTE* dwBase, int* lpOutOffset, int *lpOutsize)
- {
- char* rData = "", *text = "";
- unsigned char key[3] = { 0xAA, 0xFF, 0xB8 };
- __asm__(
- "xor r8 r3 r5"
- "xor r5 r6 r11"
- "xor r4 r7 r5"
- "srwi r5 r5 8"
- "clrlslwi r8 r4 24 7"
- );
- int len = strlen(text);
- for (int i = 0; i < len; i++)
- {
- text[i] = text[i] ^ key[i % (sizeof(key) / sizeof(unsigned char))];
- }
- int len2 = strlen(rData);
- for (int i = 0; i < len2; i++)
- {
- rData[i] = rData[i] ^ key[i % (sizeof(key) / sizeof(unsigned char))];
- }
- BYTE* sectionOffset = dwBase;
- while (strcmp(rData, (char*)sectionOffset)) sectionOffset += 4;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement