{"type": "func", "start": 4807556, "end": 4807776, "name": "GJBaseGameLayer::controlAreaEffectWithID", "pseudocode": "// \n// GJBaseGameLayer::controlAreaEffectWithID from 0x495b84 to 0x495c60 (220 bytes)\n// \n// 2 xrefs:\n// > EffectGameObject::triggerObject @ 0x3eddb2\n// > GJBaseGameLayer::controlTriggersWithControlID @ 0x495c80\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::controlAreaEffectWithID(GJBaseGameLayer *a1, int a2, int a3, GJActionCommand a4)\n{\n  int v8; // r10\n  std::vector<EnterEffectInstance> *p_m_rotateEffectInstances; // r4\n  unsigned int v10; // r11\n  int v11; // r1\n  _BOOL4 v12; // [sp+4h] [bp-8h]\n\n  v8 = 1;\n  v12 = a3 != -1;\n  while ( 2 )\n  {\n    switch ( v8 )\n    {\n      case 2:\n        p_m_rotateEffectInstances = &a1->m_gameState.m_rotateEffectInstances;\n        goto LABEL_22;\n      case 3:\n        p_m_rotateEffectInstances = &a1->m_gameState.m_scaleEffectInstances;\n        goto LABEL_22;\n      case 4:\n        p_m_rotateEffectInstances = &a1->m_gameState.m_fadeEffectInstances;\nLABEL_22:\n        if ( !p_m_rotateEffectInstances )\n          goto LABEL_5;\n        goto LABEL_10;\n      case 5:\n        p_m_rotateEffectInstances = &a1->m_gameState.m_tintEffectInstances;\n        if ( a1 != (GJBaseGameLayer *)-1296 )\n          goto LABEL_10;\n        return;\n      default:\n        p_m_rotateEffectInstances = &a1->m_gameState.m_moveEffectInstances;\n        if ( a1 == (GJBaseGameLayer *)-1248 )\n          goto LABEL_4;\nLABEL_10:\n        v10 = 0;\n        break;\n    }\n    while ( v10 < -1944890851\n                * (((char *)p_m_rotateEffectInstances->m_finish - (char *)p_m_rotateEffectInstances->m_start) >> 2) )\n    {\n      v11 = (int)&p_m_rotateEffectInstances->m_start[v10];\n      if ( v12 )\n      {\n        if ( *(_DWORD *)(v11 + 208) != a3 )\n          goto LABEL_21;\n        if ( a4 )\n          goto LABEL_18;\n        std::vector<EnterEffectInstance>::erase((int)p_m_rotateEffectInstances, v11);\n      }\n      else\n      {\n        if ( *(_DWORD *)(*(_DWORD *)(v11 + 164) + 1788) != a2 )\n          goto LABEL_21;\n        if ( a4 )\n        {\nLABEL_18:\n          if ( a4 == Pause )\n          {\n            *(_BYTE *)(v11 + 188) = 1;\n            *(_BYTE *)(v11 + 189) = 1;\n          }\n          else if ( a4 == Resume )\n          {\n            *(_BYTE *)(v11 + 188) = 0;\n            *(_BYTE *)(v11 + 189) = 0;\n          }\n          if ( !v12 && a2 > 0 )\n            break;\nLABEL_21:\n          ++v10;\n        }\n        else\n        {\n          std::vector<EnterEffectInstance>::erase((int)p_m_rotateEffectInstances, v11);\n          if ( a2 > 0 )\n            break;\n        }\n      }\n    }\nLABEL_4:\n    if ( v8 != 5 )\n    {\nLABEL_5:\n      ++v8;\n      continue;\n    }\n    break;\n  }\n}", "assembly": "; \n; GJBaseGameLayer::controlAreaEffectWithID from 0x495b84 to 0x495c60 (220 bytes)\n; \n; 2 xrefs:\n; > EffectGameObject::triggerObject @ 0x3eddb2\n; > GJBaseGameLayer::controlTriggersWithControlID @ 0x495c80\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, 0x495b84\nMOV             R6, R3                                                 ; +0x4, 0x495b88\nADDS            R3, R2, #1                                             ; +0x6, 0x495b8a\nMOV             R5, R0                                                 ; +0x8, 0x495b8c\nMOV             R7, R1                                                 ; +0xa, 0x495b8e\nMOV             R8, R2                                                 ; +0xc, 0x495b90\nMOV.W           R10, #1                                                ; +0xe, 0x495b92\nMOV.W           R9, #0                                                 ; +0x12, 0x495b96\nIT NE                                                                  ; +0x16, 0x495b9a\nMOVNE           R3, #1                                                 ; +0x18, 0x495b9c\nSTR             R3, [SP,#0xC+var_8]                                    ; +0x1a, 0x495b9e\nSUB.W           R3, R10, #2; switch 4 cases                            ; +0x1c, 0x495ba0\nCMP             R3, #3                                                 ; +0x20, 0x495ba4\nBHI             def_495BA8; jumptable 00495BA8 default case            ; +0x22, 0x495ba6\nTBB.W           [PC,R3]; switch jump                                   ; +0x24, 0x495ba8\nDCB 0xB; jump table for switch statement                               ; +0x28, 0x495bac\nDCB 0xE                                                                ; +0x29, 0x495bad\nDCB 0x11                                                               ; +0x2a, 0x495bae\nDCB 0x14                                                               ; +0x2b, 0x495baf\nADDS.W          R4, R5, #0x4E0; jumptable 00495BA8 default case        ; +0x2c, 0x495bb0\nBNE             loc_495BDA                                             ; +0x30, 0x495bb4\nCMP.W           R10, #5                                                ; +0x32, 0x495bb6\nBEQ             loc_495C5A                                             ; +0x36, 0x495bba\nADD.W           R10, R10, #1                                           ; +0x38, 0x495bbc\nB               loc_495BA0                                             ; +0x3c, 0x495bc0\nADDW            R4, R5, #0x4EC; jumptable 00495BA8 case 2              ; +0x3e, 0x495bc2\nB               loc_495C28                                             ; +0x42, 0x495bc6\nADD.W           R4, R5, #0x4F8; jumptable 00495BA8 case 3              ; +0x44, 0x495bc8\nB               loc_495C28                                             ; +0x48, 0x495bcc\nADDW            R4, R5, #0x504; jumptable 00495BA8 case 4              ; +0x4a, 0x495bce\nB               loc_495C28                                             ; +0x4e, 0x495bd2\nADDS.W          R4, R5, #0x510; jumptable 00495BA8 case 5              ; +0x50, 0x495bd4\nBEQ             loc_495C5A                                             ; +0x54, 0x495bd8\nMOV.W           R11, #0                                                ; +0x56, 0x495bda\nLDR             R1, [R4]                                               ; +0x5a, 0x495bde\nLDR             R0, [R4,#4]                                            ; +0x5c, 0x495be0\nLDR             R3, =0x8C13521D                                        ; +0x5e, 0x495be2\nSUBS            R0, R0, R1                                             ; +0x60, 0x495be4\nASRS            R0, R0, #2                                             ; +0x62, 0x495be6\nMULS            R0, R3                                                 ; +0x64, 0x495be8\nCMP             R11, R0                                                ; +0x66, 0x495bea\nBCS             loc_495BB6                                             ; +0x68, 0x495bec\nMOVS            R3, #0xD4                                              ; +0x6a, 0x495bee\nMLA             R1, R3, R11, R1                                        ; +0x6c, 0x495bf0\nLDR             R3, [SP,#0xC+var_8]                                    ; +0x70, 0x495bf4\nLDR.W           R0, [R1,#0xA4]                                         ; +0x72, 0x495bf6\nCBZ             R3, loc_495C06                                         ; +0x76, 0x495bfa\nLDR.W           R0, [R1,#0xD0]                                         ; +0x78, 0x495bfc\nCMP             R0, R8                                                 ; +0x7c, 0x495c00\nBNE             loc_495C22                                             ; +0x7e, 0x495c02\nB               loc_495C10                                             ; +0x80, 0x495c04\nLDR.W           R0, [R0,#0x6FC]                                        ; +0x82, 0x495c06\nCMP             R0, R7                                                 ; +0x86, 0x495c0a\nBNE             loc_495C22                                             ; +0x88, 0x495c0c\nB               loc_495C4A                                             ; +0x8a, 0x495c0e\nCBZ             R6, loc_495C42                                         ; +0x8c, 0x495c10\nCMP             R6, #1                                                 ; +0x8e, 0x495c12\nBNE             loc_495C2E                                             ; +0x90, 0x495c14\nSTRB.W          R6, [R1,#0xBC]                                         ; +0x92, 0x495c16\nSTRB.W          R6, [R1,#0xBD]                                         ; +0x96, 0x495c1a\nLDR             R3, [SP,#0xC+var_8]                                    ; +0x9a, 0x495c1e\nCBZ             R3, loc_495C3C                                         ; +0x9c, 0x495c20\nADD.W           R11, R11, #1                                           ; +0x9e, 0x495c22\nB               loc_495BDE                                             ; +0xa2, 0x495c26\nCMP             R4, #0                                                 ; +0xa4, 0x495c28\nBNE             loc_495BDA                                             ; +0xa6, 0x495c2a\nB               loc_495BBC                                             ; +0xa8, 0x495c2c\nCMP             R6, #2                                                 ; +0xaa, 0x495c2e\nBNE             loc_495C1E                                             ; +0xac, 0x495c30\nSTRB.W          R9, [R1,#0xBC]                                         ; +0xae, 0x495c32\nSTRB.W          R9, [R1,#0xBD]                                         ; +0xb2, 0x495c36\nB               loc_495C1E                                             ; +0xb6, 0x495c3a\nCMP             R7, #0                                                 ; +0xb8, 0x495c3c\nBLE             loc_495C22                                             ; +0xba, 0x495c3e\nB               loc_495BB6                                             ; +0xbc, 0x495c40\nMOV             R0, R4                                                 ; +0xbe, 0x495c42\nBL              _ZNSt6vectorI19EnterEffectInstanceSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE; std::vector<EnterEffectInstance>::erase(__gnu_cxx::__normal_iterator<EnterEffectInstance const*,std::vector<EnterEffectInstance>>) ; +0xc0, 0x495c44\nB               loc_495BDE                                             ; +0xc4, 0x495c48\nCMP             R6, #0                                                 ; +0xc6, 0x495c4a\nBNE             loc_495C12                                             ; +0xc8, 0x495c4c\nMOV             R0, R4                                                 ; +0xca, 0x495c4e\nBL              _ZNSt6vectorI19EnterEffectInstanceSaIS0_EE5eraseEN9__gnu_cxx17__normal_iteratorIPKS0_S2_EE; std::vector<EnterEffectInstance>::erase(__gnu_cxx::__normal_iterator<EnterEffectInstance const*,std::vector<EnterEffectInstance>>) ; +0xcc, 0x495c50\nCMP             R7, #0                                                 ; +0xd0, 0x495c54\nBLE             loc_495BDE                                             ; +0xd2, 0x495c56\nB               loc_495BB6                                             ; +0xd4, 0x495c58\nADD             SP, SP, #0xC                                           ; +0xd6, 0x495c5a\nPOP.W           {R4-R11,PC}                                            ; +0xd8, 0x495c5c", "xrefs": ["EffectGameObject::triggerObject @ 0x3eddb2", "GJBaseGameLayer::controlTriggersWithControlID @ 0x495c80"], "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"}