{"type": "func", "start": 4890784, "end": 4891030, "name": "GJOptionsLayer::GJOptionsLayer", "pseudocode": "// \n// GJOptionsLayer::GJOptionsLayer from 0x4aa0a0 to 0x4aa196 (246 bytes)\n// \n// 6 xrefs:\n// > GJOptionsLayer::create @ 0x4ab7d2\n// > EditorOptionsLayer::create @ 0x4ab824\n// > GameOptionsLayer::create @ 0x4b17be\n// > GameLevelOptionsLayer::create @ 0x4b1ac2\n// > LevelOptionsLayer::create @ 0x573066\n// > LevelOptionsLayer2::create @ 0x5731d6\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\n// Alternative name is '_ZN14GJOptionsLayerC1Ev'\nGJOptionsLayer *GJOptionsLayer::GJOptionsLayer(GJOptionsLayer *a1)\n{\n  std::_Hashtable<int, std::pair<const int, CCMenuItemToggler *>, std::allocator<std::pair<const int, CCMenuItemToggler *>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::size_type v2; // r0\n  std::_Hashtable<int, std::pair<const int, CCMenuItemToggler *>, std::allocator<std::pair<const int, CCMenuItemToggler *>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::__bucket_type *p_M_single_bucket; // r6\n  size_t v4; // r5\n\n  SetupTriggerPopup::SetupTriggerPopup(a1);\n  a1->m_togglesPerPage = 10;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable = (GJOptionsLayer_vtbl *)&off_A6C068;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCTouchDelegate::__vftable = (cocos2d::CCTouchDelegate_vtbl *)&off_A6C35C;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCAccelerometerDelegate::__vftable = (cocos2d::CCAccelerometerDelegate_vtbl *)&off_A6C394;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeypadDelegate::__vftable = (cocos2d::CCKeypadDelegate_vtbl *)&off_A6C3A0;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCKeyboardDelegate::__vftable = (cocos2d::CCKeyboardDelegate_vtbl *)&off_A6C3B0;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCMouseDelegate::__vftable = (cocos2d::CCMouseDelegate_vtbl *)&off_A6C3C0;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCLayerRGBA::cocos2d::CCRGBAProtocol::__vftable = (cocos2d::CCRGBAProtocol_vtbl *)&off_A6C3D4;\n  a1->SetupTriggerPopup::FLAlertLayer::cocos2d::CCLayerColor::cocos2d::CCBlendProtocol::__vftable = (cocos2d::CCBlendProtocol_vtbl *)&off_A6C414;\n  a1->SetupTriggerPopup::TextInputDelegate::__vftable = (TextInputDelegate_vtbl *)&off_A6C424;\n  a1->SetupTriggerPopup::ConfigureValuePopupDelegate::__vftable = (ConfigureValuePopupDelegate_vtbl *)&off_A6C448;\n  a1->SetupTriggerPopup::SliderDelegate::__vftable = (SliderDelegate_vtbl *)&off_A6C454;\n  a1->m_maxLabelScale = 0.5;\n  a1->m_gap = 48.0;\n  a1->m_maxLabelWidth = 130.0;\n  a1->m_page = -1;\n  a1->m_offset = 0.0;\n  a1->m_toggleCount = 0;\n  a1->m_maxPage = 0;\n  a1->m_toggleButtons._M_h._M_before_begin._M_nxt = nullptr;\n  a1->m_toggleButtons._M_h._M_element_count = 0;\n  a1->m_toggleButtons._M_h._M_rehash_policy._M_max_load_factor = 1.0;\n  a1->m_toggleButtons._M_h._M_rehash_policy._M_next_resize = 0;\n  v2 = sub_773A14(&a1->m_toggleButtons._M_h._M_rehash_policy, 10);\n  a1->m_toggleButtons._M_h._M_bucket_count = v2;\n  if ( v2 == 1 )\n  {\n    p_M_single_bucket = &a1->m_toggleButtons._M_h._M_single_bucket;\n    a1->m_toggleButtons._M_h._M_single_bucket = nullptr;\n  }\n  else\n  {\n    if ( v2 >= 0x40000000 )\n      sub_772FB4(v2);\n    v4 = 4 * v2;\n    p_M_single_bucket = (std::_Hashtable<int, std::pair<const int, CCMenuItemToggler *>, std::allocator<std::pair<const int, CCMenuItemToggler *>>, std::__detail::_Select1st, std::equal_to<int>, std::hash<int>, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<false, false, true>>::__bucket_type *)operator new(4 * v2);\n    memset(p_M_single_bucket, 0, v4);\n  }\n  a1->m_toggleButtons._M_h._M_buckets = p_M_single_bucket;\n  return a1;\n}", "assembly": "; \n; GJOptionsLayer::GJOptionsLayer from 0x4aa0a0 to 0x4aa196 (246 bytes)\n; \n; 6 xrefs:\n; > GJOptionsLayer::create @ 0x4ab7d2\n; > EditorOptionsLayer::create @ 0x4ab824\n; > GameOptionsLayer::create @ 0x4b17be\n; > GameLevelOptionsLayer::create @ 0x4b1ac2\n; > LevelOptionsLayer::create @ 0x573066\n; > LevelOptionsLayer2::create @ 0x5731d6\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R4-R6,LR}                                             ; +0x0, 0x4aa0a0\nMOV             R4, R0                                                 ; +0x2, 0x4aa0a2\nBL              _ZN17SetupTriggerPopupC2Ev; SetupTriggerPopup::SetupTriggerPopup(void) ; +0x4, 0x4aa0a4\nLDR             R3, =(_ZTV14GJOptionsLayer_ptr - 0x4AA0B8)             ; +0x8, 0x4aa0a8\nMOVS            R1, #0xA                                               ; +0xa, 0x4aa0aa\nADD.W           R0, R4, #0x2E8                                         ; +0xc, 0x4aa0ac\nSTR.W           R1, [R4,#0x2B0]                                        ; +0x10, 0x4aa0b0\nADD             R3, PC; _ZTV14GJOptionsLayer_ptr                       ; +0x14, 0x4aa0b4\nLDR             R3, [R3]; `vtable for'GJOptionsLayer ...               ; +0x16, 0x4aa0b6\nADD.W           R2, R3, #8                                             ; +0x18, 0x4aa0b8\nSTR             R2, [R4]                                               ; +0x1c, 0x4aa0bc\nADD.W           R2, R3, #0x2FC                                         ; +0x1e, 0x4aa0be\nSTR.W           R2, [R4,#0x108]                                        ; +0x22, 0x4aa0c2\nADD.W           R2, R3, #0x334                                         ; +0x26, 0x4aa0c6\nSTR.W           R2, [R4,#0x10C]                                        ; +0x2a, 0x4aa0ca\nADD.W           R2, R3, #0x340                                         ; +0x2e, 0x4aa0ce\nSTR.W           R2, [R4,#0x110]                                        ; +0x32, 0x4aa0d2\nADD.W           R2, R3, #0x350                                         ; +0x36, 0x4aa0d6\nSTR.W           R2, [R4,#0x114]                                        ; +0x3a, 0x4aa0da\nADD.W           R2, R3, #0x360                                         ; +0x3e, 0x4aa0de\nSTR.W           R2, [R4,#0x118]                                        ; +0x42, 0x4aa0e2\nADD.W           R2, R3, #0x374                                         ; +0x46, 0x4aa0e6\nSTR.W           R2, [R4,#0x13C]                                        ; +0x4a, 0x4aa0ea\nADD.W           R2, R3, #0x3B4                                         ; +0x4e, 0x4aa0ee\nSTR.W           R2, [R4,#0x14C]                                        ; +0x52, 0x4aa0f2\nADD.W           R2, R3, #0x3C4                                         ; +0x56, 0x4aa0f6\nSTR.W           R2, [R4,#0x1F0]                                        ; +0x5a, 0x4aa0fa\nADD.W           R2, R3, #0x3E8                                         ; +0x5e, 0x4aa0fe\nADD.W           R3, R3, #0x3F4                                         ; +0x62, 0x4aa102\nSTR.W           R2, [R4,#0x1F4]                                        ; +0x66, 0x4aa106\nMOV.W           R2, #0x3F000000                                        ; +0x6a, 0x4aa10a\nSTR.W           R3, [R4,#0x1F8]                                        ; +0x6e, 0x4aa10e\nSTR.W           R2, [R4,#0x2BC]                                        ; +0x72, 0x4aa112\nLDR             R3, =0x42400000                                        ; +0x76, 0x4aa116\nLDR             R2, =0x43020000                                        ; +0x78, 0x4aa118\nSTR.W           R3, [R4,#0x2A8]                                        ; +0x7a, 0x4aa11a\nMOV.W           R3, #0xFFFFFFFF                                        ; +0x7e, 0x4aa11e\nSTR.W           R2, [R4,#0x2C0]                                        ; +0x82, 0x4aa122\nMOVS            R2, #0                                                 ; +0x86, 0x4aa126\nSTR.W           R3, [R4,#0x2AC]                                        ; +0x88, 0x4aa128\nMOVS            R3, #0                                                 ; +0x8c, 0x4aa12c\nSTR.W           R2, [R4,#0x2D4]                                        ; +0x8e, 0x4aa12e\nMOV.W           R2, #0x3F800000                                        ; +0x92, 0x4aa132\nSTR.W           R3, [R4,#0x2B4]                                        ; +0x96, 0x4aa136\nSTR.W           R3, [R4,#0x2B8]                                        ; +0x9a, 0x4aa13a\nSTR.W           R3, [R4,#0x2E0]                                        ; +0x9e, 0x4aa13e\nSTR.W           R3, [R4,#0x2E4]                                        ; +0xa2, 0x4aa142\nSTR.W           R2, [R4,#0x2E8]                                        ; +0xa6, 0x4aa146\nSTR.W           R3, [R4,#0x2EC]                                        ; +0xaa, 0x4aa14a\nBL              sub_773A14                                             ; +0xae, 0x4aa14e\nCMP             R0, #1                                                 ; +0xb2, 0x4aa152\nSTR.W           R0, [R4,#0x2DC]                                        ; +0xb4, 0x4aa154\nBNE             loc_4AA166                                             ; +0xb8, 0x4aa158\nMOVS            R3, #0                                                 ; +0xba, 0x4aa15a\nADD.W           R6, R4, #0x2F0                                         ; +0xbc, 0x4aa15c\nSTR.W           R3, [R4,#0x2F0]                                        ; +0xc0, 0x4aa160\nB               loc_4AA18E                                             ; +0xc4, 0x4aa164\nCMP.W           R0, #0x40000000                                        ; +0xc6, 0x4aa166\nBCC             loc_4AA170                                             ; +0xca, 0x4aa16a\nBL              sub_772FB4                                             ; +0xcc, 0x4aa16c\nLSLS            R5, R0, #2                                             ; +0xd0, 0x4aa170\nMOV             R0, R5; unsigned int                                   ; +0xd2, 0x4aa172\nBL              _Znwj; operator new(uint)                              ; +0xd4, 0x4aa174\nMOVS            R1, #0; int                                            ; +0xd8, 0x4aa178\nMOV             R2, R5; size_t                                         ; +0xda, 0x4aa17a\nMOV             R6, R0                                                 ; +0xdc, 0x4aa17c\nBLX             memset                                                 ; +0xde, 0x4aa17e\nB               loc_4AA18E                                             ; +0xe2, 0x4aa182\nMOV             R0, R4; this                                           ; +0xe4, 0x4aa184\nBL              _ZN17SetupTriggerPopupD2Ev; SetupTriggerPopup::~SetupTriggerPopup() ; +0xe6, 0x4aa186\nBL              __cxa_end_cleanup                                      ; +0xea, 0x4aa18a\nSTR.W           R6, [R4,#0x2D8]                                        ; +0xee, 0x4aa18e\nMOV             R0, R4                                                 ; +0xf2, 0x4aa192\nPOP             {R4-R6,PC}                                             ; +0xf4, 0x4aa194", "xrefs": ["GJOptionsLayer::create @ 0x4ab7d2", "EditorOptionsLayer::create @ 0x4ab824", "GameOptionsLayer::create @ 0x4b17be", "GameLevelOptionsLayer::create @ 0x4b1ac2", "LevelOptionsLayer::create @ 0x573066", "LevelOptionsLayer2::create @ 0x5731d6"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}