Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QWORD size;
- LPCVOID src;
- LPVOID dst;
- BYTE current_byte;
- PBYTE pData, lpDataEnd, lpDataStart;
- UINT dwDataEndOffset, dwDataStartOffset, length, dwWordByteLength, Index;
- UINT dwNextDataStartOffset = 4;
- DWORD i = 0;
- if (*thisr8)
- size = (*(QWORD(*)(QWORD*, const char*))(0x1409291C0))(thisr8, szBlacklistName);
- else
- size = 0;
- pThis->m_qwBufferSize = size;
- if (size < 1)
- {
- (*(void(*)(BannedWordChecker*))(0x140606AC0))(pThis); //FreeBannedWordChecker
- return FALSE;
- }
- src = (*(LPCVOID(*)(QWORD*, const char*))(0x140928FD0))(thisr8, szBlacklistName);
- if (!src)
- {
- (*(void(*)(BannedWordChecker*))(0x140606AC0))(pThis); //FreeBannedWordChecker
- return FALSE;
- }
- dst = (*(AllocHeapMemoryFn)(0x140920200))(size, (CHeapInstance**)0x14147B490);
- pThis->m_pBuffer = dst;
- if (!dst)
- {
- (*(void(*)(BannedWordChecker*))(0x140606AC0))(pThis); //FreeBannedWordChecker
- return FALSE;
- }
- memcpy(dst, src, size);
- pThis->m_dwWordCount = *(DWORD*)pThis->m_pBuffer;
- if (pThis->m_dwWordCount < 1)
- {
- (*(void(*)(BannedWordChecker*))(0x140606AC0))(pThis); //FreeBannedWordChecker
- return FALSE;
- }
- pThis->m_pEntries = (BannedWordChecker::WordEntry*)(*(AllocHeapMemoryFn)(0x140920200))(16 * pThis->m_dwWordCount, (CHeapInstance**)0x14147B490);
- if (!pThis->m_pEntries)
- {
- (*(void(*)(BannedWordChecker*))(0x140606AC0))(pThis); //FreeBannedWordChecker
- return FALSE;
- }
- if (pThis->m_dwWordCount > 0)
- {
- do
- {
- dwDataStartOffset = dwNextDataStartOffset;
- dwDataEndOffset = dwNextDataStartOffset + 4;
- lpDataStart = (BYTE*)pThis->m_pBuffer + dwDataStartOffset;
- lpDataEnd = (BYTE*)pThis->m_pBuffer + dwDataEndOffset;
- pThis->m_pEntries[i].dwLength = *(DWORD*)lpDataStart;
- dwWordByteLength = pThis->m_pEntries[i].dwLength * sizeof(WCHAR);
- dwNextDataStartOffset = dwWordByteLength + dwDataEndOffset;
- if (dwWordByteLength)
- {
- pData = lpDataStart;
- Index = lpDataEnd - lpDataStart;
- length = dwWordByteLength;
- do
- {
- current_byte = (pData++)[Index];
- *(pData - 1) = current_byte - 19;
- } while (--length);
- }
- *((WCHAR*)&lpDataStart[dwWordByteLength]) = 0; //*((WCHAR*)(lpDataStart + dwWordByteLength)) = 0;
- pThis->m_pEntries[i++].lpszBannedWord = (LPWSTR)lpDataStart;
- } while (i < pThis->m_dwWordCount);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement