ZenHAX

Free Game Research Forum | Official QuickBMS support | twitter @zenhax | SSL HTTPS://zenhax.com
It is currently Sun Jan 20, 2019 8:18 pm

All times are UTC




Post new topic  Reply to topic  [ 1 post ] 
Author Message
 Post subject: rwby encrypted png
PostPosted: Sun Jan 13, 2019 5:06 pm 

Joined: Sun Jan 13, 2019 4:59 pm
Posts: 1
need help decrypting png files

Code:
88 50 51 4B 10 0E 21 10 09 08 0B 19 54 54 53 60 11 10 13 80 15 14 17 84 21 1E 1B 1A 1D E2 78 44
.PQK........TTS`........!.....xD


Code:
unsigned __int8 *__cdecl hProtoclEncryptBySeekEvenOdd::decrypt(hProtoclEncryptBySeekEvenOdd *this, hProtocolEncryptInterface *a2, unsigned __int8 *a3, int *a4)
{
  unsigned __int8 *v4; // esi@1
  int v5; // ST08_4@2
  hProtocolEncryptInterface *v6; // ST00_4@3
  int *v8; // [sp+Ch] [bp-10h]@0

  sub_6FF51B();
  v4 = (unsigned __int8 *)hProtocolEncryptInterface::getContentByEncryptData(a2, a3, (int)a4, v8);
  if ( v4 )
  {
    hProtoclEncryptBySeekEvenOdd::crypt(this, v4, *((_DWORD *)a2 + 5), *((_DWORD *)a2 + 3));
    if ( hProtocolEncryptInterface::getCheckSum(
           (hProtocolEncryptInterface *)v4,
           *((const unsigned __int8 **)a2 + 5),
           v5) != *((_DWORD *)a2 + 4) )
    {
      v6 = (hProtocolEncryptInterface *)v4;
      v4 = 0;
      operator delete[]((void *)v6);
    }
  }
  return v4;
}


int __cdecl hProtoclEncryptBySeekEvenOdd::crypt(hProtoclEncryptBySeekEvenOdd *this, unsigned __int8 *a2, int a3, char a4){
  int result;         // eax@1
  unsigned __int8 v5; // dl@5
  int v6; // ecx@5

  result = 0;
  if ( a3 > 0 )  {
    do    {
      while ( 1 )      {
        v5 = ~a2[result];
        a2[result] = v5;
        v6 = *((_DWORD *)this + 1);
        if ( v6 != 4 )
          break;
        a2[result] = a4 ^ v5;

LABEL_7:

        if ( ++result == a3 )
          return result;
      }
      if ( v6 == 2 && result & 1 )      {
        a2[result] = a4 ^ v5;
        goto LABEL_7;
      }
      ++result;
    }
    while ( result != a3 );
  }
 
 
 
  return result;
}


Attachments:
rwby.zip [479.84 KiB]
Downloaded 5 times
Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited