{"type": "func", "start": 4299239264, "end": 4299239376, "name": "GJSmartTemplate::getPrefabWithID", "pseudocode": "// \n// GJSmartTemplate::getPrefabWithID from 0x100412f60 to 0x100412fd0 (112 bytes)\n// \n// 4 xrefs:\n// > EditorUI::createPrefab @ 0x100014bfa\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e672a\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e67da\n// > BrowseSmartKeyLayer::updateChanceValues @ 0x1004e6a79\n// \n// This function is hookable on this platform (idp: pc, 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:30:10 +0000\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(*(_QWORD *)(a1 + 56), a2);\n  if ( !v4 )\n    return 0;\n  v5 = v4;\n  if ( !(unsigned int)sub_1007FEF90(v4) )\n    return 0;\n  v6 = sub_1007FEF90(v5);\n  result = 0;\n  if ( v6 )\n  {\n    v8 = 0;\n    while ( 1 )\n    {\n      result = sub_1007FEFE0(v5, v8);\n      if ( *(_DWORD *)(result + 104) == a3 )\n        break;\n      if ( ++v8 >= (unsigned int)sub_1007FEF90(v5) )\n        return 0;\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJSmartTemplate::getPrefabWithID from 0x100412f60 to 0x100412fd0 (112 bytes)\n; \n; 4 xrefs:\n; > EditorUI::createPrefab @ 0x100014bfa\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e672a\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e67da\n; > BrowseSmartKeyLayer::updateChanceValues @ 0x1004e6a79\n; \n; This function is hookable on this platform (idp: pc, 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:30:10 +0000\n; \ntest    edx, edx                                                       ; +0x0, 0x100412f60\njle     short loc_100412FCD                                            ; +0x2, 0x100412f62\npush    rbp                                                            ; +0x4, 0x100412f64\nmov     rbp, rsp                                                       ; +0x5, 0x100412f65\npush    r15                                                            ; +0x8, 0x100412f68\npush    r14                                                            ; +0xa, 0x100412f6a\npush    rbx                                                            ; +0xc, 0x100412f6c\npush    rax                                                            ; +0xd, 0x100412f6d\nmov     ebx, edx                                                       ; +0xe, 0x100412f6e\nmov     rdi, [rdi+38h]                                                 ; +0x10, 0x100412f70\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x14, 0x100412f74\ntest    rax, rax                                                       ; +0x19, 0x100412f79\njz      short loc_100412FC0                                            ; +0x1c, 0x100412f7c\nmov     r14, rax                                                       ; +0x1e, 0x100412f7e\nmov     rdi, rax                                                       ; +0x21, 0x100412f81\ncall    sub_1007FEF90                                                  ; +0x24, 0x100412f84\ntest    eax, eax                                                       ; +0x29, 0x100412f89\njz      short loc_100412FC0                                            ; +0x2b, 0x100412f8b\nmov     rdi, r14                                                       ; +0x2d, 0x100412f8d\ncall    sub_1007FEF90                                                  ; +0x30, 0x100412f90\nmov     ecx, eax                                                       ; +0x35, 0x100412f95\nxor     eax, eax                                                       ; +0x37, 0x100412f97\ntest    ecx, ecx                                                       ; +0x39, 0x100412f99\njz      short loc_100412FC2                                            ; +0x3b, 0x100412f9b\nxor     r15d, r15d                                                     ; +0x3d, 0x100412f9d\nmov     rdi, r14                                                       ; +0x40, 0x100412fa0\nmov     esi, r15d                                                      ; +0x43, 0x100412fa3\ncall    sub_1007FEFE0                                                  ; +0x46, 0x100412fa6\ncmp     [rax+68h], ebx                                                 ; +0x4b, 0x100412fab\njz      short loc_100412FC2                                            ; +0x4e, 0x100412fae\ninc     r15d                                                           ; +0x50, 0x100412fb0\nmov     rdi, r14                                                       ; +0x53, 0x100412fb3\ncall    sub_1007FEF90                                                  ; +0x56, 0x100412fb6\ncmp     r15d, eax                                                      ; +0x5b, 0x100412fbb\njb      short loc_100412FA0                                            ; +0x5e, 0x100412fbe\nxor     eax, eax                                                       ; +0x60, 0x100412fc0\nadd     rsp, 8                                                         ; +0x62, 0x100412fc2\npop     rbx                                                            ; +0x66, 0x100412fc6\npop     r14                                                            ; +0x67, 0x100412fc7\npop     r15                                                            ; +0x69, 0x100412fc9\npop     rbp                                                            ; +0x6b, 0x100412fcb\nretn                                                                   ; +0x6c, 0x100412fcc\nxor     eax, eax                                                       ; +0x6d, 0x100412fcd\nretn                                                                   ; +0x6f, 0x100412fcf", "xrefs": ["EditorUI::createPrefab @ 0x100014bfa", "BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e672a", "BrowseSmartKeyLayer::addChanceToSelected @ 0x1004e67da", "BrowseSmartKeyLayer::updateChanceValues @ 0x1004e6a79"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}