// // GJBaseGameLayer::resetRecord from 0x9dd940 to 0x9dde30 (1264 bytes) // // 3 xrefs: // > PlayLayer::resetLevel @ 0x711afc // > PlayLayer::resetLevel @ 0x711c20 // > @ 0xbe600 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 12:58:52 +0000 // __int64 __fastcall GJBaseGameLayer::resetRecord(GJBaseGameLayer *this, int a2, unsigned __int8 a3) { char *v3; // x24 int v6; // w28 char *v7; // x1 char *v8; // x3 char *v9; // x0 int v10; // t1 int v12; // w4 int v13; // w3 _QWORD *v14; // x5 _QWORD *v15; // x2 unsigned __int64 v16; // x5 int v17; // w1 __int64 v18; // x5 int v19; // w4 double v20; // d0 int v21; // w2 int v22; // w0 const void *v23; // x1 size_t v24; // x2 __int64 v25; // x0 char *v26; // x1 size_t v27; // x2 char v28; // w1 int v29; // w0 __int64 v30; // x3 int v31; // w4 __int64 v32; // x0 char *v33; // x0 int v34; // t1 unsigned __int64 v35; // x19 int v36; // w27 float v37; // s0 int v38; // w25 int v39; // w0 unsigned int v40; // w2 __int64 *v41; // x20 unsigned __int64 v42; // x2 __int64 v43; // x4 unsigned __int64 v44; // x6 unsigned __int64 v45; // x3 __int64 v46; // x7 __int64 *v47; // x8 unsigned __int64 v48; // x3 __int64 v49; // x9 char *i; // x1 unsigned __int64 v51; // x0 unsigned __int64 v52; // x0 unsigned __int64 v53; // x0 __int64 v54; // x0 __int64 v55; // x0 unsigned __int64 v56; // x5 __int64 *v57; // x0 __int64 *v58; // [xsp+68h] [xbp+68h] __int64 v59; // [xsp+78h] [xbp+78h] BYREF unsigned __int64 v60; // [xsp+80h] [xbp+80h] int v61; // [xsp+88h] [xbp+88h] BYREF int v62; // [xsp+8Ch] [xbp+8Ch] __int64 v63; // [xsp+90h] [xbp+90h] int v64; // [xsp+98h] [xbp+98h] int v65; // [xsp+9Ch] [xbp+9Ch] __int64 v66; // [xsp+A0h] [xbp+A0h] int v67; // [xsp+A8h] [xbp+A8h] int v68; // [xsp+ACh] [xbp+ACh] __int64 v69; // [xsp+B0h] [xbp+B0h] BYREF size_t v70; // [xsp+B8h] [xbp+B8h] void *v71; // [xsp+C0h] [xbp+C0h] v3 = (char *)this + 12288; if ( !*((_BYTE *)this + 12744) ) return _stack_chk_guard; v6 = *((unsigned __int8 *)this + 12448); if ( *((_BYTE *)this + 12448) ) return _stack_chk_guard; v7 = *((char **)this + 1606); v8 = *((char **)this + 1607); if ( v7 == v8 ) { LABEL_8: if ( (a2 <= 0) > (unsigned int)a3 ) { GJBaseGameLayer::resetRecordFull(this); return _stack_chk_guard; } goto LABEL_11; } if ( *(_DWORD *)v7 != 98 ) { v9 = v7 + 16; while ( v8 != v9 ) { v10 = *(_DWORD *)v9; v9 += 16; if ( v10 == 98 ) goto LABEL_26; } goto LABEL_8; } LABEL_26: if ( (a2 <= 0) <= (unsigned int)a3 ) { LABEL_11: v12 = 98; if ( a3 ) goto LABEL_12; } v30 = (v8 - v7) >> 4; if ( (int)v30 <= 0 ) { v31 = 0; } else { v31 = v30 - 1; v32 = 16LL * ((int)v30 - 1); if ( *(_DWORD *)&v7[v32] != 98 ) { v33 = &v7[v32 - 16]; do { if ( !v31 ) break; v34 = *(_DWORD *)v33; v33 -= 16; --v31; } while ( v34 != 98 ); } } v35 = 0; if ( v30 ) { v36 = 0; do { v38 = v35; v39 = *((_DWORD *)v7 + 2); v40 = *(_DWORD *)v7 - 98; if ( v40 > 1 ) v37 = (float)(v39 + v36); else v37 = (float)v39; if ( v31 <= (int)v35 && (v37 > (float)a2 || v37 == (float)a2 && v40 <= 1) ) break; v38 = ++v35; v7 += 16; v36 = (int)v37; } while ( v35 != v30 ); v6 = v31 == v38 && v38 > 0; } else { v38 = 0; v36 = 0; } v41 = *((__int64 **)this + 1611); while ( v41 ) { while ( a2 >= *((_DWORD *)v41 + 7) ) { v41 = (__int64 *)*v41; if ( !v41 ) goto LABEL_47; } v42 = *((_QWORD *)this + 1610); v43 = *v41; v44 = v42 - 1; v45 = v41[1]; v46 = (v42 - 1) & v42; v47 = (__int64 *)*v41; if ( v46 ) v48 = v45 % v42; else v48 = v44 & v45; v49 = *((_QWORD *)this + 1609); for ( i = *(char **)(v49 + 8 * v48); v41 != *(__int64 **)i; i = *(char **)i ) ; if ( i == v3 + 600 || ((v51 = *((_QWORD *)i + 1), v46) ? (v52 = v51 % v42) : (v52 = v44 & v51), v48 != v52) ) { if ( v43 ) { v53 = *(_QWORD *)(v43 + 8); if ( v46 ) { v56 = v53 / v42; if ( v48 == v53 % v42 ) goto LABEL_69; } else { v54 = v44 & v53; if ( v48 == v54 ) goto LABEL_70; } } *(_QWORD *)(v49 + 8 * v48) = 0; v43 = *v41; } v55 = v43; if ( !v43 ) goto LABEL_72; v53 = *(_QWORD *)(v43 + 8); if ( v46 ) { v56 = v53 / v42; LABEL_69: v54 = v53 - v56 * v42; goto LABEL_70; } v54 = v44 & v53; LABEL_70: if ( v48 == v54 ) { v55 = v43; } else { *(_QWORD *)(*((_QWORD *)this + 1609) + 8 * v54) = i; v55 = *v41; } LABEL_72: *(_QWORD *)i = v55; *v41 = 0; --*((_QWORD *)this + 1612); if ( (v41[8] & 1) != 0 ) { v58 = v47; operator delete((void *)v41[10]); v47 = v58; } v57 = v41; v41 = v47; operator delete(v57); } LABEL_47: std::vector::resize((__int64)(v3 + 560), v35); *((_DWORD *)this + 3258) = v38; if ( !*((_BYTE *)this + 12238) ) *((_DWORD *)this + 3205) = v36; v12 = 99; if ( v6 ) v12 = 98; if ( v3[456] ) { LABEL_12: v13 = *((_DWORD *)this + 3228); v14 = *((_QWORD **)this + 1608); *((_DWORD *)this + 3228) = v13 + 1; WORD2(v59) = 0; v15 = *((_QWORD **)v3 + 71); LODWORD(v59) = v12; v60 = __PAIR64__(v13, a2); if ( v15 == v14 ) { std::vector::__push_back_slow_path((__int16 **)v3 + 70, &v59); v13 = HIDWORD(v60); } else { if ( v15 ) { v16 = v60; *v15 = v59; v15[1] = v16; v15 = *((_QWORD **)v3 + 71); v13 = HIDWORD(v60); } *((_QWORD *)v3 + 71) = v15 + 2; } v17 = *((_DWORD *)this + 3333); v18 = *((_QWORD *)this + 1599); v19 = *((_DWORD *)this + 3053); v20 = *((double *)this + 1665) * 100000.0; v21 = *((_DWORD *)this + 3332); v22 = *((_DWORD *)this + 479); v61 = v13; v67 = v17; v66 = 0; v69 = 0; v70 = 0; v71 = nullptr; v63 = v18; v62 = a2; v64 = v19; v65 = v21; v68 = v22; v66 = lround(v20); if ( &v69 != (__int64 *)(v3 + 752) ) { if ( (v3[752] & 1) != 0 ) { v23 = *((const void **)v3 + 96); v24 = *((_QWORD *)v3 + 95); } else { v23 = v3 + 753; v24 = (unsigned __int8)v3[752] >> 1; } std::string::assign(&v69, v23, v24); } v25 = std::unordered_map::operator[]((__int64)(v3 + 584), &v61); *(_DWORD *)v25 = v61; *(_DWORD *)(v25 + 4) = v62; *(_QWORD *)(v25 + 8) = v63; *(_DWORD *)(v25 + 16) = v64; *(_DWORD *)(v25 + 20) = v65; *(_QWORD *)(v25 + 24) = v66; *(_DWORD *)(v25 + 32) = v67; *(_DWORD *)(v25 + 36) = v68; if ( (__int64 *)(v25 + 40) != &v69 ) { if ( (v69 & 1) != 0 ) { v26 = (char *)v71; v27 = v70; } else { v27 = (unsigned __int8)v69 >> 1; v26 = (char *)&v69 + 1; } std::string::assign((__int64 *)(v25 + 40), v26, v27); } v28 = v69; v29 = *((_DWORD *)this + 3258) + 1; *((_DWORD *)this + 3205) = a2; *((_DWORD *)this + 3258) = v29; if ( (v28 & 1) != 0 ) operator delete(v71); } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source