{"type": "func", "start": 4300990640, "end": 4300990791, "name": "GameObject::addToOpacityGroup", "pseudocode": "// \n// GameObject::addToOpacityGroup from 0x1005be8b0 to 0x1005be947 (151 bytes)\n// \n// 1 xrefs:\n// > PlayLayer::optimizeOpacityGroups @ 0x1000aedee\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 __fastcall GameObject::addToOpacityGroup(GameObject *a1, int a2)\n{\n  __int64 m_opacityGroupCount; // r14\n  std::array<short, 10> *m_opacityGroups; // rax\n  __int64 v4; // rcx\n\n  m_opacityGroupCount = a1->m_opacityGroupCount;\n  if ( m_opacityGroupCount < 10 && (unsigned int)(a2 - 10000) >= 0xFFFFD8F1 )\n  {\n    m_opacityGroups = a1->m_opacityGroups;\n    if ( m_opacityGroups )\n    {\n      if ( (__int16)m_opacityGroupCount <= 0 )\n        goto LABEL_9;\n    }\n    else\n    {\n      m_opacityGroups = (std::array<short, 10> *)operator new[](0x14u);\n      a1->m_opacityGroups = m_opacityGroups;\n      *(_OWORD *)m_opacityGroups->__elems_ = 0;\n      *(_DWORD *)&m_opacityGroups->__elems_[8] = 0;\n      if ( (__int16)m_opacityGroupCount <= 0 )\n      {\nLABEL_9:\n        m_opacityGroups->__elems_[m_opacityGroupCount] = a2;\n        ++a1->m_opacityGroupCount;\n        return;\n      }\n    }\n    v4 = 0;\n    while ( m_opacityGroups->__elems_[v4] != a2 )\n    {\n      if ( m_opacityGroupCount == ++v4 )\n        goto LABEL_9;\n    }\n  }\n}", "assembly": "; \n; GameObject::addToOpacityGroup from 0x1005be8b0 to 0x1005be947 (151 bytes)\n; \n; 1 xrefs:\n; > PlayLayer::optimizeOpacityGroups @ 0x1000aedee\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    rbp                                                            ; +0x0, 0x1005be8b0\nmov     rbp, rsp                                                       ; +0x1, 0x1005be8b1\npush    r15                                                            ; +0x4, 0x1005be8b4\npush    r14                                                            ; +0x6, 0x1005be8b6\npush    rbx                                                            ; +0x8, 0x1005be8b8\npush    rax                                                            ; +0x9, 0x1005be8b9\nmov     ebx, esi                                                       ; +0xa, 0x1005be8ba\nmovsx   r14, word ptr [rdi+4B0h]                                       ; +0xc, 0x1005be8bc\ncmp     r14, 0Ah                                                       ; +0x14, 0x1005be8c4\nsetnl   al                                                             ; +0x18, 0x1005be8c8\nlea     ecx, [rbx-2710h]                                               ; +0x1b, 0x1005be8cb\ncmp     ecx, 0FFFFD8F1h                                                ; +0x21, 0x1005be8d1\nsetb    cl                                                             ; +0x27, 0x1005be8d7\nor      cl, al                                                         ; +0x2a, 0x1005be8da\njnz     short loc_1005BE93C                                            ; +0x2c, 0x1005be8dc\nmov     rax, [rdi+4A8h]                                                ; +0x2e, 0x1005be8de\ntest    rax, rax                                                       ; +0x35, 0x1005be8e5\njz      short loc_1005BE8F2                                            ; +0x38, 0x1005be8e8\ntest    r14w, r14w                                                     ; +0x3a, 0x1005be8ea\njg      short loc_1005BE91C                                            ; +0x3e, 0x1005be8ee\njmp     short loc_1005BE930                                            ; +0x40, 0x1005be8f0\nmov     r15, rdi                                                       ; +0x42, 0x1005be8f2\nmov     edi, 14h; __sz                                                 ; +0x45, 0x1005be8f5\ncall    __Znam; operator new[](ulong)                                  ; +0x4a, 0x1005be8fa\nmov     rdi, r15                                                       ; +0x4f, 0x1005be8ff\nmov     [r15+4A8h], rax                                                ; +0x52, 0x1005be902\nxorps   xmm0, xmm0                                                     ; +0x59, 0x1005be909\nmovups  xmmword ptr [rax], xmm0                                        ; +0x5c, 0x1005be90c\nmov     dword ptr [rax+10h], 0                                         ; +0x5f, 0x1005be90f\ntest    r14w, r14w                                                     ; +0x66, 0x1005be916\njle     short loc_1005BE930                                            ; +0x6a, 0x1005be91a\nxor     ecx, ecx                                                       ; +0x6c, 0x1005be91c\nxchg    ax, ax                                                         ; +0x6e, 0x1005be91e\nmovsx   edx, word ptr [rax+rcx*2]                                      ; +0x70, 0x1005be920\ncmp     edx, ebx                                                       ; +0x74, 0x1005be924\njz      short loc_1005BE93C                                            ; +0x76, 0x1005be926\ninc     rcx                                                            ; +0x78, 0x1005be928\ncmp     r14, rcx                                                       ; +0x7b, 0x1005be92b\njnz     short loc_1005BE920                                            ; +0x7e, 0x1005be92e\nmov     [rax+r14*2], bx                                                ; +0x80, 0x1005be930\ninc     word ptr [rdi+4B0h]                                            ; +0x85, 0x1005be935\nadd     rsp, 8                                                         ; +0x8c, 0x1005be93c\npop     rbx                                                            ; +0x90, 0x1005be940\npop     r14                                                            ; +0x91, 0x1005be941\npop     r15                                                            ; +0x93, 0x1005be943\npop     rbp                                                            ; +0x95, 0x1005be945\nretn                                                                   ; +0x96, 0x1005be946", "xrefs": ["PlayLayer::optimizeOpacityGroups @ 0x1000aedee"], "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"}