// // sub_100169640 from 0x100169640 to 0x100169819 (473 bytes) // // 1 xrefs: // > GJBaseGameLayer::generateTargetGroups @ 0x10011ab9a // // 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 // __int64 __fastcall sub_100169640(__int64 *a1, int *a2) { unsigned __int64 v2; // r11 unsigned __int64 v4; // rcx unsigned __int64 v5; // rsi __int64 v6; // rdi __int64 *v8; // rax __int64 v9; // r9 unsigned __int64 v10; // r11 __int64 v11; // r8 __int64 v12; // rax unsigned __int64 v13; // rax _QWORD *v14; // rbx _QWORD *v15; // rdi _QWORD *v16; // r14 void *v17; // rdi _QWORD *v18; // [rsp-30h] [rbp-30h] BYREF char v19; // [rsp-20h] [rbp-20h] v2 = a1[1]; if ( !v2 ) return 0; v4 = *a2; v5 = (0x101010101010101LL * ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v2 - ((v2 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v2 - ((v2 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v5 > 1 ) { v6 = v4; if ( v2 <= v4 ) { if ( (v2 | v4) >> 32 ) v6 = v4 % v2; else v6 = (unsigned int)v4 % (unsigned int)v2; } } else { v6 = v4 & (v2 - 1); } v8 = *(__int64 **)(*a1 + 8 * v6); if ( !v8 ) return 0; v9 = *v8; if ( !*v8 ) return 0; if ( (unsigned int)v5 < 2 ) { v10 = v2 - 1; v11 = 0; while ( 1 ) { v12 = *(_QWORD *)(v9 + 8); if ( v12 == v4 ) { if ( *(_DWORD *)(v9 + 16) == (_DWORD)v4 ) goto LABEL_31; } else if ( (v10 & v12) != v6 ) { return v11; } v9 = *(_QWORD *)v9; if ( !v9 ) return v11; } } v11 = 0; while ( 1 ) { v13 = *(_QWORD *)(v9 + 8); if ( v13 == v4 ) break; if ( v13 < v2 ) goto LABEL_27; if ( (v2 | v13) >> 32 ) { v13 %= v2; LABEL_27: if ( v13 != v6 ) return v11; goto LABEL_22; } if ( (unsigned int)v13 % (unsigned int)v2 != v6 ) return v11; LABEL_22: v9 = *(_QWORD *)v9; if ( !v9 ) return v11; } if ( *(_DWORD *)(v9 + 16) != (_DWORD)v4 ) goto LABEL_22; LABEL_31: sub_100056B40((__int64)&v18, a1, (__int64 *)v9); v14 = v18; v18 = nullptr; if ( v14 ) { if ( v19 == 1 ) { v15 = (_QWORD *)v14[5]; if ( v15 ) { do { v16 = (_QWORD *)*v15; operator delete(v15); v15 = v16; } while ( v16 ); } v17 = (void *)v14[3]; v14[3] = 0; if ( v17 ) operator delete(v17); } operator delete(v14); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source