signed int __fastcall cocos2dx_lua_loader(int a1)
{
int v1; // r0@7
int v2; // r3@7
char *v3; // r4@8
int v4; // r3@9
int *v5; // r0@12
int i; // r1@12
int v7; // r1@13
int v8; // r4@15
int v9; // r0@15
int v10; // r3@15
int v11; // r5@15
int (__fastcall *v12)(_DWORD, _DWORD, _DWORD, _DWORD); // r6@22
int v13; // r4@22
char *v14; // r0@22
int v15; // r3@23
int (__fastcall *v16)(_DWORD, _DWORD, _DWORD, _DWORD); // r7@24
cocos2d::LuaEngine *v17; // r0@25
signed int v18; // r4@28
int v19; // r0@29
int v21; // [sp+Ch] [bp-6Ch]@15
int v22; // [sp+14h] [bp-64h]@21
int v23; // [sp+18h] [bp-60h]@1
int v24; // [sp+24h] [bp-54h]@7
char v25; // [sp+28h] [bp-50h]@8
int v26; // [sp+2Ch] [bp-4Ch]@15
int v27; // [sp+30h] [bp-48h]@15
int v28; // [sp+34h] [bp-44h]@15
_BYTE *v29; // [sp+38h] [bp-40h]@10
char v30; // [sp+3Ch] [bp-3Ch]@20
char v31; // [sp+40h] [bp-38h]@21
char v32; // [sp+44h] [bp-34h]@21
char v33; // [sp+48h] [bp-30h]@21
char v34; // [sp+4Ch] [bp-2Ch]@22
char v35; // [sp+50h] [bp-28h]@23
char v36; // [sp+54h] [bp-24h]@23
char v37; // [sp+58h] [bp-20h]@23
char v38; // [sp+5Ch] [bp-1Ch]@3
v23 = a1;
if ( !(dword_BF8ADC & 1) && j_j___cxa_guard_acquire(&dword_BF8ADC) )
{
sub_685D18(&unk_BF8AE0, ".luac", &v38);
j_j___cxa_guard_release(&dword_BF8ADC);
sub_685D88(&unk_BF8AE0, sub_9C3304, &unk_BE2000);
}
if ( !(dword_BF8AE4 & 1) && j_j___cxa_guard_acquire(&dword_BF8AE4) )
{
sub_685D18(&dword_BF8AE8, ".lua", &v38);
j_j___cxa_guard_release(&dword_BF8AE4);
sub_685D88(&dword_BF8AE8, sub_9C3304, &unk_BE2000);
}
v1 = j_j_luaL_checklstring(v23, 1, 0);
sub_685D18(&v24, v1, &v38);
v2 = sub_686FE0(&v24, &unk_BF8AE0, -1);
if ( v2 == -1 )
{
v4 = sub_686FE0(&v24, &dword_BF8AE8, -1);
if ( v4 != *(_DWORD *)(v24 - 12) - *(_DWORD *)(dword_BF8AE8 - 12) )
goto LABEL_12;
v3 = (char *)&v29;
sub_686250(&v29, &v24, 0, v4);
sub_685E78(&v24, &v29);
}
else
{
v3 = &v25;
sub_686250(&v25, &v24, 0, v2);
sub_685E78(&v24, &v25);
}
sub_685D28(v3);
LABEL_12:
v5 = &v24;
for ( i = (int)"."; ; i = (int)"." )
{
v7 = sub_687060(v5, i, 0, v4);
if ( v7 == -1 )
break;
sub_687070(&v24, v7, 1, "/");
v5 = &v24;
}
v26 = 0;
v27 = (int)&unk_C4F1DC;
v8 = cocos2d::FileUtils::getInstance((cocos2d::FileUtils *)0xFFFFFFFF);
j_j_lua_getfield(v23, -10002, "package");
j_j_lua_getfield(v23, -1, "path");
v9 = j_j_lua_tolstring(v23, -1, 0);
sub_685D18(&v28, v9, &v38);
j_j_lua_settop(v23, -2);
v21 = sub_687060(&v28, ";", 0, v10);
v11 = 0;
while ( 1 )
{
if ( v21 == -1 )
v21 = *(_DWORD *)(v28 - 12);
sub_686250(&v29, &v28, v11, v21);
sub_6862F0(&v29);
if ( *v29 == 46 )
{
sub_6862F0(&v29);
if ( v29[1] == 47 )
{
sub_686250(&v30, &v29, 2, -1);
sub_685E78(&v29, &v30);
sub_685D28(&v30);
}
}
v22 = sub_686350(&v29, "?.lua", 0);
sub_686250(&v31, &v29, 0, v22);
std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v32, &v31, &v24);
std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v33, &v32, &unk_BF8AE0);
sub_685E78(&v27, &v33);
sub_685D28(&v33);
sub_685D28(&v32);
sub_685D28(&v31);
if ( (*(int (__fastcall **)(int, int *))(*(_DWORD *)v8 + 96))(v8, &v27) )
{
v12 = *(int (__fastcall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20);
sub_685D18(&v34, v27, &v38);
v13 = v12(v8, &v34, "rb", &v26);
v14 = &v34;
goto LABEL_25;
}
sub_686250(&v35, &v29, 0, v22);
std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v36, &v35, &v24);
std::operator+<char,std::char_traits<char>,std::allocator<char>>(&v37, &v36, &dword_BF8AE8);
sub_685E78(&v27, &v37);
sub_685D28(&v37);
sub_685D28(&v36);
sub_685D28(&v35);
if ( (*(int (__fastcall **)(int, int *))(*(_DWORD *)v8 + 96))(v8, &v27) )
break;
v11 = v21 + 1;
v21 = sub_687060(&v28, ";", v21 + 1, v15);
sub_685D28(&v29);
if ( (unsigned int)v11 >= *(_DWORD *)(v28 - 12) )
goto LABEL_28;
}
v16 = *(int (__fastcall **)(_DWORD, _DWORD, _DWORD, _DWORD))(*(_DWORD *)v8 + 20);
sub_685D18(&v38, v27, &v37);
v13 = v16(v8, &v38, "rb", &v26);
v14 = &v38;
LABEL_25:
sub_685D28(v14);
v17 = (cocos2d::LuaEngine *)sub_685D28(&v29);
if ( !v13 )
{
LABEL_28:
v18 = 0;
goto LABEL_30;
}
v19 = cocos2d::LuaEngine::getInstance(v17);
cocos2d::LuaStack::luaLoadBuffer(*(_DWORD *)(v19 + 4), v23, (char *)v13, v26, v27);
j_j_free((void *)v13);
v18 = 1;
LABEL_30:
sub_685D28(&v28);
sub_685D28(&v27);
sub_685D28(&v24);
return v18;
key=???
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)