{"type": "func", "start": 13244852, "end": 13245592, "name": "DeathMarkerLayer::updateVisibility", "pseudocode": "// \n// DeathMarkerLayer::updateVisibility from 0xca19b4 to 0xca1c98 (740 bytes)\n// \n// 8 xrefs:\n// > LevelEditorLayer::postUpdate @ 0x79b028\n// > LevelEditorLayer::postUpdate @ 0x79b038\n// > LevelEditorLayer::updateEditor @ 0x7a8f4c\n// > LevelEditorLayer::updateEditor @ 0x7a8f5c\n// > PlayLayer::dtUpdateLiveMarkers @ 0xc36804\n// > PlayLayer::dtUpdateLiveMarkers @ 0xc36814\n// > DeathMarkerLayer::init @ 0xca3f68\n// > <???> @ 0x54280\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 13:05:59 +0000\n// \n\n__int64 __fastcall DeathMarkerLayer::updateVisibility(DeathMarkerLayer *this, const cocos2d::CCRect *a2)\n{\n  float v4; // s0\n  float v5; // s9\n  float v6; // s0\n  float v7; // s11\n  float v8; // s0\n  float v9; // s8\n  float v10; // s0\n  float v11; // s10\n  __int64 result; // x0\n  int v13; // w27\n  float v14; // s11\n  float v15; // s10\n  int v16; // w25\n  int v17; // w23\n  int v18; // w24\n  int v19; // w22\n  int v20; // w2\n  int k; // w20\n  int m; // w21\n  int v23; // w20\n  int v24; // w22\n  int v25; // w0\n  int v26; // w2\n  int v27; // w20\n  unsigned int v28; // w1\n  __int64 *i; // x20\n  __int64 *j; // x25\n\n  if ( *((float *)a2 + 2) <= 0.0 || *((float *)a2 + 3) <= 0.0 )\n  {\n    result = *((unsigned __int8 *)this + 400);\n    if ( !*((_BYTE *)this + 400) )\n    {\n      v24 = *((_DWORD *)this + 96);\n      v25 = *((_DWORD *)this + 97);\n      if ( v24 <= v25 )\n      {\n        v26 = *((_DWORD *)this + 99);\n        do\n        {\n          v27 = *((_DWORD *)this + 98);\n          if ( v27 <= v26 )\n          {\n            do\n            {\n              v28 = v27++ | (v24 << 16);\n              DeathMarkerLayer::unmountSection(this, v28);\n              v26 = *((_DWORD *)this + 99);\n            }\n            while ( v26 >= v27 );\n            v25 = *((_DWORD *)this + 97);\n          }\n          ++v24;\n        }\n        while ( v25 >= v24 );\n      }\n      for ( i = *((__int64 **)this + 45); i; i = (__int64 *)*i )\n        DeathMarkerLayer::mountSection(this, *((_DWORD *)i + 4));\n      *((_DWORD *)this + 96) = 0;\n      *((_BYTE *)this + 400) = 1;\n      *(_QWORD *)((char *)this + 388) = 0xFFFFFFFFLL;\n      *((_DWORD *)this + 99) = -1;\n      return 0xFFFFFFFFLL;\n    }\n  }\n  else\n  {\n    cocos2d::CCRect::getMinX(a2);\n    v5 = v4;\n    cocos2d::CCRect::getMaxX(a2);\n    v7 = v6;\n    cocos2d::CCRect::getMinY(a2);\n    v9 = v8;\n    cocos2d::CCRect::getMaxY(a2);\n    v11 = v10;\n    if ( *((_BYTE *)this + 400) )\n    {\n      for ( j = *((__int64 **)this + 45); j; j = (__int64 *)*j )\n        DeathMarkerLayer::unmountSection(this, *((_DWORD *)j + 4));\n      *((_BYTE *)this + 400) = 0;\n      *((_DWORD *)this + 96) = 0;\n      result = 0xFFFFFFFFLL;\n      *((_DWORD *)this + 97) = -1;\n      v13 = 0;\n      *((_DWORD *)this + 98) = 0;\n      *((_DWORD *)this + 99) = -1;\n    }\n    else\n    {\n      result = *((unsigned int *)this + 97);\n      v13 = *((_DWORD *)this + 96);\n    }\n    v14 = v7 / 240.0;\n    v15 = v11 / 240.0;\n    v16 = (int)(float)(v5 / 240.0) - 1;\n    if ( v16 < 0 )\n      v16 = 0;\n    if ( (int)(float)(v9 / 240.0) - 1 < 0 )\n      v17 = 0;\n    else\n      v17 = (int)(float)(v9 / 240.0) - 1;\n    v18 = (int)v14 + 1;\n    v19 = (int)v15 + 1;\n    if ( v13 != v16 || v18 != (_DWORD)result || *((_DWORD *)this + 98) != v17 || *((_DWORD *)this + 99) != v19 )\n    {\n      if ( v13 <= (int)result )\n      {\n        v20 = *((_DWORD *)this + 99);\n        do\n        {\n          for ( k = *((_DWORD *)this + 98); v20 >= k; v20 = *((_DWORD *)this + 99) )\n          {\n            while ( v18 >= v13 && v13 >= v16 && k >= v17 && k <= v19 )\n            {\n              if ( v20 < ++k )\n                goto LABEL_20;\n            }\n            DeathMarkerLayer::unmountSection(this, k++ | (v13 << 16));\n          }\nLABEL_20:\n          result = *((unsigned int *)this + 97);\n          ++v13;\n        }\n        while ( (int)result >= v13 );\n      }\n      for ( m = v16; v18 >= m; ++m )\n      {\n        if ( v19 >= v17 )\n        {\n          v23 = v17;\n          do\n          {\n            result = (__int64)this;\n            if ( *((_DWORD *)this + 96) > m\n              || *((_DWORD *)this + 97) < m\n              || *((_DWORD *)this + 98) > v23\n              || *((_DWORD *)this + 99) < v23 )\n            {\n              result = DeathMarkerLayer::mountSection(this, v23 | (unsigned int)(m << 16));\n            }\n            ++v23;\n          }\n          while ( v19 >= v23 );\n        }\n      }\n      *((_DWORD *)this + 96) = v16;\n      *((_DWORD *)this + 97) = v18;\n      *((_DWORD *)this + 98) = v17;\n      *((_DWORD *)this + 99) = v19;\n    }\n  }\n  return result;\n}", "assembly": "; \n; DeathMarkerLayer::updateVisibility from 0xca19b4 to 0xca1c98 (740 bytes)\n; \n; 8 xrefs:\n; > LevelEditorLayer::postUpdate @ 0x79b028\n; > LevelEditorLayer::postUpdate @ 0x79b038\n; > LevelEditorLayer::updateEditor @ 0x7a8f4c\n; > LevelEditorLayer::updateEditor @ 0x7a8f5c\n; > PlayLayer::dtUpdateLiveMarkers @ 0xc36804\n; > PlayLayer::dtUpdateLiveMarkers @ 0xc36814\n; > DeathMarkerLayer::init @ 0xca3f68\n; > <???> @ 0x54280\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 13:05:59 +0000\n; \nSTP             X29, X30, [SP,#var_80]!                                ; +0x0, 0xca19b4\nMOV             X29, SP                                                ; +0x4, 0xca19b8\nSTP             D8, D9, [SP,#0x80+var_28]                              ; +0x8, 0xca19bc\nSTP             X19, X20, [SP,#0x80+var_70]                            ; +0xc, 0xca19c0\nSTP             D10, D11, [SP,#0x80+var_18]                            ; +0x10, 0xca19c4\nSTP             X21, X22, [SP,#0x80+var_60]                            ; +0x14, 0xca19c8\nSTP             X23, X24, [SP,#0x80+var_50]                            ; +0x18, 0xca19cc\nSTP             X25, X26, [SP,#0x80+var_40]                            ; +0x1c, 0xca19d0\nSTR             X27, [SP,#0x80+var_30]                                 ; +0x20, 0xca19d4\nMOV             X20, X1                                                ; +0x24, 0xca19d8\nMOV             X19, X0                                                ; +0x28, 0xca19dc\nLDR             S0, [X1,#8]                                            ; +0x2c, 0xca19e0\nFCMPE           S0, #0.0                                               ; +0x30, 0xca19e4\nB.LS            loc_CA1BA0                                             ; +0x34, 0xca19e8\nLDR             S0, [X1,#0xC]                                          ; +0x38, 0xca19ec\nFCMPE           S0, #0.0                                               ; +0x3c, 0xca19f0\nB.LS            loc_CA1BA0                                             ; +0x40, 0xca19f4\nMOV             X0, X1; this                                           ; +0x44, 0xca19f8\nBL              _ZNK7cocos2d6CCRect7getMinXEv; cocos2d::CCRect::getMinX(void) ; +0x48, 0xca19fc\nFMOV            S9, S0                                                 ; +0x4c, 0xca1a00\nMOV             X0, X20; this                                          ; +0x50, 0xca1a04\nBL              _ZNK7cocos2d6CCRect7getMaxXEv; cocos2d::CCRect::getMaxX(void) ; +0x54, 0xca1a08\nFMOV            S11, S0                                                ; +0x58, 0xca1a0c\nMOV             X0, X20; this                                          ; +0x5c, 0xca1a10\nBL              _ZNK7cocos2d6CCRect7getMinYEv; cocos2d::CCRect::getMinY(void) ; +0x60, 0xca1a14\nFMOV            S8, S0                                                 ; +0x64, 0xca1a18\nMOV             X0, X20; this                                          ; +0x68, 0xca1a1c\nBL              _ZNK7cocos2d6CCRect7getMaxYEv; cocos2d::CCRect::getMaxY(void) ; +0x6c, 0xca1a20\nLDRB            W0, [X19,#0x190]                                       ; +0x70, 0xca1a24\nFMOV            S10, S0                                                ; +0x74, 0xca1a28\nCBNZ            W0, loc_CA1C34                                         ; +0x78, 0xca1a2c\nLDR             W0, [X19,#0x184]                                       ; +0x7c, 0xca1a30\nLDR             W27, [X19,#0x180]                                      ; +0x80, 0xca1a34\nLDR             S0, =0x43700000                                        ; +0x84, 0xca1a38\nFDIV            S9, S9, S0                                             ; +0x88, 0xca1a3c\nFDIV            S8, S8, S0                                             ; +0x8c, 0xca1a40\nFDIV            S11, S11, S0                                           ; +0x90, 0xca1a44\nFCVTZS          W23, S9                                                ; +0x94, 0xca1a48\nFDIV            S10, S10, S0                                           ; +0x98, 0xca1a4c\nSUBS            W25, W23, #1                                           ; +0x9c, 0xca1a50\nFCVTZS          W20, S8                                                ; +0xa0, 0xca1a54\nCSEL            W25, W25, WZR, PL                                      ; +0xa4, 0xca1a58\nSUBS            W20, W20, #1                                           ; +0xa8, 0xca1a5c\nFCVTZS          W24, S11                                               ; +0xac, 0xca1a60\nCSEL            W23, W20, WZR, PL                                      ; +0xb0, 0xca1a64\nCMP             W27, W25                                               ; +0xb4, 0xca1a68\nADD             W24, W24, #1                                           ; +0xb8, 0xca1a6c\nFCVTZS          W22, S10                                               ; +0xbc, 0xca1a70\nADD             W22, W22, #1                                           ; +0xc0, 0xca1a74\nB.EQ            loc_CA1C74                                             ; +0xc4, 0xca1a78\nCMP             W27, W0                                                ; +0xc8, 0xca1a7c\nB.GT            loc_CA1AFC                                             ; +0xcc, 0xca1a80\nLDR             W2, [X19,#0x18C]                                       ; +0xd0, 0xca1a84\nLDR             W20, [X19,#0x188]                                      ; +0xd4, 0xca1a88\nCMP             W20, W2                                                ; +0xd8, 0xca1a8c\nB.GT            loc_CA1AEC                                             ; +0xdc, 0xca1a90\nCMP             W24, W27                                               ; +0xe0, 0xca1a94\nLSL             W26, W27, #0x10                                        ; +0xe4, 0xca1a98\nCSET            W21, LT                                                ; +0xe8, 0xca1a9c\nCMP             W27, W25                                               ; +0xec, 0xca1aa0\nCSET            W0, LT                                                 ; +0xf0, 0xca1aa4\nORR             W21, W21, W0                                           ; +0xf4, 0xca1aa8\nB               loc_CA1AC8                                             ; +0xf8, 0xca1aac\nB.LT            loc_CA1AD8                                             ; +0xfc, 0xca1ab0\nCMP             W20, W22                                               ; +0x100, 0xca1ab4\nB.GT            loc_CA1AD8                                             ; +0x104, 0xca1ab8\nADD             W20, W20, #1                                           ; +0x108, 0xca1abc\nCMP             W2, W20                                                ; +0x10c, 0xca1ac0\nB.LT            loc_CA1AEC                                             ; +0x110, 0xca1ac4\nORR             W1, W20, W26; unsigned int                             ; +0x114, 0xca1ac8\nMOV             X0, X19; this                                          ; +0x118, 0xca1acc\nCMP             W20, W23                                               ; +0x11c, 0xca1ad0\nCBZ             W21, loc_CA1AB0                                        ; +0x120, 0xca1ad4\nBL              _ZN16DeathMarkerLayer14unmountSectionEj; DeathMarkerLayer::unmountSection(uint) ; +0x124, 0xca1ad8\nADD             W20, W20, #1                                           ; +0x128, 0xca1adc\nLDR             W2, [X19,#0x18C]                                       ; +0x12c, 0xca1ae0\nCMP             W2, W20                                                ; +0x130, 0xca1ae4\nB.GE            loc_CA1AC8                                             ; +0x134, 0xca1ae8\nLDR             W0, [X19,#0x184]                                       ; +0x138, 0xca1aec\nADD             W27, W27, #1                                           ; +0x13c, 0xca1af0\nCMP             W0, W27                                                ; +0x140, 0xca1af4\nB.GE            loc_CA1A88                                             ; +0x144, 0xca1af8\nCMP             W24, W25                                               ; +0x148, 0xca1afc\nMOV             W21, W25                                               ; +0x14c, 0xca1b00\nB.LT            loc_CA1B6C                                             ; +0x150, 0xca1b04\nCMP             W22, W23                                               ; +0x154, 0xca1b08\nB.LT            loc_CA1B60                                             ; +0x158, 0xca1b0c\nLSL             W26, W21, #0x10                                        ; +0x15c, 0xca1b10\nMOV             W20, W23                                               ; +0x160, 0xca1b14\nLDR             W2, [X19,#0x180]                                       ; +0x164, 0xca1b18\nORR             W1, W20, W26; unsigned int                             ; +0x168, 0xca1b1c\nMOV             X0, X19; this                                          ; +0x16c, 0xca1b20\nCMP             W2, W21                                                ; +0x170, 0xca1b24\nB.GT            loc_CA1B50                                             ; +0x174, 0xca1b28\nLDR             W2, [X19,#0x184]                                       ; +0x178, 0xca1b2c\nCMP             W2, W21                                                ; +0x17c, 0xca1b30\nB.LT            loc_CA1B50                                             ; +0x180, 0xca1b34\nLDR             W2, [X19,#0x188]                                       ; +0x184, 0xca1b38\nCMP             W2, W20                                                ; +0x188, 0xca1b3c\nB.GT            loc_CA1B50                                             ; +0x18c, 0xca1b40\nLDR             W2, [X19,#0x18C]                                       ; +0x190, 0xca1b44\nCMP             W2, W20                                                ; +0x194, 0xca1b48\nB.GE            loc_CA1B54                                             ; +0x198, 0xca1b4c\nBL              _ZN16DeathMarkerLayer12mountSectionEj; DeathMarkerLayer::mountSection(uint) ; +0x19c, 0xca1b50\nADD             W20, W20, #1                                           ; +0x1a0, 0xca1b54\nCMP             W22, W20                                               ; +0x1a4, 0xca1b58\nB.GE            loc_CA1B18                                             ; +0x1a8, 0xca1b5c\nADD             W21, W21, #1                                           ; +0x1ac, 0xca1b60\nCMP             W24, W21                                               ; +0x1b0, 0xca1b64\nB.GE            loc_CA1B08                                             ; +0x1b4, 0xca1b68\nSTR             W25, [X19,#0x180]                                      ; +0x1b8, 0xca1b6c\nSTR             W24, [X19,#0x184]                                      ; +0x1bc, 0xca1b70\nSTR             W23, [X19,#0x188]                                      ; +0x1c0, 0xca1b74\nSTR             W22, [X19,#0x18C]                                      ; +0x1c4, 0xca1b78\nLDP             X19, X20, [SP,#0x80+var_70]                            ; +0x1c8, 0xca1b7c\nLDP             D8, D9, [SP,#0x80+var_28]                              ; +0x1cc, 0xca1b80\nLDP             X21, X22, [SP,#0x80+var_60]                            ; +0x1d0, 0xca1b84\nLDP             D10, D11, [SP,#0x80+var_18]                            ; +0x1d4, 0xca1b88\nLDP             X23, X24, [SP,#0x80+var_50]                            ; +0x1d8, 0xca1b8c\nLDP             X25, X26, [SP,#0x80+var_40]                            ; +0x1dc, 0xca1b90\nLDR             X27, [SP,#0x80+var_30]                                 ; +0x1e0, 0xca1b94\nLDP             X29, X30, [SP+0x80+var_80],#0x80                       ; +0x1e4, 0xca1b98\nRET                                                                    ; +0x1e8, 0xca1b9c\nLDRB            W0, [X19,#0x190]                                       ; +0x1ec, 0xca1ba0\nCBNZ            W0, loc_CA1B7C                                         ; +0x1f0, 0xca1ba4\nLDR             W22, [X19,#0x180]                                      ; +0x1f4, 0xca1ba8\nLDR             W0, [X19,#0x184]                                       ; +0x1f8, 0xca1bac\nCMP             W22, W0                                                ; +0x1fc, 0xca1bb0\nB.GT            loc_CA1BF8                                             ; +0x200, 0xca1bb4\nLDR             W2, [X19,#0x18C]                                       ; +0x204, 0xca1bb8\nLDR             W20, [X19,#0x188]                                      ; +0x208, 0xca1bbc\nLSL             W21, W22, #0x10                                        ; +0x20c, 0xca1bc0\nCMP             W20, W2                                                ; +0x210, 0xca1bc4\nB.GT            loc_CA1BEC                                             ; +0x214, 0xca1bc8\nORR             W1, W20, W21; unsigned int                             ; +0x218, 0xca1bcc\nMOV             X0, X19; this                                          ; +0x21c, 0xca1bd0\nADD             W20, W20, #1                                           ; +0x220, 0xca1bd4\nBL              _ZN16DeathMarkerLayer14unmountSectionEj; DeathMarkerLayer::unmountSection(uint) ; +0x224, 0xca1bd8\nLDR             W2, [X19,#0x18C]                                       ; +0x228, 0xca1bdc\nCMP             W2, W20                                                ; +0x22c, 0xca1be0\nB.GE            loc_CA1BCC                                             ; +0x230, 0xca1be4\nLDR             W0, [X19,#0x184]                                       ; +0x234, 0xca1be8\nADD             W22, W22, #1                                           ; +0x238, 0xca1bec\nCMP             W0, W22                                                ; +0x23c, 0xca1bf0\nB.GE            loc_CA1BBC                                             ; +0x240, 0xca1bf4\nLDR             X20, [X19,#0x168]                                      ; +0x244, 0xca1bf8\nCBZ             X20, loc_CA1C14                                        ; +0x248, 0xca1bfc\nLDR             W1, [X20,#0x10]; unsigned int                          ; +0x24c, 0xca1c00\nMOV             X0, X19; this                                          ; +0x250, 0xca1c04\nBL              _ZN16DeathMarkerLayer12mountSectionEj; DeathMarkerLayer::mountSection(uint) ; +0x254, 0xca1c08\nLDR             X20, [X20]                                             ; +0x258, 0xca1c0c\nCBNZ            X20, loc_CA1C00                                        ; +0x25c, 0xca1c10\nMOV             W0, #0xFFFFFFFF                                        ; +0x260, 0xca1c14\nMOV             W1, #1                                                 ; +0x264, 0xca1c18\nSTR             WZR, [X19,#0x180]                                      ; +0x268, 0xca1c1c\nSTRB            W1, [X19,#0x190]                                       ; +0x26c, 0xca1c20\nSTR             W0, [X19,#0x184]                                       ; +0x270, 0xca1c24\nSTR             WZR, [X19,#0x188]                                      ; +0x274, 0xca1c28\nSTR             W0, [X19,#0x18C]                                       ; +0x278, 0xca1c2c\nB               loc_CA1B7C                                             ; +0x27c, 0xca1c30\nLDR             X25, [X19,#0x168]                                      ; +0x280, 0xca1c34\nCBZ             X25, loc_CA1C50                                        ; +0x284, 0xca1c38\nLDR             W1, [X25,#0x10]; unsigned int                          ; +0x288, 0xca1c3c\nMOV             X0, X19; this                                          ; +0x28c, 0xca1c40\nBL              _ZN16DeathMarkerLayer14unmountSectionEj; DeathMarkerLayer::unmountSection(uint) ; +0x290, 0xca1c44\nLDR             X25, [X25]                                             ; +0x294, 0xca1c48\nCBNZ            X25, loc_CA1C3C                                        ; +0x298, 0xca1c4c\nMOV             W1, #0xFFFFFFFF                                        ; +0x29c, 0xca1c50\nSTRB            WZR, [X19,#0x190]                                      ; +0x2a0, 0xca1c54\nSTR             WZR, [X19,#0x180]                                      ; +0x2a4, 0xca1c58\nMOV             W0, W1                                                 ; +0x2a8, 0xca1c5c\nSTR             W1, [X19,#0x184]                                       ; +0x2ac, 0xca1c60\nMOV             W27, #0                                                ; +0x2b0, 0xca1c64\nSTR             WZR, [X19,#0x188]                                      ; +0x2b4, 0xca1c68\nSTR             W1, [X19,#0x18C]                                       ; +0x2b8, 0xca1c6c\nB               loc_CA1A38                                             ; +0x2bc, 0xca1c70\nCMP             W24, W0                                                ; +0x2c0, 0xca1c74\nB.NE            loc_CA1A7C                                             ; +0x2c4, 0xca1c78\nLDR             W1, [X19,#0x188]                                       ; +0x2c8, 0xca1c7c\nCMP             W1, W23                                                ; +0x2cc, 0xca1c80\nB.NE            loc_CA1A7C                                             ; +0x2d0, 0xca1c84\nLDR             W2, [X19,#0x18C]                                       ; +0x2d4, 0xca1c88\nCMP             W2, W22                                                ; +0x2d8, 0xca1c8c\nB.NE            loc_CA1A7C                                             ; +0x2dc, 0xca1c90\nB               loc_CA1B7C                                             ; +0x2e0, 0xca1c94", "xrefs": ["LevelEditorLayer::postUpdate @ 0x79b028", "LevelEditorLayer::postUpdate @ 0x79b038", "LevelEditorLayer::updateEditor @ 0x7a8f4c", "LevelEditorLayer::updateEditor @ 0x7a8f5c", "PlayLayer::dtUpdateLiveMarkers @ 0xc36804", "PlayLayer::dtUpdateLiveMarkers @ 0xc36814", "DeathMarkerLayer::init @ 0xca3f68", "<???> @ 0x54280"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}