{"type": "func", "start": 6442474976, "end": 6442475330, "name": "CCContentManager::addDictDS", "pseudocode": "// \n// CCContentManager::addDictDS from 0x180005de0 to 0x180005f42 (354 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCLabelAtlas::initWithString @ 0x180045faa\n// > cocos2d::CCParticleSystem::initWithFile @ 0x1800689f2\n// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091321\n// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x1800914cd\n// > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091946\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ad87c\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// Alternative name is '?addDict@CCContentManager@@QEAAPEAVCCDictionary@cocos2d@@PEBD_N@Z'\n// Hidden C++ exception states: #wind=2\nstruct cocos2d::CCDictionary *__fastcall CCContentManager::addDictDS(CCContentManager *this, char *a2)\n{\n  __int64 v4; // rbx\n  void *v5; // rcx\n  DS_Dictionary *v7; // rax\n  DS_Dictionary *v8; // rbx\n  struct cocos2d::CCDictionary *DictForKey; // rdi\n  void *v10; // rcx\n  void *Block[3]; // [rsp+28h] [rbp-40h] BYREF\n  unsigned __int64 v12; // [rsp+40h] [rbp-28h]\n\n  sub_180005910(Block, a2);\n  v4 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)this + 7), Block);\n  if ( v12 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v12 + 1 >= 0x1000 )\n    {\n      v5 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v5 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v5);\n  }\n  if ( v4 )\n    return (struct cocos2d::CCDictionary *)v4;\n  v7 = (DS_Dictionary *)operator new(0xF0u);\n  if ( v7 )\n    v8 = DS_Dictionary::DS_Dictionary(v7);\n  else\n    v8 = nullptr;\n  DS_Dictionary::loadRootSubDictFromFile(v8, a2);\n  DictForKey = DS_Dictionary::getDictForKey(v8, nullptr, 0);\n  if ( v8 )\n  {\n    DS_Dictionary::~DS_Dictionary(v8);\n    j_j_free_0(v8);\n  }\n  sub_180005910(Block, a2);\n  cocos2d::CCDictionary::setObject(*((_QWORD *)this + 7), DictForKey, Block);\n  if ( v12 > 0xF )\n  {\n    v10 = Block[0];\n    if ( v12 + 1 >= 0x1000 )\n    {\n      v10 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v10 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v10);\n  }\n  return DictForKey;\n}", "assembly": "; \n; CCContentManager::addDictDS from 0x180005de0 to 0x180005f42 (354 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCLabelAtlas::initWithString @ 0x180045faa\n; > cocos2d::CCParticleSystem::initWithFile @ 0x1800689f2\n; > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091321\n; > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x1800914cd\n; > cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091946\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ad87c\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\nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180005de0\npush    rbp                                                            ; +0x5, 0x180005de5\npush    rsi                                                            ; +0x6, 0x180005de6\npush    rdi                                                            ; +0x7, 0x180005de7\nsub     rsp, 50h                                                       ; +0x8, 0x180005de8\nmov     rax, cs:__security_cookie                                      ; +0xc, 0x180005dec\nxor     rax, rsp                                                       ; +0x13, 0x180005df3\nmov     [rsp+68h+var_20], rax                                          ; +0x16, 0x180005df6\nmov     rsi, rdx                                                       ; +0x1b, 0x180005dfb\nmov     rbp, rcx                                                       ; +0x1e, 0x180005dfe\nlea     rcx, [rsp+68h+Block]                                           ; +0x21, 0x180005e01\ncall    sub_180005910                                                  ; +0x26, 0x180005e06\nnop                                                                    ; +0x2b, 0x180005e0b\nlea     rdx, [rsp+68h+Block]                                           ; +0x2c, 0x180005e0c\nmov     rcx, [rbp+38h]                                                 ; +0x31, 0x180005e11\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 &) ; +0x35, 0x180005e15\nmov     rbx, rax                                                       ; +0x3a, 0x180005e1a\nmov     rdx, [rsp+68h+var_28]                                          ; +0x3d, 0x180005e1d\ncmp     rdx, 0Fh                                                       ; +0x42, 0x180005e22\njbe     short loc_180005E5D                                            ; +0x46, 0x180005e26\ninc     rdx                                                            ; +0x48, 0x180005e28\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x4b, 0x180005e2b\nmov     rax, rcx                                                       ; +0x50, 0x180005e30\ncmp     rdx, 1000h                                                     ; +0x53, 0x180005e33\njb      short loc_180005E58                                            ; +0x5a, 0x180005e3a\nadd     rdx, 27h ; '''                                                 ; +0x5c, 0x180005e3c\nmov     rcx, [rcx-8]                                                   ; +0x60, 0x180005e40\nsub     rax, rcx                                                       ; +0x64, 0x180005e44\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x67, 0x180005e47\ncmp     rax, 1Fh                                                       ; +0x6b, 0x180005e4b\njbe     short loc_180005E58                                            ; +0x6f, 0x180005e4f\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x71, 0x180005e51\nalign 8                                                                ; +0x77, 0x180005e57\ncall    j_j_free_0                                                     ; +0x78, 0x180005e58\ntest    rbx, rbx                                                       ; +0x7d, 0x180005e5d\njz      short loc_180005E6A                                            ; +0x80, 0x180005e60\nmov     rax, rbx                                                       ; +0x82, 0x180005e62\njmp     loc_180005F25                                                  ; +0x85, 0x180005e65\nmov     ecx, 0F0h; Size                                                ; +0x8a, 0x180005e6a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x8f, 0x180005e6f\nmov     [rsp+68h+var_48], rax                                          ; +0x94, 0x180005e74\ntest    rax, rax                                                       ; +0x99, 0x180005e79\njz      short loc_180005E8B                                            ; +0x9c, 0x180005e7c\nmov     rcx, rax; this                                                 ; +0x9e, 0x180005e7e\ncall    ??0DS_Dictionary@@QEAA@XZ; DS_Dictionary::DS_Dictionary(void)  ; +0xa1, 0x180005e81\nmov     rbx, rax                                                       ; +0xa6, 0x180005e86\njmp     short loc_180005E8D                                            ; +0xa9, 0x180005e89\nxor     ebx, ebx                                                       ; +0xab, 0x180005e8b\nmov     rdx, rsi; char *                                               ; +0xad, 0x180005e8d\nmov     rcx, rbx; this                                                 ; +0xb0, 0x180005e90\ncall    ?loadRootSubDictFromFile@DS_Dictionary@@QEAA_NPEBD@Z; DS_Dictionary::loadRootSubDictFromFile(char const *) ; +0xb3, 0x180005e93\nxor     r8d, r8d; bool                                                 ; +0xb8, 0x180005e98\nxor     edx, edx; char *                                               ; +0xbb, 0x180005e9b\nmov     rcx, rbx; this                                                 ; +0xbd, 0x180005e9d\ncall    ?getDictForKey@DS_Dictionary@@QEAAPEAVCCDictionary@cocos2d@@PEBD_N@Z; DS_Dictionary::getDictForKey(char const *,bool) ; +0xc0, 0x180005ea0\nmov     rdi, rax                                                       ; +0xc5, 0x180005ea5\ntest    rbx, rbx                                                       ; +0xc8, 0x180005ea8\njz      short loc_180005EC2                                            ; +0xcb, 0x180005eab\nmov     rcx, rbx; this                                                 ; +0xcd, 0x180005ead\ncall    ??1DS_Dictionary@@QEAA@XZ; DS_Dictionary::~DS_Dictionary(void) ; +0xd0, 0x180005eb0\nmov     edx, 0F0h                                                      ; +0xd5, 0x180005eb5\nmov     rcx, rbx; Block                                                ; +0xda, 0x180005eba\ncall    j_j_free_0                                                     ; +0xdd, 0x180005ebd\nmov     rdx, rsi                                                       ; +0xe2, 0x180005ec2\nlea     rcx, [rsp+68h+Block]                                           ; +0xe5, 0x180005ec5\ncall    sub_180005910                                                  ; +0xea, 0x180005eca\nnop                                                                    ; +0xef, 0x180005ecf\nlea     r8, [rsp+68h+Block]                                            ; +0xf0, 0x180005ed0\nmov     rdx, rdi                                                       ; +0xf5, 0x180005ed5\nmov     rcx, [rbp+38h]                                                 ; +0xf8, 0x180005ed8\ncall    ?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0xfc, 0x180005edc\nnop                                                                    ; +0x101, 0x180005ee1\nmov     rdx, [rsp+68h+var_28]                                          ; +0x102, 0x180005ee2\ncmp     rdx, 0Fh                                                       ; +0x107, 0x180005ee7\njbe     short loc_180005F22                                            ; +0x10b, 0x180005eeb\ninc     rdx                                                            ; +0x10d, 0x180005eed\nmov     rcx, [rsp+68h+Block]; Block                                    ; +0x110, 0x180005ef0\nmov     rax, rcx                                                       ; +0x115, 0x180005ef5\ncmp     rdx, 1000h                                                     ; +0x118, 0x180005ef8\njb      short loc_180005F1D                                            ; +0x11f, 0x180005eff\nadd     rdx, 27h ; '''                                                 ; +0x121, 0x180005f01\nmov     rcx, [rcx-8]                                                   ; +0x125, 0x180005f05\nsub     rax, rcx                                                       ; +0x129, 0x180005f09\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x12c, 0x180005f0c\ncmp     rax, 1Fh                                                       ; +0x130, 0x180005f10\njbe     short loc_180005F1D                                            ; +0x134, 0x180005f14\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x136, 0x180005f16\ndb 0CCh                                                                ; +0x13c, 0x180005f1c\ncall    j_j_free_0                                                     ; +0x13d, 0x180005f1d\nmov     rax, rdi                                                       ; +0x142, 0x180005f22\nmov     rcx, [rsp+68h+var_20]                                          ; +0x145, 0x180005f25\nxor     rcx, rsp; StackCookie                                          ; +0x14a, 0x180005f2a\ncall    __security_check_cookie                                        ; +0x14d, 0x180005f2d\nmov     rbx, [rsp+68h+arg_10]                                          ; +0x152, 0x180005f32\nadd     rsp, 50h                                                       ; +0x15a, 0x180005f3a\npop     rdi                                                            ; +0x15e, 0x180005f3e\npop     rsi                                                            ; +0x15f, 0x180005f3f\npop     rbp                                                            ; +0x160, 0x180005f40\nretn                                                                   ; +0x161, 0x180005f41", "xrefs": ["cocos2d::CCLabelAtlas::initWithString @ 0x180045faa", "cocos2d::CCParticleSystem::initWithFile @ 0x1800689f2", "cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091321", "cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x1800914cd", "cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile @ 0x180091946", "<???> @ 0x1801438a8", "<???> @ 0x1801ad87c"], "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"}