{"type": "func", "start": 6443160800, "end": 6443161124, "name": "cocos2d::CCTextureCache::textureForKey", "pseudocode": "// \n// cocos2d::CCTextureCache::textureForKey from 0x1800ad4e0 to 0x1800ad624 (324 bytes)\n// \n// 4 xrefs:\n// > sub_180065EE0 @ 0x180065ef9\n// > cocos2d::CCSprite::setTexture @ 0x18008fcde\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c21cc\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:22:18 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCTexture2D *__fastcall cocos2d::CCTextureCache::textureForKey(cocos2d::CCTextureCache *this, char *a2)\n{\n  __int64 v4; // rbx\n  void *v5; // r8\n  struct cocos2d::CCFileUtils *v6; // rax\n  __int64 v7; // rax\n  void *v8; // r8\n  void *Block[3]; // [rsp+30h] [rbp-38h] BYREF\n  unsigned __int64 v11; // [rsp+48h] [rbp-20h]\n\n  sub_180005A10(Block, a2);\n  v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 7), (__int64)Block);\n  if ( v11 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v11 + 1 >= 0x1000 )\n    {\n      v5 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v5);\n  }\n  if ( !v4 )\n  {\n    v6 = cocos2d::CCFileUtils::sharedFileUtils();\n    v7 = (*(__int64 (__fastcall **)(struct cocos2d::CCFileUtils *, void **, char *, _QWORD))(*(_QWORD *)v6 + 40LL))(\n           v6,\n           Block,\n           a2,\n           0);\n    v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 7), v7);\n    if ( v11 > 0xF )\n    {\n      v8 = Block[0];\n      if ( v11 + 1 >= 0x1000 )\n      {\n        v8 = *((void **)Block[0] - 1);\n        if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n      }\n      j_j_free_0(v8);\n    }\n  }\n  return (struct cocos2d::CCTexture2D *)v4;\n}", "assembly": "; \n; cocos2d::CCTextureCache::textureForKey from 0x1800ad4e0 to 0x1800ad624 (324 bytes)\n; \n; 4 xrefs:\n; > sub_180065EE0 @ 0x180065ef9\n; > cocos2d::CCSprite::setTexture @ 0x18008fcde\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c21cc\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:22:18 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1800ad4e0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1800ad4e5\npush    rdi                                                            ; +0xa, 0x1800ad4ea\nsub     rsp, 60h                                                       ; +0xb, 0x1800ad4eb\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x1800ad4ef\nxor     rax, rsp                                                       ; +0x16, 0x1800ad4f6\nmov     [rsp+68h+var_18], rax                                          ; +0x19, 0x1800ad4f9\nmov     rsi, rdx                                                       ; +0x1e, 0x1800ad4fe\nmov     rdi, rcx                                                       ; +0x21, 0x1800ad501\nlea     rcx, [rsp+68h+Block]; void *                                   ; +0x24, 0x1800ad504\ncall    sub_180005A10                                                  ; +0x29, 0x1800ad509\nnop                                                                    ; +0x2e, 0x1800ad50e\nlea     rdx, [rsp+68h+Block]                                           ; +0x2f, 0x1800ad50f\nmov     rcx, [rdi+38h]                                                 ; +0x34, 0x1800ad514\ncall    ?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 &) ; +0x38, 0x1800ad518\nmov     rbx, rax                                                       ; +0x3d, 0x1800ad51d\nmov     rdx, [rsp+68h+var_20]                                          ; +0x40, 0x1800ad520\ncmp     rdx, 0Fh                                                       ; +0x45, 0x1800ad525\njbe     short loc_1800AD576                                            ; +0x49, 0x1800ad529\ninc     rdx                                                            ; +0x4b, 0x1800ad52b\nmov     r8, [rsp+68h+Block]                                            ; +0x4e, 0x1800ad52e\nmov     rcx, r8                                                        ; +0x53, 0x1800ad533\ncmp     rdx, 1000h                                                     ; +0x56, 0x1800ad536\njb      short loc_1800AD56E                                            ; +0x5d, 0x1800ad53d\nadd     rdx, 27h ; '''                                                 ; +0x5f, 0x1800ad53f\nmov     r8, [r8-8]                                                     ; +0x63, 0x1800ad543\nsub     rcx, r8                                                        ; +0x67, 0x1800ad547\nsub     rcx, 8                                                         ; +0x6a, 0x1800ad54a\ncmp     rcx, 1Fh                                                       ; +0x6e, 0x1800ad54e\njbe     short loc_1800AD56E                                            ; +0x72, 0x1800ad552\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x74, 0x1800ad554\nxor     r9d, r9d; LineNo                                               ; +0x7d, 0x1800ad55d\nxor     r8d, r8d; FileName                                             ; +0x80, 0x1800ad560\nxor     edx, edx; FunctionName                                         ; +0x83, 0x1800ad563\nxor     ecx, ecx; Expression                                           ; +0x85, 0x1800ad565\ncall    cs:_invoke_watson                                              ; +0x87, 0x1800ad567\nalign 2                                                                ; +0x8d, 0x1800ad56d\nmov     rcx, r8; Block                                                 ; +0x8e, 0x1800ad56e\ncall    j_j_free_0                                                     ; +0x91, 0x1800ad571\ntest    rbx, rbx                                                       ; +0x96, 0x1800ad576\njnz     loc_1800AD602                                                  ; +0x99, 0x1800ad579\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x9f, 0x1800ad57f\nmov     rcx, [rax]                                                     ; +0xa4, 0x1800ad584\nmov     r10, [rcx+28h]                                                 ; +0xa7, 0x1800ad587\nxor     r9d, r9d                                                       ; +0xab, 0x1800ad58b\nmov     r8, rsi                                                        ; +0xae, 0x1800ad58e\nlea     rdx, [rsp+68h+Block]                                           ; +0xb1, 0x1800ad591\nmov     rcx, rax                                                       ; +0xb6, 0x1800ad596\ncall    r10                                                            ; +0xb9, 0x1800ad599\nnop                                                                    ; +0xbc, 0x1800ad59c\nmov     rdx, rax                                                       ; +0xbd, 0x1800ad59d\nmov     rcx, [rdi+38h]                                                 ; +0xc0, 0x1800ad5a0\ncall    ?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 &) ; +0xc4, 0x1800ad5a4\nmov     rbx, rax                                                       ; +0xc9, 0x1800ad5a9\nmov     rdx, [rsp+68h+var_20]                                          ; +0xcc, 0x1800ad5ac\ncmp     rdx, 0Fh                                                       ; +0xd1, 0x1800ad5b1\njbe     short loc_1800AD602                                            ; +0xd5, 0x1800ad5b5\ninc     rdx                                                            ; +0xd7, 0x1800ad5b7\nmov     r8, [rsp+68h+Block]                                            ; +0xda, 0x1800ad5ba\nmov     rcx, r8                                                        ; +0xdf, 0x1800ad5bf\ncmp     rdx, 1000h                                                     ; +0xe2, 0x1800ad5c2\njb      short loc_1800AD5FA                                            ; +0xe9, 0x1800ad5c9\nadd     rdx, 27h ; '''                                                 ; +0xeb, 0x1800ad5cb\nmov     r8, [r8-8]                                                     ; +0xef, 0x1800ad5cf\nsub     rcx, r8                                                        ; +0xf3, 0x1800ad5d3\nsub     rcx, 8                                                         ; +0xf6, 0x1800ad5d6\ncmp     rcx, 1Fh                                                       ; +0xfa, 0x1800ad5da\njbe     short loc_1800AD5FA                                            ; +0xfe, 0x1800ad5de\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x100, 0x1800ad5e0\nxor     r9d, r9d; LineNo                                               ; +0x109, 0x1800ad5e9\nxor     r8d, r8d; FileName                                             ; +0x10c, 0x1800ad5ec\nxor     edx, edx; FunctionName                                         ; +0x10f, 0x1800ad5ef\nxor     ecx, ecx; Expression                                           ; +0x111, 0x1800ad5f1\ncall    cs:_invoke_watson                                              ; +0x113, 0x1800ad5f3\nalign 2                                                                ; +0x119, 0x1800ad5f9\nmov     rcx, r8; Block                                                 ; +0x11a, 0x1800ad5fa\ncall    j_j_free_0                                                     ; +0x11d, 0x1800ad5fd\nmov     rax, rbx                                                       ; +0x122, 0x1800ad602\nmov     rcx, [rsp+68h+var_18]                                          ; +0x125, 0x1800ad605\nxor     rcx, rsp; StackCookie                                          ; +0x12a, 0x1800ad60a\ncall    __security_check_cookie                                        ; +0x12d, 0x1800ad60d\nlea     r11, [rsp+68h+var_8]                                           ; +0x132, 0x1800ad612\nmov     rbx, [r11+20h]                                                 ; +0x137, 0x1800ad617\nmov     rsi, [r11+28h]                                                 ; +0x13b, 0x1800ad61b\nmov     rsp, r11                                                       ; +0x13f, 0x1800ad61f\npop     rdi                                                            ; +0x142, 0x1800ad622\nretn                                                                   ; +0x143, 0x1800ad623", "xrefs": ["sub_180065EE0 @ 0x180065ef9", "cocos2d::CCSprite::setTexture @ 0x18008fcde", "<???> @ 0x18014cf68", "<???> @ 0x1801c21cc"], "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"}