{"type": "func", "start": 4807780, "end": 4808152, "name": "GJBaseGameLayer::controlTriggersWithControlID", "pseudocode": "// \n// GJBaseGameLayer::controlTriggersWithControlID from 0x495c64 to 0x495dd8 (372 bytes)\n// \n// 1 xrefs:\n// > TriggerControlGameObject::triggerObject @ 0x3e51c4\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 GJBaseGameLayer::controlTriggersWithControlID(GJBaseGameLayer *a1, int a2, GJActionCommand a3)\n{\n  std::__detail::_Hash_node_base *i; // r3\n  std::__detail::_Hash_node_base *M_nxt; // r0\n  std::__detail::_Hash_node_base *j; // r2\n  std::__detail::_Hash_node_base *v9; // r1\n  std::__detail::_Hash_node_base *v10; // t1\n  cocos2d::CCDictionary *m_gradientLayers; // r2\n  cocos2d::CCDictElement *m_pElements; // r2\n  cocos2d::CCDictElement *next; // r10\n  char *v14; // r5\n  char *v15; // r4\n  _BYTE *v16; // r6\n  int m_nLuaID; // r3\n  cocos2d::CCDictElement *v18; // r3\n  GradientTriggerObject **k; // r5\n  GradientTriggerObject *v20; // r1\n  signed int v21; // r4\n  int v22; // r3\n  int v23; // r5\n  bool v24; // cf\n  unsigned int v25; // r5\n  char *v26; // r11\n  cocos2d::CCObject *m_pObject; // [sp+4h] [bp-8h]\n\n  GJEffectManager::controlActionsForControlID(a1->m_effectManager, a2, a3);\n  GJBaseGameLayer::controlAreaEffectWithID(a1, -1, a2, a3);\n  GJBaseGameLayer::controlAdvancedFollowCommand(a1, nullptr, a2, a3);\n  GJBaseGameLayer::controlEventLink(a1, -1, a2, a3);\n  GJBaseGameLayer::controlDynamicMoveCommand(a1, nullptr, a2, a3);\n  GJBaseGameLayer::controlDynamicRotateCommand(a1, nullptr, a2, a3);\n  GJGameState::controlTweenAction(&a1->m_gameState, -1, a2, a3);\n  for ( i = a1->m_labelObjects._M_h._M_before_begin._M_nxt; i; i = i->_M_nxt )\n  {\n    M_nxt = i[3]._M_nxt;\n    for ( j = i[2]._M_nxt; j != M_nxt; ++j )\n    {\n      v10 = j->_M_nxt;\n      v9 = v10;\n      if ( v10[371]._M_nxt == (std::__detail::_Hash_node_base *)a2 )\n        LOBYTE(v9[418]._M_nxt) = a3 != Resume;\n    }\n  }\n  m_gradientLayers = a1->m_gradientLayers;\n  if ( m_gradientLayers )\n  {\n    m_pElements = m_gradientLayers->m_pElements;\n    if ( m_pElements )\n      next = (cocos2d::CCDictElement *)m_pElements->hh.next;\n    else\n      next = nullptr;\n    v14 = nullptr;\n    v15 = nullptr;\n    v16 = nullptr;\n    while ( 1 )\n    {\n      if ( !m_pElements )\n        goto LABEL_25;\n      m_pObject = m_pElements->m_pObject;\n      m_nLuaID = m_pObject[9].m_nLuaID;\n      if ( m_nLuaID )\n      {\n        if ( *(_DWORD *)(m_nLuaID + 1484) == a2 )\n          break;\n      }\nLABEL_20:\n      if ( next )\n        v18 = (cocos2d::CCDictElement *)next->hh.next;\n      else\n        v18 = nullptr;\n      m_pElements = next;\n      next = v18;\n    }\n    if ( v15 != v14 )\n    {\n      if ( v15 )\n        *(_DWORD *)v15 = m_nLuaID;\n      v15 += 4;\n      goto LABEL_20;\n    }\n    v21 = v15 - v16;\n    v22 = v21 >> 2;\n    if ( v21 >> 2 )\n      v23 = v21 >> 2;\n    else\n      v23 = 1;\n    v24 = __CFADD__(v23, v22);\n    v25 = v23 + v22;\n    if ( v24 || v25 >= 0x40000000 )\n    {\n      v25 = 0x3FFFFFFF;\n    }\n    else if ( !v25 )\n    {\n      v26 = nullptr;\n      goto LABEL_37;\n    }\n    v26 = (char *)operator new(4 * v25);\nLABEL_37:\n    if ( &v26[v21] )\n      *(_DWORD *)&v26[v21] = m_pObject[9].m_nLuaID;\n    if ( v21 >> 2 )\n      memmove(v26, v16, v21);\n    v15 = &v26[v21 + 4];\n    if ( v16 )\n      operator delete(v16);\n    v14 = &v26[4 * v25];\n    v16 = v26;\n    goto LABEL_20;\n  }\n  v15 = nullptr;\n  v16 = nullptr;\nLABEL_25:\n  for ( k = (GradientTriggerObject **)v16; k != (GradientTriggerObject **)v15; ++k )\n  {\n    v20 = *k;\n    GJBaseGameLayer::controlGradientTrigger(a1, v20, a3);\n  }\n  if ( v16 )\n    operator delete(v16);\n}", "assembly": "; \n; GJBaseGameLayer::controlTriggersWithControlID from 0x495c64 to 0x495dd8 (372 bytes)\n; \n; 1 xrefs:\n; > TriggerControlGameObject::triggerObject @ 0x3e51c4\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.W          {R0-R2,R4-R11,LR}                                      ; +0x0, 0x495c64\nMOV             R7, R0                                                 ; +0x4, 0x495c68\nMOV             R8, R1                                                 ; +0x6, 0x495c6a\nMOV             R9, R2                                                 ; +0x8, 0x495c6c\nLDR.W           R0, [R0,#0x690]                                        ; +0xa, 0x495c6e\nBL              _ZN15GJEffectManager26controlActionsForControlIDEi15GJActionCommand; GJEffectManager::controlActionsForControlID(int,GJActionCommand) ; +0xe, 0x495c72\nMOV             R0, R7                                                 ; +0x12, 0x495c76\nMOV.W           R1, #0xFFFFFFFF                                        ; +0x14, 0x495c78\nMOV             R2, R8                                                 ; +0x18, 0x495c7c\nMOV             R3, R9                                                 ; +0x1a, 0x495c7e\nBL              _ZN15GJBaseGameLayer23controlAreaEffectWithIDEii15GJActionCommand; GJBaseGameLayer::controlAreaEffectWithID(int,int,GJActionCommand) ; +0x1c, 0x495c80\nMOV             R0, R7                                                 ; +0x20, 0x495c84\nMOVS            R1, #0                                                 ; +0x22, 0x495c86\nMOV             R2, R8                                                 ; +0x24, 0x495c88\nMOV             R3, R9                                                 ; +0x26, 0x495c8a\nBL              _ZN15GJBaseGameLayer28controlAdvancedFollowCommandEP27AdvancedFollowTriggerObjecti15GJActionCommand; GJBaseGameLayer::controlAdvancedFollowCommand(AdvancedFollowTriggerObject *,int,GJActionCommand) ; +0x28, 0x495c8c\nMOV             R0, R7                                                 ; +0x2c, 0x495c90\nMOV.W           R1, #0xFFFFFFFF                                        ; +0x2e, 0x495c92\nMOV             R2, R8                                                 ; +0x32, 0x495c96\nMOV             R3, R9                                                 ; +0x34, 0x495c98\nBL              _ZN15GJBaseGameLayer16controlEventLinkEii15GJActionCommand; GJBaseGameLayer::controlEventLink(int,int,GJActionCommand) ; +0x36, 0x495c9a\nMOV             R0, R7                                                 ; +0x3a, 0x495c9e\nMOVS            R1, #0                                                 ; +0x3c, 0x495ca0\nMOV             R2, R8                                                 ; +0x3e, 0x495ca2\nMOV             R3, R9                                                 ; +0x40, 0x495ca4\nBL              _ZN15GJBaseGameLayer25controlDynamicMoveCommandEP16EffectGameObjecti15GJActionCommand; GJBaseGameLayer::controlDynamicMoveCommand(EffectGameObject *,int,GJActionCommand) ; +0x42, 0x495ca6\nMOV             R0, R7                                                 ; +0x46, 0x495caa\nMOVS            R1, #0                                                 ; +0x48, 0x495cac\nMOV             R2, R8                                                 ; +0x4a, 0x495cae\nMOV             R3, R9                                                 ; +0x4c, 0x495cb0\nBL              _ZN15GJBaseGameLayer27controlDynamicRotateCommandEP16EffectGameObjecti15GJActionCommand; GJBaseGameLayer::controlDynamicRotateCommand(EffectGameObject *,int,GJActionCommand) ; +0x4e, 0x495cb2\nMOV             R3, R9                                                 ; +0x52, 0x495cb6\nADD.W           R0, R7, #0x148                                         ; +0x54, 0x495cb8\nMOV.W           R1, #0xFFFFFFFF                                        ; +0x58, 0x495cbc\nMOV             R2, R8                                                 ; +0x5c, 0x495cc0\nBL              _ZN11GJGameState18controlTweenActionEii15GJActionCommand; GJGameState::controlTweenAction(int,int,GJActionCommand) ; +0x5e, 0x495cc2\nLDR.W           R3, [R7,#0xA20]                                        ; +0x62, 0x495cc6\nCBZ             R3, loc_495CF2                                         ; +0x66, 0x495cca\nLDR             R0, [R3,#0xC]                                          ; +0x68, 0x495ccc\nLDR             R2, [R3,#8]                                            ; +0x6a, 0x495cce\nCMP             R2, R0                                                 ; +0x6c, 0x495cd0\nBEQ             loc_495CEE                                             ; +0x6e, 0x495cd2\nLDR.W           R1, [R2],#4                                            ; +0x70, 0x495cd4\nLDR.W           R4, [R1,#0x5CC]                                        ; +0x74, 0x495cd8\nCMP             R4, R8                                                 ; +0x78, 0x495cdc\nBNE             loc_495CD0                                             ; +0x7a, 0x495cde\nSUBS.W          R4, R9, #2                                             ; +0x7c, 0x495ce0\nIT NE                                                                  ; +0x80, 0x495ce4\nMOVNE           R4, #1                                                 ; +0x82, 0x495ce6\nSTRB.W          R4, [R1,#0x688]                                        ; +0x84, 0x495ce8\nB               loc_495CD0                                             ; +0x88, 0x495cec\nLDR             R3, [R3]                                               ; +0x8a, 0x495cee\nB               loc_495CCA                                             ; +0x8c, 0x495cf0\nMOVW            R2, #0x2A74                                            ; +0x8e, 0x495cf2\nLDR             R2, [R7,R2]                                            ; +0x92, 0x495cf6\nCBZ             R2, loc_495D40                                         ; +0x94, 0x495cf8\nLDR             R2, [R2,#0x34]                                         ; +0x96, 0x495cfa\nCBZ             R2, loc_495D04                                         ; +0x98, 0x495cfc\nLDR.W           R10, [R2,#0x110]                                       ; +0x9a, 0x495cfe\nB               loc_495D06                                             ; +0x9e, 0x495d02\nMOV             R10, R3                                                ; +0xa0, 0x495d04\nMOVS            R5, #0                                                 ; +0xa2, 0x495d06\nMOV             R4, R5                                                 ; +0xa4, 0x495d08\nMOV             R6, R5                                                 ; +0xa6, 0x495d0a\nCBZ             R2, loc_495D44                                         ; +0xa8, 0x495d0c\nLDR.W           R3, [R2,#0x104]                                        ; +0xaa, 0x495d0e\nSTR             R3, [SP,#0xC+var_8]                                    ; +0xae, 0x495d12\nLDR.W           R3, [R3,#0x1DC]                                        ; +0xb0, 0x495d14\nCBZ             R3, loc_495D2C                                         ; +0xb4, 0x495d18\nLDR.W           R2, [R3,#0x5CC]                                        ; +0xb6, 0x495d1a\nCMP             R2, R8                                                 ; +0xba, 0x495d1e\nBNE             loc_495D2C                                             ; +0xbc, 0x495d20\nCMP             R4, R5                                                 ; +0xbe, 0x495d22\nBEQ             loc_495D76                                             ; +0xc0, 0x495d24\nCBZ             R4, loc_495D2A                                         ; +0xc2, 0x495d26\nSTR             R3, [R4]                                               ; +0xc4, 0x495d28\nADDS            R4, #4                                                 ; +0xc6, 0x495d2a\nCMP.W           R10, #0                                                ; +0xc8, 0x495d2c\nBEQ             loc_495D38                                             ; +0xcc, 0x495d30\nLDR.W           R3, [R10,#0x110]                                       ; +0xce, 0x495d32\nB               loc_495D3A                                             ; +0xd2, 0x495d36\nMOV             R3, R10                                                ; +0xd4, 0x495d38\nMOV             R2, R10                                                ; +0xd6, 0x495d3a\nMOV             R10, R3                                                ; +0xd8, 0x495d3c\nB               loc_495D0C                                             ; +0xda, 0x495d3e\nMOV             R4, R3                                                 ; +0xdc, 0x495d40\nMOV             R6, R3                                                 ; +0xde, 0x495d42\nMOV             R5, R6                                                 ; +0xe0, 0x495d44\nCMP             R5, R4                                                 ; +0xe2, 0x495d46\nMOV             R3, R5                                                 ; +0xe4, 0x495d48\nBEQ             loc_495D5A                                             ; +0xe6, 0x495d4a\nMOV             R0, R7                                                 ; +0xe8, 0x495d4c\nLDR             R1, [R3]                                               ; +0xea, 0x495d4e\nMOV             R2, R9                                                 ; +0xec, 0x495d50\nADDS            R5, #4                                                 ; +0xee, 0x495d52\nBL              _ZN15GJBaseGameLayer22controlGradientTriggerEP21GradientTriggerObject15GJActionCommand; GJBaseGameLayer::controlGradientTrigger(GradientTriggerObject *,GJActionCommand) ; +0xf0, 0x495d54\nB               loc_495D46                                             ; +0xf4, 0x495d58\nCMP             R6, #0                                                 ; +0xf6, 0x495d5a\nBEQ             loc_495DD2                                             ; +0xf8, 0x495d5c\nMOV             R0, R6; p                                              ; +0xfa, 0x495d5e\nADD             SP, SP, #0xC                                           ; +0xfc, 0x495d60\nPOP.W           {R4-R11,LR}                                            ; +0xfe, 0x495d62\nB.W             _ZdlPv; operator delete(void *)                        ; +0x102, 0x495d66\nCBZ             R6, loc_495D72                                         ; +0x106, 0x495d6a\nMOV             R0, R6; p                                              ; +0x108, 0x495d6c\nBL              _ZdlPv; operator delete(void *)                        ; +0x10a, 0x495d6e\nBL              __cxa_end_cleanup                                      ; +0x10e, 0x495d72\nSUBS            R4, R4, R6                                             ; +0x112, 0x495d76\nASRS            R3, R4, #2                                             ; +0x114, 0x495d78\nSTR             R3, [SP,#0xC+var_C]                                    ; +0x116, 0x495d7a\nITE NE                                                                 ; +0x118, 0x495d7c\nMOVNE           R5, R3                                                 ; +0x11a, 0x495d7e\nMOVEQ           R5, #1                                                 ; +0x11c, 0x495d80\nADDS            R5, R5, R3                                             ; +0x11e, 0x495d82\nBCS             loc_495D8C                                             ; +0x120, 0x495d84\nCMP.W           R5, #0x40000000                                        ; +0x122, 0x495d86\nBCC             loc_495DCA                                             ; +0x126, 0x495d8a\nMOV             R5, #0x3FFFFFFF                                        ; +0x128, 0x495d8c\nLSLS            R0, R5, #2; unsigned int                               ; +0x12c, 0x495d90\nBL              _Znwj; operator new(uint)                              ; +0x12e, 0x495d92\nMOV             R11, R0                                                ; +0x132, 0x495d96\nLDR             R3, [SP,#0xC+var_8]                                    ; +0x134, 0x495d98\nCMN.W           R11, R4                                                ; +0x136, 0x495d9a\nLDR.W           R2, [R3,#0x1DC]                                        ; +0x13a, 0x495d9e\nLDR             R3, [SP,#0xC+var_C]                                    ; +0x13e, 0x495da2\nIT NE                                                                  ; +0x140, 0x495da4\nSTRNE.W         R2, [R11,R4]                                           ; +0x142, 0x495da6\nCBZ             R3, loc_495DB6                                         ; +0x146, 0x495daa\nMOV             R0, R11; void *                                        ; +0x148, 0x495dac\nMOV             R1, R6; void *                                         ; +0x14a, 0x495dae\nMOV             R2, R4; size_t                                         ; +0x14c, 0x495db0\nBLX             memmove                                                ; +0x14e, 0x495db2\nADDS            R4, #4                                                 ; +0x152, 0x495db6\nADD             R4, R11                                                ; +0x154, 0x495db8\nCBZ             R6, loc_495DC2                                         ; +0x156, 0x495dba\nMOV             R0, R6; p                                              ; +0x158, 0x495dbc\nBL              _ZdlPv; operator delete(void *)                        ; +0x15a, 0x495dbe\nADD.W           R5, R11, R5,LSL#2                                      ; +0x15e, 0x495dc2\nMOV             R6, R11                                                ; +0x162, 0x495dc6\nB               loc_495D2C                                             ; +0x164, 0x495dc8\nCMP             R5, #0                                                 ; +0x166, 0x495dca\nBNE             loc_495D90                                             ; +0x168, 0x495dcc\nMOV             R11, R5                                                ; +0x16a, 0x495dce\nB               loc_495D98                                             ; +0x16c, 0x495dd0\nADD             SP, SP, #0xC                                           ; +0x16e, 0x495dd2\nPOP.W           {R4-R11,PC}                                            ; +0x170, 0x495dd4", "xrefs": ["TriggerControlGameObject::triggerObject @ 0x3e51c4"], "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"}