// // GameManager::calculateBaseKeyForIcons from 0x5f1c8c to 0x5f1e20 (404 bytes) // // 2 xrefs: // > GameManager::init @ 0x5f1e80 // > @ 0x79d28 // // 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 GameManager::calculateBaseKeyForIcons(GameManager *a1) { int *m_start; // x0 unsigned __int64 v3; // x1 std::_rb_tree_base *p_m_header; // x21 int v5; // w19 std::_rb_tree_base *m_parent; // x0 std::_rb_tree_base *v7; // x20 __int64 insert_hint_unique_pos; // x0 __int64 v9; // x1 std::_rb_tree_base *v10; // x3 _BOOL8 v11; // x0 std::_rb_tree_base *v12; // x0 __int64 v13; // [xsp+48h] [xbp+48h] m_start = a1->m_keyStartForIcon.m_start; v3 = a1->m_keyStartForIcon.m_finish - m_start; if ( v3 <= 8 ) { std::vector::_M_default_append((__int64)&a1->m_keyStartForIcon, 9 - v3); m_start = a1->m_keyStartForIcon.m_start; } else if ( v3 != 9 ) { a1->m_keyStartForIcon.m_finish = m_start + 9; } m_start[1] = 485; m_start[2] = 654; m_start[3] = 772; m_start[4] = 921; m_start[5] = 1017; m_start[6] = 1085; *m_start = 0; m_start[7] = 1154; p_m_header = &a1->m_iconLoadCounts.m_header; v5 = 0; m_start[8] = 1197; do { m_parent = a1->m_iconLoadCounts.m_header.m_parent; v7 = &a1->m_iconLoadCounts.m_header; if ( !m_parent ) goto LABEL_10; do { while ( *(_DWORD *)&m_parent[1].m_isblack >= v5 ) { v7 = m_parent; m_parent = m_parent->m_left; if ( !m_parent ) goto LABEL_8; } m_parent = m_parent->m_right; } while ( m_parent ); LABEL_8: if ( p_m_header == v7 || *(_DWORD *)&v7[1].m_isblack > v5 ) { LABEL_10: v13 = (__int64)v7; v7 = (std::_rb_tree_base *)operator new(0x28u); *(_DWORD *)&v7[1].m_isblack = v5; *((_DWORD *)&v7[1].m_isblack + 1) = 0; insert_hint_unique_pos = std::_Rb_tree,std::_Select1st>,std::less,std::allocator>>::_M_get_insert_hint_unique_pos( &a1->m_iconLoadCounts.compare.pad, v13, (int *)&v7[1].m_isblack); v10 = (std::_rb_tree_base *)insert_hint_unique_pos; if ( v9 ) { v11 = insert_hint_unique_pos || p_m_header == (std::_rb_tree_base *)v9 || *(_DWORD *)&v7[1].m_isblack < *(_DWORD *)(v9 + 32); sub_CFAD74(v11, v7, v9, &a1->m_iconLoadCounts.m_header); ++a1->m_iconLoadCounts.m_nodecount; } else { v12 = v7; v7 = v10; operator delete(v12); } } ++v5; *((_DWORD *)&v7[1].m_isblack + 1) = 0; } while ( v5 != 1205 ); }
GD Web Decomp Icon

GD Web Decomp

Raw Source