// // sub_1800AA690 from 0x1800aa690 to 0x1800aa877 (487 bytes) // // 2 xrefs: // > sub_1800AA090 @ 0x1800aa386 // > @ 0x1801b7f5c // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // char __fastcall sub_1800AA690(__int64 a1, __int64 a2, unsigned int a3) { unsigned __int64 v6; // rbx cocos2d::CCConfiguration *v7; // rax unsigned __int8 v8; // al __int64 v9; // r12 _QWORD *v10; // rcx unsigned int v11; // edx __int64 v12; // rax __int64 v14; // rax unsigned int v15; // edi unsigned int v16; // esi int v17; // eax unsigned int v18; // r15d cocos2d::CCConfiguration *v19; // rax int v20; // r9d unsigned int v21; // edx unsigned int v22; // eax __int64 v23; // rcx unsigned int v24; // r8d unsigned int v25; // r9d __int64 v26; // rax if ( a3 < 0x34 || _byteswap_ulong(*(_DWORD *)a2) != 1347834371 ) return 0; v6 = *(_QWORD *)(a2 + 8); v7 = cocos2d::CCConfiguration::sharedConfiguration(); v8 = cocos2d::CCConfiguration::supportsPVRTC(v7); v9 = 0; v10 = &unk_1801A3180; v11 = 4 * v8 + 9; v12 = 0; while ( *v10 != v6 ) { v12 = (unsigned int)(v12 + 1); v10 += 2; if ( (unsigned int)v12 >= v11 ) return 0; } v14 = *((_QWORD *)&unk_1801A3180 + 2 * v12 + 1); *(_QWORD *)(a1 + 336) = v14; *(_BYTE *)(a1 + 328) = *(_BYTE *)(v14 + 17); LODWORD(v14) = *(_DWORD *)(a2 + 4); *(_BYTE *)(a1 + 330) = 1; if ( (v14 & 2) != 0 ) *(_BYTE *)(a1 + 329) = 1; v15 = *(_DWORD *)(a2 + 28); v16 = *(_DWORD *)(a2 + 24); *(_DWORD *)(a1 + 316) = v15; *(_DWORD *)(a1 + 320) = v16; v17 = *(_DWORD *)(a2 + 44); v18 = *(_DWORD *)(a2 + 48) + 52; *(_DWORD *)(a1 + 312) = v17; if ( v17 ) { do { if ( v6 < 2 ) { v20 = 32; v21 = v15 >> 3; } else { if ( v6 - 2 > 1 ) { if ( v6 == 0x808080861726762LL ) { v19 = cocos2d::CCConfiguration::sharedConfiguration(); if ( !cocos2d::CCConfiguration::supportsBGRA8888(v19) ) return 0; } v20 = 1; v21 = v15; v22 = v16; goto LABEL_18; } v20 = 16; v21 = v15 >> 2; } v22 = v16 >> 2; LABEL_18: if ( v21 < 2 ) v21 = 2; if ( v22 < 2 ) v22 = 2; v23 = v18; v24 = a3 - v18; v25 = v21 * v22 * ((unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 336) + 12LL) * v20) >> 3); if ( a3 - v18 > v25 ) v24 = v25; v15 >>= 1; v18 += v24; v16 >>= 1; *(_QWORD *)(a1 + 16LL * (unsigned int)v9 + 56) = a2 + v23; v26 = 2 * (v9 + 4); v9 = (unsigned int)(v9 + 1); if ( v15 <= 1 ) v15 = 1; *(_DWORD *)(a1 + 8 * v26) = v24; if ( v16 <= 1 ) v16 = 1; } while ( (unsigned int)v9 < *(_DWORD *)(a1 + 312) ); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source