Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char __thiscall GetKey(struct_this *this, size_t Size)
- {
- char result; // bl
- void *buff; // eax
- result = 1;
- if ( Size <= this->someSize )
- goto LABEL_11;
- result = 0;
- if ( this->ptrBuff )
- free(this->ptrBuff);
- buff = malloc(Size);
- this->ptrBuff = buff;
- if ( buff )
- {
- this->someSize = Size;
- result = 1;
- }
- ++this->someCounter;
- if ( result )
- {
- LABEL_11:
- _mm_storel_epi64(&this->key1dest, _mm_loadl_epi64(&this->key1src));
- _mm_storel_epi64(&this->key2dest, _mm_loadl_epi64(&this->key2src));
- }
- return result;
- }
- int __thiscall sub_543AD0(struct_this *this, void *Dst, int a3, int a4)
- {
- int v5; // eax
- int v6; // edi
- int result; // eax
- DWORD time; // [esp+8h] [ebp-Ch]
- int *decryptedBuff; // [esp+Ch] [ebp-8h]
- int Size; // [esp+10h] [ebp-4h]
- v5 = this->dword1178;
- if ( v5 )
- {
- if ( a4 < v5 )
- {
- Size = a4;
- goto LABEL_6;
- }
- }
- else
- {
- v5 = a4;
- }
- Size = v5;
- LABEL_6:
- if ( this->dword1180 != 2 )
- return 0;
- if ( !GetKey(this, Size) ) // get key
- return 0;
- time = GetTickCount();
- decryptedBuff = this->ptrBuff;
- v6 = DecryptBuffer(&this->byte113C, &this->dword18, Dst, 8 * Size, decryptedBuff);// do decryption
- if ( v6 == 8 * Size )
- memcpy(Dst, decryptedBuff, Size); // copy data, is decrypted here
- this->timeElapsed += GetTickCount() - time;
- this->dwordC += a4;
- ++this->dword8;
- result = v6;
- if ( v6 != a4 )
- ++this->dword14;
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement