{"type": "func", "start": 6442492560, "end": 6442492707, "name": "cocos2d::CCDictionary::createWithContentsOfFileThreadSafe", "pseudocode": "// \n// cocos2d::CCDictionary::createWithContentsOfFileThreadSafe from 0x18000a290 to 0x18000a323 (147 bytes)\n// \n// 4 xrefs:\n// > cocos2d::CCDictionary::createWithContentsOfFile @ 0x18000a276\n// > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0x180092115\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801adce4\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// Hidden C++ exception states: #wind=1\nstruct cocos2d::CCDictionary *__fastcall cocos2d::CCDictionary::createWithContentsOfFileThreadSafe(char *a1)\n{\n  struct cocos2d::CCFileUtils *v1; // rax\n  __int64 v2; // rbx\n  void *v3; // rcx\n  void *Block[3]; // [rsp+20h] [rbp-38h] BYREF\n  unsigned __int64 v6; // [rsp+38h] [rbp-20h]\n\n  sub_180005910(Block, a1);\n  v1 = cocos2d::CCFileUtils::sharedFileUtils();\n  v2 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, void **))v1->writeToFile)(v1, Block);\n  if ( v6 > 0xF )\n  {\n    v3 = Block[0];\n    if ( v6 + 1 >= 0x1000 )\n    {\n      v3 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v3);\n  }\n  return (struct cocos2d::CCDictionary *)v2;\n}", "assembly": "; \n; cocos2d::CCDictionary::createWithContentsOfFileThreadSafe from 0x18000a290 to 0x18000a323 (147 bytes)\n; \n; 4 xrefs:\n; > cocos2d::CCDictionary::createWithContentsOfFile @ 0x18000a276\n; > cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0x180092115\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801adce4\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\npush    rbx                                                            ; +0x0, 0x18000a290\nsub     rsp, 50h                                                       ; +0x2, 0x18000a292\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x18000a296\nxor     rax, rsp                                                       ; +0xd, 0x18000a29d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x18000a2a0\nmov     rdx, rcx                                                       ; +0x15, 0x18000a2a5\nlea     rcx, [rsp+58h+Block]                                           ; +0x18, 0x18000a2a8\ncall    sub_180005910                                                  ; +0x1d, 0x18000a2ad\nnop                                                                    ; +0x22, 0x18000a2b2\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x23, 0x18000a2b3\nmov     r8, [rax]                                                      ; +0x28, 0x18000a2b8\nlea     rdx, [rsp+58h+Block]                                           ; +0x2b, 0x18000a2bb\nmov     rcx, rax                                                       ; +0x30, 0x18000a2c0\ncall    qword ptr [r8+0E8h]                                            ; +0x33, 0x18000a2c3\nmov     rbx, rax                                                       ; +0x3a, 0x18000a2ca\nmov     rdx, [rsp+58h+var_20]                                          ; +0x3d, 0x18000a2cd\ncmp     rdx, 0Fh                                                       ; +0x42, 0x18000a2d2\njbe     short loc_18000A30D                                            ; +0x46, 0x18000a2d6\ninc     rdx                                                            ; +0x48, 0x18000a2d8\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x4b, 0x18000a2db\nmov     rax, rcx                                                       ; +0x50, 0x18000a2e0\ncmp     rdx, 1000h                                                     ; +0x53, 0x18000a2e3\njb      short loc_18000A308                                            ; +0x5a, 0x18000a2ea\nadd     rdx, 27h ; '''                                                 ; +0x5c, 0x18000a2ec\nmov     rcx, [rcx-8]                                                   ; +0x60, 0x18000a2f0\nsub     rax, rcx                                                       ; +0x64, 0x18000a2f4\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x67, 0x18000a2f7\ncmp     rax, 1Fh                                                       ; +0x6b, 0x18000a2fb\njbe     short loc_18000A308                                            ; +0x6f, 0x18000a2ff\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x71, 0x18000a301\nalign 8                                                                ; +0x77, 0x18000a307\ncall    j_j_free_0                                                     ; +0x78, 0x18000a308\nmov     rax, rbx                                                       ; +0x7d, 0x18000a30d\nmov     rcx, [rsp+58h+var_18]                                          ; +0x80, 0x18000a310\nxor     rcx, rsp; StackCookie                                          ; +0x85, 0x18000a315\ncall    __security_check_cookie                                        ; +0x88, 0x18000a318\nadd     rsp, 50h                                                       ; +0x8d, 0x18000a31d\npop     rbx                                                            ; +0x91, 0x18000a321\nretn                                                                   ; +0x92, 0x18000a322", "xrefs": ["cocos2d::CCDictionary::createWithContentsOfFile @ 0x18000a276", "cocos2d::CCSpriteFrameCache::removeSpriteFramesFromFile @ 0x180092115", "<???> @ 0x1801438a8", "<???> @ 0x1801adce4"], "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"}