{"type": "func", "start": 4295440204, "end": 4295440476, "name": "BrowseSmartKeyLayer::addChanceToSelected", "pseudocode": "// \n// BrowseSmartKeyLayer::addChanceToSelected from 0x10007374c to 0x10007385c (272 bytes)\n// \n// 1 xrefs:\n// > BrowseSmartKeyLayer::onButton @ 0x100073448\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 BrowseSmartKeyLayer::addChanceToSelected(BrowseSmartKeyLayer *a1, int a2, bool a3)\n{\n  cocos2d::CCArray *AllSelectedBlocks; // x22\n  __int64 v7; // x23\n  __int64 v8; // x25\n  GJSmartTemplate *m_template; // x24\n  int v10; // w0\n  __int64 PrefabWithID; // x0\n  __int64 v12; // x24\n  int v13; // w8\n  void *__p[2]; // [xsp+0h] [xbp-60h] BYREF\n  char *longStorage; // [xsp+10h] [xbp-50h]\n\n  AllSelectedBlocks = BrowseSmartKeyLayer::getAllSelectedBlocks(a1);\n  if ( (unsigned int)sub_10024A36C(AllSelectedBlocks) )\n  {\n    v7 = 0;\n    do\n    {\n      v8 = sub_10024A388(AllSelectedBlocks, v7);\n      m_template = a1->m_template;\n      if ( a1->m_prefabKey.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      {\n        sub_1000097D0(__p, (void *)a1->m_prefabKey.m_data.m_long.capacitym1, a1->m_prefabKey.m_data.m_long.size);\n      }\n      else\n      {\n        *(_OWORD *)__p = *(_OWORD *)&a1->m_prefabKey.m_data.m_short.sizex2;\n        longStorage = a1->m_prefabKey.m_data.m_long.longStorage;\n      }\n      v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 64LL))(v8);\n      PrefabWithID = GJSmartTemplate::getPrefabWithID((__int64)m_template, (__int64)__p, v10);\n      v12 = PrefabWithID;\n      if ( SHIBYTE(longStorage) < 0 )\n      {\n        operator delete(__p[0]);\n        if ( v12 )\n        {\nLABEL_10:\n          if ( a3 )\n            v13 = 0;\n          else\n            v13 = *(_DWORD *)(v12 + 108) + a2;\n          *(_DWORD *)(v12 + 108) = v13;\n        }\n      }\n      else if ( PrefabWithID )\n      {\n        goto LABEL_10;\n      }\n      v7 = (unsigned int)(v7 + 1);\n    }\n    while ( (unsigned int)v7 < (unsigned int)sub_10024A36C(AllSelectedBlocks) );\n  }\n  BrowseSmartKeyLayer::updateChanceValues(a1);\n}", "assembly": "; \n; BrowseSmartKeyLayer::addChanceToSelected from 0x10007374c to 0x10007385c (272 bytes)\n; \n; 1 xrefs:\n; > BrowseSmartKeyLayer::onButton @ 0x100073448\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\nSUB             SP, SP, #0x70                                          ; +0x0, 0x10007374c\nSTP             X26, X25, [SP,#0x60+var_40]                            ; +0x4, 0x100073750\nSTP             X24, X23, [SP,#0x60+var_30]                            ; +0x8, 0x100073754\nSTP             X22, X21, [SP,#0x60+var_20]                            ; +0xc, 0x100073758\nSTP             X20, X19, [SP,#0x60+var_10]                            ; +0x10, 0x10007375c\nSTP             X29, X30, [SP,#0x60+var_s0]                            ; +0x14, 0x100073760\nADD             X29, SP, #0x60                                         ; +0x18, 0x100073764\nMOV             X20, X2                                                ; +0x1c, 0x100073768\nMOV             X21, X1                                                ; +0x20, 0x10007376c\nMOV             X19, X0                                                ; +0x24, 0x100073770\nBL              BrowseSmartKeyLayer__getAllSelectedBlocks              ; +0x28, 0x100073774\nMOV             X22, X0                                                ; +0x2c, 0x100073778\nBL              sub_10024A36C                                          ; +0x30, 0x10007377c\nCBZ             W0, loc_100073838                                      ; +0x34, 0x100073780\nMOV             W23, #0                                                ; +0x38, 0x100073784\nADD             X26, X19, #0x2A8                                       ; +0x3c, 0x100073788\nMOV             X0, X22                                                ; +0x40, 0x10007378c\nMOV             X1, X23                                                ; +0x44, 0x100073790\nBL              sub_10024A388                                          ; +0x48, 0x100073794\nMOV             X25, X0                                                ; +0x4c, 0x100073798\nLDR             X24, [X19,#0x278]                                      ; +0x50, 0x10007379c\nLDRSB           W8, [X19,#0x2BF]                                       ; +0x54, 0x1000737a0\nTBNZ            W8, #0x1F, loc_1000737BC                               ; +0x58, 0x1000737a4\nLDR             Q0, [X26]                                              ; +0x5c, 0x1000737a8\nSTR             Q0, [SP,#0x60+__p]                                     ; +0x60, 0x1000737ac\nLDR             X8, [X26,#0x10]                                        ; +0x64, 0x1000737b0\nSTR             X8, [SP,#0x60+var_50]                                  ; +0x68, 0x1000737b4\nB               loc_1000737CC                                          ; +0x6c, 0x1000737b8\nLDR             X1, [X19,#0x2A8]; __src                                ; +0x70, 0x1000737bc\nLDR             X2, [X19,#0x2B0]                                       ; +0x74, 0x1000737c0\nMOV             X0, SP; __dst                                          ; +0x78, 0x1000737c4\nBL              sub_1000097D0                                          ; +0x7c, 0x1000737c8\nLDR             X8, [X25]                                              ; +0x80, 0x1000737cc\nLDR             X8, [X8,#0x40]                                         ; +0x84, 0x1000737d0\nMOV             X0, X25                                                ; +0x88, 0x1000737d4\nBLR             X8                                                     ; +0x8c, 0x1000737d8\nMOV             X2, X0                                                 ; +0x90, 0x1000737dc\nMOV             X1, SP                                                 ; +0x94, 0x1000737e0\nMOV             X0, X24                                                ; +0x98, 0x1000737e4\nBL              GJSmartTemplate__getPrefabWithID                       ; +0x9c, 0x1000737e8\nMOV             X24, X0                                                ; +0xa0, 0x1000737ec\nLDRSB           W8, [SP,#0x60+var_50+7]                                ; +0xa4, 0x1000737f0\nTBNZ            W8, #0x1F, loc_100073800                               ; +0xa8, 0x1000737f4\nCBNZ            X24, loc_10007380C                                     ; +0xac, 0x1000737f8\nB               loc_100073824                                          ; +0xb0, 0x1000737fc\nLDR             X0, [SP,#0x60+__p]; __p                                ; +0xb4, 0x100073800\nBL              __ZdlPv; operator delete(void *)                       ; +0xb8, 0x100073804\nCBZ             X24, loc_100073824                                     ; +0xbc, 0x100073808\nTBZ             W20, #0, loc_100073818                                 ; +0xc0, 0x10007380c\nMOV             W8, #0                                                 ; +0xc4, 0x100073810\nB               loc_100073820                                          ; +0xc8, 0x100073814\nLDR             W8, [X24,#0x6C]                                        ; +0xcc, 0x100073818\nADD             W8, W8, W21                                            ; +0xd0, 0x10007381c\nSTR             W8, [X24,#0x6C]                                        ; +0xd4, 0x100073820\nADD             W23, W23, #1                                           ; +0xd8, 0x100073824\nMOV             X0, X22                                                ; +0xdc, 0x100073828\nBL              sub_10024A36C                                          ; +0xe0, 0x10007382c\nCMP             W23, W0                                                ; +0xe4, 0x100073830\nB.CC            loc_10007378C                                          ; +0xe8, 0x100073834\nMOV             X0, X19                                                ; +0xec, 0x100073838\nBL              BrowseSmartKeyLayer__updateChanceValues                ; +0xf0, 0x10007383c\nLDP             X29, X30, [SP,#0x60+var_s0]                            ; +0xf4, 0x100073840\nLDP             X20, X19, [SP,#0x60+var_10]                            ; +0xf8, 0x100073844\nLDP             X22, X21, [SP,#0x60+var_20]                            ; +0xfc, 0x100073848\nLDP             X24, X23, [SP,#0x60+var_30]                            ; +0x100, 0x10007384c\nLDP             X26, X25, [SP,#0x60+var_40]                            ; +0x104, 0x100073850\nADD             SP, SP, #0x70 ; 'p'                                    ; +0x108, 0x100073854\nRET                                                                    ; +0x10c, 0x100073858", "xrefs": ["BrowseSmartKeyLayer::onButton @ 0x100073448"], "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"}