// // LevelEditorLayer::addTriggersWithGroupID from 0x1000ee240 to 0x1000ee728 (1256 bytes) // // 0 xrefs: // // 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 // void __fastcall LevelEditorLayer::addTriggersWithGroupID( LevelEditorLayer *a1, std::unordered_set *a2, cocos2d::CCArray *a3, std::unordered_map *a4, int a5) { cocos2d::CCArray *m_objects; // rax cocos2d::ccArray *data; // rax cocos2d::CCObject **arr; // r12 unsigned __int64 v9; // r14 cocos2d::CCObject *v10; // r13 unsigned __int64 value; // rdi unsigned __int64 m_uReference; // rcx unsigned __int64 v13; // r9 __int64 v14; // rsi std::__hash_node_base, void *> *> *v15; // rax std::__hash_node_base, void *> *>::__next_pointer next; // r8 unsigned __int64 v17; // rdi unsigned __int64 v18; // rax std::__hash_node_base, void *> *>::__next_pointer v19; // rax unsigned __int64 v20; // rdi int m_uID; // r15d unsigned __int64 v22; // r8 unsigned __int64 v23; // rsi std::__hash_node_base *> **v24; // r9 std::__hash_node_base *> *v25; // rax std::__hash_node_base *>::__next_pointer v26; // r10 unsigned __int64 v27; // rax std::__hash_node_base *>::__next_pointer v28; // rdx unsigned __int64 v29; // rsi std::__hash_node_base *> *v30; // rax std::__hash_node_base *>::__next_pointer v31; // r9 unsigned __int64 v32; // rdi unsigned __int64 v33; // rax std::__hash_node_base *>::__next_pointer v34; // rax std::__compressed_pair *>> *v35; // r15 int *v36; // [rsp+0h] [rbp-60h] BYREF cocos2d::CCArray *v37; // [rsp+8h] [rbp-58h] std::__compressed_pair *>> *p_p1; // [rsp+10h] [rbp-50h] unsigned int v39; // [rsp+1Ch] [rbp-44h] BYREF std::unordered_map *v40; // [rsp+20h] [rbp-40h] std::unordered_set *v41; // [rsp+28h] [rbp-38h] char v42[41]; // [rsp+37h] [rbp-29h] BYREF v40 = a4; v37 = a3; v41 = a2; m_objects = a1->m_objects; if ( m_objects ) { data = m_objects->data; if ( data->num ) { arr = data->arr; v9 = (unsigned __int64)&arr[data->num - 1]; p_p1 = &v41->__table_.__p1_; do { v10 = *arr; if ( !*arr ) return; if ( v10[22].m_nTag != 1 || a5 > 0 && v10[18].m_uReference != a5 ) goto LABEL_4; value = v40->__table_.__bucket_list_.__ptr_.__value_.__data_.__value_; if ( value ) { m_uReference = (int)v10[16].m_uReference; v13 = (0x101010101010101LL * ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((value - ((value >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((value - ((value >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v13 > 1 ) { v14 = (int)v10[16].m_uReference; if ( value <= m_uReference ) { if ( (value | m_uReference) >> 32 ) v14 = m_uReference % value; else v14 = (unsigned int)m_uReference % (unsigned int)value; } } else { v14 = m_uReference & (value - 1); } v15 = v40->__table_.__bucket_list_.__ptr_.__value_[v14]; if ( v15 ) { next = v15->__next_; if ( v15->__next_ ) { if ( (unsigned int)v13 < 2 ) { v17 = value - 1; while ( 1 ) { v19 = next[1].__next_; if ( v19 == (std::__hash_node_base, void *> *>::__next_pointer)m_uReference ) { if ( LODWORD(next[2].__next_) == (_DWORD)m_uReference ) goto LABEL_4; } else if ( (v17 & (unsigned __int64)v19) != v14 ) { goto LABEL_34; } next = next->__next_; if ( !next ) goto LABEL_34; } } while ( 1 ) { v18 = (unsigned __int64)next[1].__next_; if ( v18 == m_uReference ) { if ( LODWORD(next[2].__next_) == (_DWORD)m_uReference ) goto LABEL_4; goto LABEL_21; } if ( v18 < value ) goto LABEL_26; if ( (value | v18) >> 32 ) break; if ( (unsigned int)v18 % (unsigned int)value != v14 ) goto LABEL_34; LABEL_21: next = next->__next_; if ( !next ) goto LABEL_34; } v18 %= value; LABEL_26: if ( v18 != v14 ) goto LABEL_34; goto LABEL_21; } } } LABEL_34: v20 = v41->__table_.__bucket_list_.__ptr_.__value_.__data_.__value_; if ( !v20 ) goto LABEL_88; m_uID = v10[26].m_uID; v22 = (0x101010101010101LL * ((((v20 - ((v20 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v20 - ((v20 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL) + ((((v20 - ((v20 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL) + (((v20 - ((v20 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4)) & 0xF0F0F0F0F0F0F0FLL)) >> 56; if ( v22 > 1 ) { v23 = m_uID; if ( v20 <= m_uID ) { if ( (v20 | m_uID) >> 32 ) v23 = m_uID % v20; else v23 = m_uID % (unsigned int)v20; } } else { v23 = m_uID & (v20 - 1); } v24 = v41->__table_.__bucket_list_.__ptr_.__value_; v25 = v41->__table_.__bucket_list_.__ptr_.__value_[v23]; if ( !v25 || (v26 = v25->__next_) == nullptr ) { LABEL_59: m_uID = v10[26].m_nLuaID; if ( (unsigned int)v22 > 1 ) { v29 = m_uID; if ( v20 <= m_uID ) { if ( !((v20 | m_uID) >> 32) ) { v29 = m_uID % (unsigned int)v20; v30 = v24[v29]; if ( !v30 ) goto LABEL_88; goto LABEL_66; } v29 = m_uID % v20; } v30 = v24[v29]; if ( !v30 ) goto LABEL_88; goto LABEL_66; } v29 = m_uID & (v20 - 1); v30 = v24[v29]; if ( !v30 ) { LABEL_88: if ( v10[18].m_uReference == 1268 ) { v35 = p_p1; while ( 1 ) { v35 = (std::__compressed_pair *>> *)v35->__value_.__next_; if ( !v35 ) break; if ( SpawnTriggerGameObject::getRemapWithTarget( (SpawnTriggerGameObject *)v10, (int)v35[2].__value_.__next_) ) { m_uID = (int)v35[2].__value_.__next_; if ( m_uID <= 0 ) goto LABEL_4; goto LABEL_93; } } } goto LABEL_4; } LABEL_66: v31 = v30->__next_; if ( !v30->__next_ ) goto LABEL_88; if ( (unsigned int)v22 < 2 ) { v32 = v20 - 1; while ( 1 ) { v34 = v31[1].__next_; if ( v34 == (std::__hash_node_base *>::__next_pointer)m_uID ) { if ( LODWORD(v31[2].__next_) == m_uID ) goto LABEL_84; } else if ( (v32 & (unsigned __int64)v34) != v29 ) { goto LABEL_88; } v31 = v31->__next_; if ( !v31 ) goto LABEL_88; } } while ( 2 ) { v33 = (unsigned __int64)v31[1].__next_; if ( v33 == m_uID ) { if ( LODWORD(v31[2].__next_) == m_uID ) goto LABEL_84; } else if ( v33 < v20 ) { LABEL_75: if ( v33 != v29 ) goto LABEL_88; } else { if ( (v20 | v33) >> 32 ) { v33 %= v20; goto LABEL_75; } if ( (unsigned int)v33 % (unsigned int)v20 != v29 ) goto LABEL_88; } v31 = v31->__next_; if ( !v31 ) goto LABEL_88; continue; } } if ( (unsigned int)v22 < 2 ) { while ( 1 ) { v28 = v26[1].__next_; if ( v28 == (std::__hash_node_base *>::__next_pointer)m_uID ) { if ( LODWORD(v26[2].__next_) == m_uID ) goto LABEL_84; } else if ( ((v20 - 1) & (unsigned __int64)v28) != v23 ) { goto LABEL_59; } v26 = v26->__next_; if ( !v26 ) goto LABEL_59; } } while ( 1 ) { v27 = (unsigned __int64)v26[1].__next_; if ( v27 == m_uID ) break; if ( v27 < v20 ) goto LABEL_51; if ( (v20 | v27) >> 32 ) { v27 %= v20; LABEL_51: if ( v27 != v23 ) goto LABEL_59; goto LABEL_46; } if ( (unsigned int)v27 % (unsigned int)v20 != v23 ) goto LABEL_59; LABEL_46: v26 = v26->__next_; if ( !v26 ) goto LABEL_59; } if ( LODWORD(v26[2].__next_) != m_uID ) goto LABEL_46; LABEL_84: if ( !m_uID ) goto LABEL_88; if ( m_uID > 0 ) { LABEL_93: sub_10071FCD0(v37, v10); v39 = v10[16].m_uReference; v36 = (int *)&v39; *(_DWORD *)(sub_100105AF0(v40, &v39, &unk_100816708, &v36, v42) + 20) = m_uID; } LABEL_4: ++arr; } while ( (unsigned __int64)arr <= v9 ); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source