{"type": "func", "start": 5372615024, "end": 5372615210, "name": "GJSmartTemplate::getPrefabWithID", "pseudocode": "// \n// GJSmartTemplate::getPrefabWithID from 0x1403b9970 to 0x1403b9a2a (186 bytes)\n// \n// 5 xrefs:\n// > EditorUI::createPrefab @ 0x1401b766b\n// > BrowseSmartKeyLayer::onButton @ 0x1405f1a58\n// > BrowseSmartKeyLayer::addChanceToSelected @ 0x1405f1ef8\n// > BrowseSmartKeyLayer::updateChanceValues @ 0x1405f2047\n// > <???> @ 0x140923d68\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 11:31:26 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCObject *__fastcall GJSmartTemplate::getPrefabWithID(__int64 a1, __int64 a2, int a3)\n{\n  cocos2d::CCArray *v5; // rax\n  cocos2d::CCArray *v6; // rdi\n  unsigned int v7; // ebx\n  struct cocos2d::CCObject *v8; // rsi\n\n  if ( a3 > 0\n    && (v5 = (cocos2d::CCArray *)cocos2d::CCDictionary::objectForKey(*(_QWORD *)(a1 + 56), a2), (v6 = v5) != nullptr)\n    && cocos2d::CCArray::count(v5)\n    && (v7 = 0, cocos2d::CCArray::count(v6)) )\n  {\n    while ( 1 )\n    {\n      v8 = cocos2d::CCArray::objectAtIndex(v6, v7);\n      if ( *((_DWORD *)v8 + 30) == a3 )\n        break;\n      if ( ++v7 >= cocos2d::CCArray::count(v6) )\n        goto LABEL_7;\n    }\n    sub_14003D310(a2);\n    return v8;\n  }\n  else\n  {\nLABEL_7:\n    sub_14003D310(a2);\n    return nullptr;\n  }\n}", "assembly": "; \n; GJSmartTemplate::getPrefabWithID from 0x1403b9970 to 0x1403b9a2a (186 bytes)\n; \n; 5 xrefs:\n; > EditorUI::createPrefab @ 0x1401b766b\n; > BrowseSmartKeyLayer::onButton @ 0x1405f1a58\n; > BrowseSmartKeyLayer::addChanceToSelected @ 0x1405f1ef8\n; > BrowseSmartKeyLayer::updateChanceValues @ 0x1405f2047\n; > <???> @ 0x140923d68\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 11:31:26 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1403b9970\nmov     [rsp+arg_18], rbp                                              ; +0x5, 0x1403b9975\npush    rsi                                                            ; +0xa, 0x1403b997a\npush    rdi                                                            ; +0xb, 0x1403b997b\npush    r14                                                            ; +0xc, 0x1403b997c\nsub     rsp, 30h                                                       ; +0xe, 0x1403b997e\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x1403b9982\nxor     rax, rsp                                                       ; +0x19, 0x1403b9989\nmov     [rsp+48h+var_20], rax                                          ; +0x1c, 0x1403b998c\nmov     r14d, r8d                                                      ; +0x21, 0x1403b9991\nmov     rbp, rdx                                                       ; +0x24, 0x1403b9994\nmov     [rsp+48h+var_28], rdx                                          ; +0x27, 0x1403b9997\ntest    r8d, r8d                                                       ; +0x2c, 0x1403b999c\njle     short loc_1403B99F3                                            ; +0x2f, 0x1403b999f\nmov     rcx, [rcx+38h]                                                 ; +0x31, 0x1403b99a1\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x35, 0x1403b99a5\nmov     rdi, rax                                                       ; +0x3b, 0x1403b99ab\ntest    rax, rax                                                       ; +0x3e, 0x1403b99ae\njz      short loc_1403B99F3                                            ; +0x41, 0x1403b99b1\nmov     rcx, rax                                                       ; +0x43, 0x1403b99b3\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x46, 0x1403b99b6\ntest    eax, eax                                                       ; +0x4c, 0x1403b99bc\njz      short loc_1403B99F3                                            ; +0x4e, 0x1403b99be\nxor     ebx, ebx                                                       ; +0x50, 0x1403b99c0\nmov     rcx, rdi                                                       ; +0x52, 0x1403b99c2\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x55, 0x1403b99c5\ntest    eax, eax                                                       ; +0x5b, 0x1403b99cb\njz      short loc_1403B99F3                                            ; +0x5d, 0x1403b99cd\nnop                                                                    ; +0x5f, 0x1403b99cf\nmov     edx, ebx                                                       ; +0x60, 0x1403b99d0\nmov     rcx, rdi                                                       ; +0x62, 0x1403b99d2\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x65, 0x1403b99d5\nmov     rsi, rax                                                       ; +0x6b, 0x1403b99db\ncmp     [rax+78h], r14d                                                ; +0x6e, 0x1403b99de\njz      short loc_1403B9A1D                                            ; +0x72, 0x1403b99e2\ninc     ebx                                                            ; +0x74, 0x1403b99e4\nmov     rcx, rdi                                                       ; +0x76, 0x1403b99e6\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x79, 0x1403b99e9\ncmp     ebx, eax                                                       ; +0x7f, 0x1403b99ef\njb      short loc_1403B99D0                                            ; +0x81, 0x1403b99f1\nmov     rcx, rbp                                                       ; +0x83, 0x1403b99f3\ncall    sub_14003D310                                                  ; +0x86, 0x1403b99f6\nxor     eax, eax                                                       ; +0x8b, 0x1403b99fb\nmov     rcx, [rsp+48h+var_20]                                          ; +0x8d, 0x1403b99fd\nxor     rcx, rsp; StackCookie                                          ; +0x92, 0x1403b9a02\ncall    __security_check_cookie                                        ; +0x95, 0x1403b9a05\nmov     rbx, [rsp+48h+arg_10]                                          ; +0x9a, 0x1403b9a0a\nmov     rbp, [rsp+48h+arg_18]                                          ; +0x9f, 0x1403b9a0f\nadd     rsp, 30h                                                       ; +0xa4, 0x1403b9a14\npop     r14                                                            ; +0xa8, 0x1403b9a18\npop     rdi                                                            ; +0xaa, 0x1403b9a1a\npop     rsi                                                            ; +0xab, 0x1403b9a1b\nretn                                                                   ; +0xac, 0x1403b9a1c\nmov     rcx, rbp                                                       ; +0xad, 0x1403b9a1d\ncall    sub_14003D310                                                  ; +0xb0, 0x1403b9a20\nmov     rax, rsi                                                       ; +0xb5, 0x1403b9a25\njmp     short loc_1403B99FD                                            ; +0xb8, 0x1403b9a28", "xrefs": ["EditorUI::createPrefab @ 0x1401b766b", "BrowseSmartKeyLayer::onButton @ 0x1405f1a58", "BrowseSmartKeyLayer::addChanceToSelected @ 0x1405f1ef8", "BrowseSmartKeyLayer::updateChanceValues @ 0x1405f2047", "<???> @ 0x140923d68"], "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"}