{"type": "func", "start": 8652416, "end": 8652692, "name": "CustomizeObjectLayer::determineStartValues", "pseudocode": "// \n// CustomizeObjectLayer::determineStartValues from 0x840680 to 0x840794 (276 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x8420fc\n// > <???> @ 0xbd978\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 CustomizeObjectLayer::determineStartValues(CustomizeObjectLayer *a1)\n{\n  GameObject *m_targetObject; // x0\n  bool v3; // zf\n  GameObject *v4; // x0\n  bool v5; // w2\n  GJSpriteColor *RelativeSpriteColor; // x0\n  GameObject *v7; // x1\n  unsigned int v8; // w20\n  GameObject *v9; // x0\n  GameObject *v10; // x21\n  cocos2d::CCArray *m_targetObjects; // x0\n  GJSpriteColor *v12; // x0\n  _BOOL4 m_hasDetailColor; // w1\n\n  m_targetObject = a1->m_targetObject;\n  if ( m_targetObject )\n  {\n    v3 = GameObject::getRelativeSpriteColor(m_targetObject, 1) == nullptr;\n    v4 = a1->m_targetObject;\n    v5 = !v3;\n    a1->m_hasBaseColor = v5;\n    RelativeSpriteColor = GameObject::getRelativeSpriteColor(v4, 2);\n    v7 = a1->m_targetObject;\n    a1->m_hasDetailColor = RelativeSpriteColor != nullptr;\n    a1->m_glowDisabled = v7->m_hasNoGlow;\n  }\n  else\n  {\n    v8 = 0;\n    a1->m_glowDisabled = 1;\nLABEL_8:\n    if ( v8 < (unsigned int)cocos2d::CCArray::count(a1->m_targetObjects) )\n    {\n      v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v8);\n      v10 = v9;\n      if ( a1->m_hasBaseColor )\n      {\nLABEL_10:\n        if ( a1->m_hasDetailColor )\n          goto LABEL_12;\n      }\n      else\n      {\n        while ( 1 )\n        {\n          v12 = GameObject::getRelativeSpriteColor(v9, 1);\n          m_hasDetailColor = a1->m_hasDetailColor;\n          a1->m_hasBaseColor = v12 != nullptr;\n          if ( !m_hasDetailColor )\n            break;\nLABEL_12:\n          ++v8;\n          if ( v10->m_hasNoGlow )\n            goto LABEL_8;\n          m_targetObjects = a1->m_targetObjects;\n          a1->m_glowDisabled = 0;\n          if ( v8 >= (unsigned int)cocos2d::CCArray::count(m_targetObjects) )\n            return;\n          v9 = (GameObject *)cocos2d::CCArray::objectAtIndex(a1->m_targetObjects, v8);\n          v10 = v9;\n          if ( a1->m_hasBaseColor )\n            goto LABEL_10;\n        }\n      }\n      a1->m_hasDetailColor = GameObject::getRelativeSpriteColor(v10, 2) != nullptr;\n      goto LABEL_12;\n    }\n  }\n}", "assembly": "; \n; CustomizeObjectLayer::determineStartValues from 0x840680 to 0x840794 (276 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x8420fc\n; > <???> @ 0xbd978\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\nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x840680\nMOV             X29, SP                                                ; +0x4, 0x840684\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x840688\nMOV             X19, X0                                                ; +0xc, 0x84068c\nLDR             X0, [X0,#0x298]; this                                  ; +0x10, 0x840690\nSTR             X21, [SP,#0x30+var_10]                                 ; +0x14, 0x840694\nCBZ             X0, loc_8406E4                                         ; +0x18, 0x840698\nMOV             W1, #1; int                                            ; +0x1c, 0x84069c\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x20, 0x8406a0\nCMP             X0, XZR                                                ; +0x24, 0x8406a4\nLDR             X0, [X19,#0x298]; this                                 ; +0x28, 0x8406a8\nCSET            W2, NE                                                 ; +0x2c, 0x8406ac\nMOV             W1, #2; int                                            ; +0x30, 0x8406b0\nSTRB            W2, [X19,#0x2D8]                                       ; +0x34, 0x8406b4\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x38, 0x8406b8\nCMP             X0, XZR                                                ; +0x3c, 0x8406bc\nLDR             X1, [X19,#0x298]                                       ; +0x40, 0x8406c0\nCSET            W0, NE                                                 ; +0x44, 0x8406c4\nSTRB            W0, [X19,#0x2D9]                                       ; +0x48, 0x8406c8\nLDRB            W0, [X1,#0x3EC]                                        ; +0x4c, 0x8406cc\nSTRB            W0, [X19,#0x2DA]                                       ; +0x50, 0x8406d0\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x54, 0x8406d4\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x58, 0x8406d8\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x5c, 0x8406dc\nRET                                                                    ; +0x60, 0x8406e0\nMOV             W0, #1                                                 ; +0x64, 0x8406e4\nMOV             W20, #0                                                ; +0x68, 0x8406e8\nSTRB            W0, [X19,#0x2DA]                                       ; +0x6c, 0x8406ec\nLDR             X0, [X19,#0x2A0]; this                                 ; +0x70, 0x8406f0\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x74, 0x8406f4\nCMP             W20, W0                                                ; +0x78, 0x8406f8\nMOV             W1, W20; unsigned int                                  ; +0x7c, 0x8406fc\nB.CS            loc_8406D4                                             ; +0x80, 0x840700\nLDR             X0, [X19,#0x2A0]; this                                 ; +0x84, 0x840704\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x88, 0x840708\nMOV             X21, X0                                                ; +0x8c, 0x84070c\nLDRB            W2, [X19,#0x2D8]                                       ; +0x90, 0x840710\nMOV             W1, #1                                                 ; +0x94, 0x840714\nCBZ             W2, loc_840778                                         ; +0x98, 0x840718\nLDRB            W0, [X19,#0x2D9]                                       ; +0x9c, 0x84071c\nCBNZ            W0, loc_84073C                                         ; +0xa0, 0x840720\nMOV             X0, X21; this                                          ; +0xa4, 0x840724\nMOV             W1, #2; int                                            ; +0xa8, 0x840728\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0xac, 0x84072c\nCMP             X0, XZR                                                ; +0xb0, 0x840730\nCSET            W0, NE                                                 ; +0xb4, 0x840734\nSTRB            W0, [X19,#0x2D9]                                       ; +0xb8, 0x840738\nLDRB            W0, [X21,#0x3EC]                                       ; +0xbc, 0x84073c\nADD             W20, W20, #1                                           ; +0xc0, 0x840740\nCBNZ            W0, loc_8406F0                                         ; +0xc4, 0x840744\nLDR             X0, [X19,#0x2A0]; this                                 ; +0xc8, 0x840748\nSTRB            WZR, [X19,#0x2DA]                                      ; +0xcc, 0x84074c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xd0, 0x840750\nCMP             W20, W0                                                ; +0xd4, 0x840754\nMOV             W1, W20; unsigned int                                  ; +0xd8, 0x840758\nB.CS            loc_8406D4                                             ; +0xdc, 0x84075c\nLDR             X0, [X19,#0x2A0]; this                                 ; +0xe0, 0x840760\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xe4, 0x840764\nMOV             X21, X0                                                ; +0xe8, 0x840768\nLDRB            W2, [X19,#0x2D8]                                       ; +0xec, 0x84076c\nMOV             W1, #1; int                                            ; +0xf0, 0x840770\nCBNZ            W2, loc_84071C                                         ; +0xf4, 0x840774\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0xf8, 0x840778\nCMP             X0, XZR                                                ; +0xfc, 0x84077c\nLDRB            W1, [X19,#0x2D9]                                       ; +0x100, 0x840780\nCSET            W0, NE                                                 ; +0x104, 0x840784\nSTRB            W0, [X19,#0x2D8]                                       ; +0x108, 0x840788\nCBNZ            W1, loc_84073C                                         ; +0x10c, 0x84078c\nB               loc_840724                                             ; +0x110, 0x840790", "xrefs": ["CustomizeObjectLayer::init @ 0x8420fc", "<???> @ 0xbd978"], "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"}