{"type": "func", "start": 4294996792, "end": 4294996932, "name": "GJSmartTemplate::getPrefabWithID", "pseudocode": "// \n// GJSmartTemplate::getPrefabWithID from 0x100007338 to 0x1000073c4 (140 bytes)\n// \n// 3 xrefs:\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1000737e8\n// > BrowseSmartKeyLayer::updateChanceValues @ 0x100073a3c\n// > EditorUI::createPrefab @ 0x1003f24ac\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\n__int64 __fastcall GJSmartTemplate::getPrefabWithID(__int64 a1, __int64 a2, int a3)\n{\n  __int64 result; // x0\n  __int64 v5; // x20\n  __int64 v6; // x21\n\n  if ( a3 < 1 )\n    return 0;\n  result = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 56), a2);\n  if ( result )\n  {\n    v5 = result;\n    if ( (unsigned int)sub_10024A36C(result) && (unsigned int)sub_10024A36C(v5) )\n    {\n      v6 = 0;\n      while ( 1 )\n      {\n        result = sub_10024A388(v5, v6);\n        if ( *(_DWORD *)(result + 104) == a3 )\n          break;\n        v6 = (unsigned int)(v6 + 1);\n        if ( (unsigned int)v6 >= (unsigned int)sub_10024A36C(v5) )\n          return 0;\n      }\n    }\n    else\n    {\n      return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::getPrefabWithID from 0x100007338 to 0x1000073c4 (140 bytes)\n; \n; 3 xrefs:\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1000737e8\n; > BrowseSmartKeyLayer::updateChanceValues @ 0x100073a3c\n; > EditorUI::createPrefab @ 0x1003f24ac\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\nCMP             W2, #1                                                 ; +0x0, 0x100007338\nB.LT            loc_1000073BC                                          ; +0x4, 0x10000733c\nSTP             X22, X21, [SP,#var_30]!                                ; +0x8, 0x100007340\nSTP             X20, X19, [SP,#0x30+var_20]                            ; +0xc, 0x100007344\nSTP             X29, X30, [SP,#0x30+var_10]                            ; +0x10, 0x100007348\nADD             X29, SP, #0x30+var_10                                  ; +0x14, 0x10000734c\nMOV             X19, X2                                                ; +0x18, 0x100007350\nLDR             X0, [X0,#0x38]                                         ; +0x1c, 0x100007354\nBL              cocos2d__CCDictionary__objectForKey_1                  ; +0x20, 0x100007358\nCBZ             X0, loc_1000073AC                                      ; +0x24, 0x10000735c\nMOV             X20, X0                                                ; +0x28, 0x100007360\nBL              sub_10024A36C                                          ; +0x2c, 0x100007364\nCBZ             W0, loc_1000073A8                                      ; +0x30, 0x100007368\nMOV             X0, X20                                                ; +0x34, 0x10000736c\nBL              sub_10024A36C                                          ; +0x38, 0x100007370\nCBZ             W0, loc_1000073A8                                      ; +0x3c, 0x100007374\nMOV             W21, #0                                                ; +0x40, 0x100007378\nMOV             X0, X20                                                ; +0x44, 0x10000737c\nMOV             X1, X21                                                ; +0x48, 0x100007380\nBL              sub_10024A388                                          ; +0x4c, 0x100007384\nLDR             W8, [X0,#0x68]                                         ; +0x50, 0x100007388\nCMP             W8, W19                                                ; +0x54, 0x10000738c\nB.EQ            loc_1000073AC                                          ; +0x58, 0x100007390\nADD             W21, W21, #1                                           ; +0x5c, 0x100007394\nMOV             X0, X20                                                ; +0x60, 0x100007398\nBL              sub_10024A36C                                          ; +0x64, 0x10000739c\nCMP             W21, W0                                                ; +0x68, 0x1000073a0\nB.CC            loc_10000737C                                          ; +0x6c, 0x1000073a4\nMOV             X0, #0                                                 ; +0x70, 0x1000073a8\nLDP             X29, X30, [SP,#0x30+var_10]                            ; +0x74, 0x1000073ac\nLDP             X20, X19, [SP,#0x30+var_20]                            ; +0x78, 0x1000073b0\nLDP             X22, X21, [SP+0x30+var_30],#0x30                       ; +0x7c, 0x1000073b4\nRET                                                                    ; +0x80, 0x1000073b8\nMOV             X0, #0                                                 ; +0x84, 0x1000073bc\nRET                                                                    ; +0x88, 0x1000073c0", "xrefs": ["BrowseSmartKeyLayer::addChanceToSelected @ 0x1000737e8", "BrowseSmartKeyLayer::updateChanceValues @ 0x100073a3c", "EditorUI::createPrefab @ 0x1003f24ac"], "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"}