{"type": "func", "start": 4299318000, "end": 4299318112, "name": "GJSmartTemplate::getPrefabWithID", "pseudocode": "// \n// GJSmartTemplate::getPrefabWithID from 0x1004262f0 to 0x100426360 (112 bytes)\n// \n// 4 xrefs:\n// > EditorUI::createPrefab @ 0x100043c67\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebb9a\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebc4a\n// > BrowseSmartKeyLayer::updateChanceValues @ 0x1004ebee9\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, char *a2, int a3)\n{\n  __int64 v4; // rax\n  __int64 v5; // r14\n  int v6; // ecx\n  __int64 result; // rax\n  unsigned int v8; // r15d\n\n  if ( a3 <= 0 )\n    return 0;\n  v4 = cocos2d::CCDictionary::objectForKey_1(*(_QWORD *)(a1 + 56), a2);\n  if ( !v4 )\n    return 0;\n  v5 = v4;\n  if ( !(unsigned int)sub_100720070(v4) )\n    return 0;\n  v6 = sub_100720070(v5);\n  result = 0;\n  if ( v6 )\n  {\n    v8 = 0;\n    while ( 1 )\n    {\n      result = sub_1007200C0(v5, v8);\n      if ( *(_DWORD *)(result + 104) == a3 )\n        break;\n      if ( ++v8 >= (unsigned int)sub_100720070(v5) )\n        return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::getPrefabWithID from 0x1004262f0 to 0x100426360 (112 bytes)\n; \n; 4 xrefs:\n; > EditorUI::createPrefab @ 0x100043c67\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebb9a\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebc4a\n; > BrowseSmartKeyLayer::updateChanceValues @ 0x1004ebee9\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\ntest    edx, edx                                                       ; +0x0, 0x1004262f0\njle     short loc_10042635D                                            ; +0x2, 0x1004262f2\npush    rbp                                                            ; +0x4, 0x1004262f4\nmov     rbp, rsp                                                       ; +0x5, 0x1004262f5\npush    r15                                                            ; +0x8, 0x1004262f8\npush    r14                                                            ; +0xa, 0x1004262fa\npush    rbx                                                            ; +0xc, 0x1004262fc\npush    rax                                                            ; +0xd, 0x1004262fd\nmov     ebx, edx                                                       ; +0xe, 0x1004262fe\nmov     rdi, [rdi+38h]                                                 ; +0x10, 0x100426300\ncall    cocos2d__CCDictionary__objectForKey_1                          ; +0x14, 0x100426304\ntest    rax, rax                                                       ; +0x19, 0x100426309\njz      short loc_100426350                                            ; +0x1c, 0x10042630c\nmov     r14, rax                                                       ; +0x1e, 0x10042630e\nmov     rdi, rax                                                       ; +0x21, 0x100426311\ncall    sub_100720070                                                  ; +0x24, 0x100426314\ntest    eax, eax                                                       ; +0x29, 0x100426319\njz      short loc_100426350                                            ; +0x2b, 0x10042631b\nmov     rdi, r14                                                       ; +0x2d, 0x10042631d\ncall    sub_100720070                                                  ; +0x30, 0x100426320\nmov     ecx, eax                                                       ; +0x35, 0x100426325\nxor     eax, eax                                                       ; +0x37, 0x100426327\ntest    ecx, ecx                                                       ; +0x39, 0x100426329\njz      short loc_100426352                                            ; +0x3b, 0x10042632b\nxor     r15d, r15d                                                     ; +0x3d, 0x10042632d\nmov     rdi, r14                                                       ; +0x40, 0x100426330\nmov     esi, r15d                                                      ; +0x43, 0x100426333\ncall    sub_1007200C0                                                  ; +0x46, 0x100426336\ncmp     [rax+68h], ebx                                                 ; +0x4b, 0x10042633b\njz      short loc_100426352                                            ; +0x4e, 0x10042633e\ninc     r15d                                                           ; +0x50, 0x100426340\nmov     rdi, r14                                                       ; +0x53, 0x100426343\ncall    sub_100720070                                                  ; +0x56, 0x100426346\ncmp     r15d, eax                                                      ; +0x5b, 0x10042634b\njb      short loc_100426330                                            ; +0x5e, 0x10042634e\nxor     eax, eax                                                       ; +0x60, 0x100426350\nadd     rsp, 8                                                         ; +0x62, 0x100426352\npop     rbx                                                            ; +0x66, 0x100426356\npop     r14                                                            ; +0x67, 0x100426357\npop     r15                                                            ; +0x69, 0x100426359\npop     rbp                                                            ; +0x6b, 0x10042635b\nretn                                                                   ; +0x6c, 0x10042635c\nxor     eax, eax                                                       ; +0x6d, 0x10042635d\nretn                                                                   ; +0x6f, 0x10042635f", "xrefs": ["EditorUI::createPrefab @ 0x100043c67", "BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebb9a", "BrowseSmartKeyLayer::addChanceToSelected @ 0x1004ebc4a", "BrowseSmartKeyLayer::updateChanceValues @ 0x1004ebee9"], "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"}