{"type": "func", "start": 5373326672, "end": 5373326994, "name": "SelectEventLayer::onCustomToggleTriggerValue", "pseudocode": "// \n// SelectEventLayer::onCustomToggleTriggerValue from 0x140467550 to 0x140467692 (322 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x140601b08\n// > <???> @ 0x1406db0c0\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\nvoid SelectEventLayer::onCustomToggleTriggerValue(SelectEventLayer *a1, cocos2d::CCObject *a2)\n{\n  int v4; // eax\n  std::_Tree_val<std::_Tree_simple_types<int>>::_Nodeptr Myhead; // r9\n  std::_Tree_simple_types<int>::_Node *v6; // r8\n  cocos2d::CCDictionary *m_customValueToggles; // rax\n  cocos2d::CCDictElement *m_pElements; // rax\n  cocos2d::CCDictElement *i; // rbx\n  CCMenuItemToggler *m_pObject; // rdi\n  int v11; // eax\n  std::_Tree_val<std::_Tree_simple_types<int>>::_Nodeptr v12; // rdx\n  std::_Tree_simple_types<int>::_Node *v13; // rcx\n  bool v14; // dl\n  char v15[24]; // [rsp+20h] [rbp-18h] BYREF\n  int v16; // [rsp+40h] [rbp+8h] BYREF\n\n  if ( a2 )\n  {\n    a1->m_eventsChanged = 1;\n    v4 = a2->getTag(a2);\n    Myhead = a1->m_eventIDs._Mypair._Myval2._Myval2._Myhead;\n    v6 = *((std::_Tree_simple_types<int>::_Node **)Myhead + 1);\n    while ( !*((_BYTE *)v6 + 25) )\n    {\n      if ( *((_DWORD *)v6 + 7) >= v4 )\n      {\n        Myhead = v6;\n        v6 = *(std::_Tree_simple_types<int>::_Node **)v6;\n      }\n      else\n      {\n        v6 = *((std::_Tree_simple_types<int>::_Node **)v6 + 2);\n      }\n    }\n    if ( *((_BYTE *)Myhead + 25) || v4 < *((_DWORD *)Myhead + 7) )\n    {\n      v16 = a2->getTag(a2);\n      sub_1400CDF10((__int64 *)&a1->m_eventIDs, (__int64)v15, &v16);\n    }\n    else\n    {\n      v16 = a2->getTag(a2);\n      sub_1400CDAE0((__int64 *)&a1->m_eventIDs, &v16);\n    }\n  }\n  m_customValueToggles = a1->m_customValueToggles;\n  if ( m_customValueToggles )\n  {\n    m_pElements = m_customValueToggles->m_pElements;\n    if ( m_pElements )\n    {\n      for ( i = (cocos2d::CCDictElement *)m_pElements->hh.next; ; i = (cocos2d::CCDictElement *)i->hh.next )\n      {\n        m_pObject = (CCMenuItemToggler *)m_pElements->m_pObject;\n        v11 = m_pObject->getTag(m_pObject);\n        v12 = a1->m_eventIDs._Mypair._Myval2._Myval2._Myhead;\n        v13 = *((std::_Tree_simple_types<int>::_Node **)v12 + 1);\n        while ( !*((_BYTE *)v13 + 25) )\n        {\n          if ( *((_DWORD *)v13 + 7) >= v11 )\n          {\n            v12 = v13;\n            v13 = *(std::_Tree_simple_types<int>::_Node **)v13;\n          }\n          else\n          {\n            v13 = *((std::_Tree_simple_types<int>::_Node **)v13 + 2);\n          }\n        }\n        v14 = !*((_BYTE *)v12 + 25) && v11 >= *((_DWORD *)v12 + 7);\n        CCMenuItemToggler::toggle(m_pObject, v14);\n        m_pElements = i;\n        if ( !i )\n          break;\n      }\n    }\n  }\n}", "assembly": "; \n; SelectEventLayer::onCustomToggleTriggerValue from 0x140467550 to 0x140467692 (322 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x140601b08\n; > <???> @ 0x1406db0c0\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140467550\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140467555\npush    rdi                                                            ; +0xa, 0x14046755a\nsub     rsp, 30h                                                       ; +0xb, 0x14046755b\nmov     rbx, rdx                                                       ; +0xf, 0x14046755f\nmov     rsi, rcx                                                       ; +0x12, 0x140467562\ntest    rdx, rdx                                                       ; +0x15, 0x140467565\njz      loc_1404675F9                                                  ; +0x18, 0x140467568\nmov     byte ptr [rcx+3B0h], 1                                         ; +0x1e, 0x14046756e\nmov     rcx, rdx                                                       ; +0x25, 0x140467575\nmov     rax, [rdx]                                                     ; +0x28, 0x140467578\ncall    qword ptr [rax+38h]                                            ; +0x2b, 0x14046757b\nmov     r9, [rsi+3D0h]                                                 ; +0x2e, 0x14046757e\nmov     r8, [r9+8]                                                     ; +0x35, 0x140467585\ncmp     byte ptr [r8+19h], 0                                           ; +0x39, 0x140467589\njnz     short loc_1404675A9                                            ; +0x3e, 0x14046758e\ncmp     [r8+1Ch], eax                                                  ; +0x40, 0x140467590\njge     short loc_14046759C                                            ; +0x44, 0x140467594\nmov     r8, [r8+10h]                                                   ; +0x46, 0x140467596\njmp     short loc_1404675A2                                            ; +0x4a, 0x14046759a\nmov     r9, r8                                                         ; +0x4c, 0x14046759c\nmov     r8, [r8]                                                       ; +0x4f, 0x14046759f\ncmp     byte ptr [r8+19h], 0                                           ; +0x52, 0x1404675a2\njz      short loc_140467590                                            ; +0x57, 0x1404675a7\ncmp     byte ptr [r9+19h], 0                                           ; +0x59, 0x1404675a9\njnz     short loc_1404675D6                                            ; +0x5e, 0x1404675ae\ncmp     eax, [r9+1Ch]                                                  ; +0x60, 0x1404675b0\njl      short loc_1404675D6                                            ; +0x64, 0x1404675b4\nmov     rax, [rbx]                                                     ; +0x66, 0x1404675b6\nmov     rcx, rbx                                                       ; +0x69, 0x1404675b9\ncall    qword ptr [rax+38h]                                            ; +0x6c, 0x1404675bc\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x6f, 0x1404675bf\nmov     [rsp+38h+arg_0], eax                                           ; +0x74, 0x1404675c4\nlea     rcx, [rsi+3D0h]                                                ; +0x78, 0x1404675c8\ncall    sub_1400CDAE0                                                  ; +0x7f, 0x1404675cf\njmp     short loc_1404675F9                                            ; +0x84, 0x1404675d4\nmov     rax, [rbx]                                                     ; +0x86, 0x1404675d6\nmov     rcx, rbx                                                       ; +0x89, 0x1404675d9\ncall    qword ptr [rax+38h]                                            ; +0x8c, 0x1404675dc\nlea     r8, [rsp+38h+arg_0]                                            ; +0x8f, 0x1404675df\nmov     [rsp+38h+arg_0], eax                                           ; +0x94, 0x1404675e4\nlea     rdx, [rsp+38h+var_18]                                          ; +0x98, 0x1404675e8\nlea     rcx, [rsi+3D0h]                                                ; +0x9d, 0x1404675ed\ncall    sub_1400CDF10                                                  ; +0xa4, 0x1404675f4\nmov     rax, [rsi+2E8h]                                                ; +0xa9, 0x1404675f9\ntest    rax, rax                                                       ; +0xb0, 0x140467600\njz      loc_140467682                                                  ; +0xb3, 0x140467603\nmov     rax, [rax+38h]                                                 ; +0xb9, 0x140467609\ntest    rax, rax                                                       ; +0xbd, 0x14046760d\njz      short loc_140467682                                            ; +0xc0, 0x140467610\nmov     rbx, [rax+120h]                                                ; +0xc2, 0x140467612\nnop     dword ptr [rax+00000000h]                                      ; +0xc9, 0x140467619\nmov     rdi, [rax+108h]                                                ; +0xd0, 0x140467620\nmov     rcx, rdi                                                       ; +0xd7, 0x140467627\nmov     rax, [rdi]                                                     ; +0xda, 0x14046762a\ncall    qword ptr [rax+38h]                                            ; +0xdd, 0x14046762d\nmov     rdx, [rsi+3D0h]                                                ; +0xe0, 0x140467630\nmov     rcx, [rdx+8]                                                   ; +0xe7, 0x140467637\ncmp     byte ptr [rcx+19h], 0                                          ; +0xeb, 0x14046763b\njnz     short loc_140467658                                            ; +0xef, 0x14046763f\ncmp     [rcx+1Ch], eax                                                 ; +0xf1, 0x140467641\njge     short loc_14046764C                                            ; +0xf4, 0x140467644\nmov     rcx, [rcx+10h]                                                 ; +0xf6, 0x140467646\njmp     short loc_140467652                                            ; +0xfa, 0x14046764a\nmov     rdx, rcx                                                       ; +0xfc, 0x14046764c\nmov     rcx, [rcx]                                                     ; +0xff, 0x14046764f\ncmp     byte ptr [rcx+19h], 0                                          ; +0x102, 0x140467652\njz      short loc_140467641                                            ; +0x106, 0x140467656\ncmp     byte ptr [rdx+19h], 0                                          ; +0x108, 0x140467658\njnz     short loc_140467667                                            ; +0x10c, 0x14046765c\ncmp     eax, [rdx+1Ch]                                                 ; +0x10e, 0x14046765e\njl      short loc_140467667                                            ; +0x111, 0x140467661\nmov     dl, 1                                                          ; +0x113, 0x140467663\njmp     short loc_140467669                                            ; +0x115, 0x140467665\nxor     dl, dl                                                         ; +0x117, 0x140467667\nmov     rcx, rdi                                                       ; +0x119, 0x140467669\ncall    CCMenuItemToggler__toggle                                      ; +0x11c, 0x14046766c\nmov     rax, rbx                                                       ; +0x121, 0x140467671\ntest    rbx, rbx                                                       ; +0x124, 0x140467674\njz      short loc_140467682                                            ; +0x127, 0x140467677\nmov     rbx, [rbx+120h]                                                ; +0x129, 0x140467679\njmp     short loc_140467620                                            ; +0x130, 0x140467680\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x132, 0x140467682\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x137, 0x140467687\nadd     rsp, 30h                                                       ; +0x13c, 0x14046768c\npop     rdi                                                            ; +0x140, 0x140467690\nretn                                                                   ; +0x141, 0x140467691", "xrefs": ["<???> @ 0x140601b08", "<???> @ 0x1406db0c0"], "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"}