I'm truing to decrypt LUA scrpits from cocos2dx game (for wiki).
Links to files of game: libhellolua.so (cocos2dx external library) example encrypted LUA-scripts (*.abc files)
I was reading a library in IDA Pro. This library don't have mention "xxtea".
And i found function getEncyptedFileData: pastebin getEncyptedFileData
This function is not in the original source code of Cocos2d-x. I think this function is related to decryption (since this function is called nearby with the variable "*.abc"). I can not understand the some lines in this function:
1: I think that this function CCFileUtils:getFileData.
v5 = (_BYTE *)(*(int (__fastcall **)(cocos2d::CCFileUtils *, const char *, const char *, unsigned int *))(*(_DWORD *)this + 16))(this, a2, "rb", &v26);
2: This loop not readeable. The result of the first line is used in this loop.
do
{
v6[(signed int)v17 * (signed __int64)v11 % (unsigned __int64)v14] = *(_BYTE *)(v13 + v16) ^ v15[v17];
++v17;
v16 = (v16 + 1) % v10;
}
while ( v17 < v14 );
3: function getEncyptedFileData return result of this line:
v19 = (*(int (__cdecl **)(cocos2d::CCFileUtils *, _BYTE *))(*(_DWORD *)v21 + 24))(v21, v6);
cocos2d: ERROR: Invalid filename <filename without path and extension>
, ex:cocos2d: ERROR: Invalid filename DailyLoginReward