{"type": "func", "start": 9973996, "end": 9974272, "name": "CustomizeObjectLayer::determineStartValues", "pseudocode": "// \n// CustomizeObjectLayer::determineStartValues from 0x9830ec to 0x983200 (276 bytes)\n// \n// 2 xrefs:\n// > CustomizeObjectLayer::init @ 0x9852dc\n// > <???> @ 0xf7288\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 12:57:52 +0000\n// \n\n__int64 __fastcall CustomizeObjectLayer::determineStartValues(CustomizeObjectLayer *this)\n{\n  GameObject *v2; // x0\n  bool v3; // zf\n  GameObject *v4; // x0\n  char v5; // w2\n  __int64 RelativeSpriteColor; // x0\n  __int64 v7; // x1\n  __int64 result; // x0\n  unsigned int v9; // w20\n  GameObject *v10; // x0\n  GameObject *v11; // x21\n  cocos2d::CCArray *v12; // x0\n  __int64 v13; // x0\n  int v14; // w1\n\n  v2 = *((GameObject **)this + 86);\n  if ( v2 )\n  {\n    v3 = GameObject::getRelativeSpriteColor(v2, 1) == 0;\n    v4 = *((GameObject **)this + 86);\n    v5 = !v3;\n    *((_BYTE *)this + 752) = v5;\n    RelativeSpriteColor = GameObject::getRelativeSpriteColor(v4, 2);\n    v7 = *((_QWORD *)this + 86);\n    *((_BYTE *)this + 753) = RelativeSpriteColor != 0;\n    result = *(unsigned __int8 *)(v7 + 1020);\n    *((_BYTE *)this + 754) = result;\n  }\n  else\n  {\n    v9 = 0;\n    *((_BYTE *)this + 754) = 1;\nLABEL_8:\n    result = cocos2d::CCArray::count(*((cocos2d::CCArray **)this + 87));\n    if ( v9 < (unsigned int)result )\n    {\n      v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 87), v9);\n      v11 = v10;\n      if ( *((_BYTE *)this + 752) )\n      {\nLABEL_10:\n        if ( *((_BYTE *)this + 753) )\n          goto LABEL_12;\n      }\n      else\n      {\n        while ( 1 )\n        {\n          v13 = GameObject::getRelativeSpriteColor(v10, 1);\n          v14 = *((unsigned __int8 *)this + 753);\n          *((_BYTE *)this + 752) = v13 != 0;\n          if ( !v14 )\n            break;\nLABEL_12:\n          ++v9;\n          if ( *((_BYTE *)v11 + 1020) )\n            goto LABEL_8;\n          v12 = *((cocos2d::CCArray **)this + 87);\n          *((_BYTE *)this + 754) = 0;\n          result = cocos2d::CCArray::count(v12);\n          if ( v9 >= (unsigned int)result )\n            return result;\n          v10 = (GameObject *)cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 87), v9);\n          v11 = v10;\n          if ( *((_BYTE *)this + 752) )\n            goto LABEL_10;\n        }\n      }\n      *((_BYTE *)this + 753) = GameObject::getRelativeSpriteColor(v11, 2) != 0;\n      goto LABEL_12;\n    }\n  }\n  return result;\n}", "assembly": "; \n; CustomizeObjectLayer::determineStartValues from 0x9830ec to 0x983200 (276 bytes)\n; \n; 2 xrefs:\n; > CustomizeObjectLayer::init @ 0x9852dc\n; > <???> @ 0xf7288\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 12:57:52 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x9830ec\nMOV             X29, SP                                                ; +0x4, 0x9830f0\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x9830f4\nSTR             X21, [SP,#0x30+var_10]                                 ; +0xc, 0x9830f8\nMOV             X19, X0                                                ; +0x10, 0x9830fc\nLDR             X0, [X0,#0x2B0]; this                                  ; +0x14, 0x983100\nCBZ             X0, loc_983150                                         ; +0x18, 0x983104\nMOV             W1, #1; int                                            ; +0x1c, 0x983108\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x20, 0x98310c\nCMP             X0, XZR                                                ; +0x24, 0x983110\nLDR             X0, [X19,#0x2B0]; this                                 ; +0x28, 0x983114\nCSET            W2, NE                                                 ; +0x2c, 0x983118\nMOV             W1, #2; int                                            ; +0x30, 0x98311c\nSTRB            W2, [X19,#0x2F0]                                       ; +0x34, 0x983120\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0x38, 0x983124\nCMP             X0, XZR                                                ; +0x3c, 0x983128\nLDR             X1, [X19,#0x2B0]                                       ; +0x40, 0x98312c\nCSET            W0, NE                                                 ; +0x44, 0x983130\nSTRB            W0, [X19,#0x2F1]                                       ; +0x48, 0x983134\nLDRB            W0, [X1,#0x3FC]                                        ; +0x4c, 0x983138\nSTRB            W0, [X19,#0x2F2]                                       ; +0x50, 0x98313c\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x54, 0x983140\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x58, 0x983144\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x5c, 0x983148\nRET                                                                    ; +0x60, 0x98314c\nMOV             W0, #1                                                 ; +0x64, 0x983150\nMOV             W20, #0                                                ; +0x68, 0x983154\nSTRB            W0, [X19,#0x2F2]                                       ; +0x6c, 0x983158\nLDR             X0, [X19,#0x2B8]; this                                 ; +0x70, 0x98315c\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x74, 0x983160\nCMP             W20, W0                                                ; +0x78, 0x983164\nMOV             W1, W20; unsigned int                                  ; +0x7c, 0x983168\nB.CS            loc_983140                                             ; +0x80, 0x98316c\nLDR             X0, [X19,#0x2B8]; this                                 ; +0x84, 0x983170\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0x88, 0x983174\nMOV             X21, X0                                                ; +0x8c, 0x983178\nLDRB            W2, [X19,#0x2F0]                                       ; +0x90, 0x98317c\nMOV             W1, #1                                                 ; +0x94, 0x983180\nCBZ             W2, loc_9831E4                                         ; +0x98, 0x983184\nLDRB            W0, [X19,#0x2F1]                                       ; +0x9c, 0x983188\nCBNZ            W0, loc_9831A8                                         ; +0xa0, 0x98318c\nMOV             X0, X21; this                                          ; +0xa4, 0x983190\nMOV             W1, #2; int                                            ; +0xa8, 0x983194\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0xac, 0x983198\nCMP             X0, XZR                                                ; +0xb0, 0x98319c\nCSET            W0, NE                                                 ; +0xb4, 0x9831a0\nSTRB            W0, [X19,#0x2F1]                                       ; +0xb8, 0x9831a4\nLDRB            W0, [X21,#0x3FC]                                       ; +0xbc, 0x9831a8\nADD             W20, W20, #1                                           ; +0xc0, 0x9831ac\nCBNZ            W0, loc_98315C                                         ; +0xc4, 0x9831b0\nLDR             X0, [X19,#0x2B8]; this                                 ; +0xc8, 0x9831b4\nSTRB            WZR, [X19,#0x2F2]                                      ; +0xcc, 0x9831b8\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xd0, 0x9831bc\nCMP             W20, W0                                                ; +0xd4, 0x9831c0\nMOV             W1, W20; unsigned int                                  ; +0xd8, 0x9831c4\nB.CS            loc_983140                                             ; +0xdc, 0x9831c8\nLDR             X0, [X19,#0x2B8]; this                                 ; +0xe0, 0x9831cc\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xe4, 0x9831d0\nMOV             X21, X0                                                ; +0xe8, 0x9831d4\nLDRB            W2, [X19,#0x2F0]                                       ; +0xec, 0x9831d8\nMOV             W1, #1; int                                            ; +0xf0, 0x9831dc\nCBNZ            W2, loc_983188                                         ; +0xf4, 0x9831e0\nBL              _ZN10GameObject22getRelativeSpriteColorEi; GameObject::getRelativeSpriteColor(int) ; +0xf8, 0x9831e4\nCMP             X0, XZR                                                ; +0xfc, 0x9831e8\nLDRB            W1, [X19,#0x2F1]                                       ; +0x100, 0x9831ec\nCSET            W0, NE                                                 ; +0x104, 0x9831f0\nSTRB            W0, [X19,#0x2F0]                                       ; +0x108, 0x9831f4\nCBNZ            W1, loc_9831A8                                         ; +0x10c, 0x9831f8\nB               loc_983190                                             ; +0x110, 0x9831fc", "xrefs": ["CustomizeObjectLayer::init @ 0x9852dc", "<???> @ 0xf7288"], "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"}