{"type": "func", "start": 6442501648, "end": 6442501798, "name": "cocos2d::CCDictionary::writeToFile", "pseudocode": "// \n// cocos2d::CCDictionary::writeToFile from 0x18000c610 to 0x18000c6a6 (150 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ade40\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\n__int64 __fastcall cocos2d::CCDictionary::writeToFile(cocos2d::CCDictionary *this, char *a2)\n{\n  struct cocos2d::CCFileUtils *v3; // rax\n  unsigned __int8 v4; // bl\n  void *v5; // rcx\n  void *Block[3]; // [rsp+20h] [rbp-38h] BYREF\n  unsigned __int64 v8; // [rsp+38h] [rbp-20h]\n\n  sub_180005910(Block, a2);\n  v3 = cocos2d::CCFileUtils::sharedFileUtils();\n  v4 = ((__int64 (__fastcall *)(struct cocos2d::CCFileUtils *, cocos2d::CCDictionary *, void **))v3->__vftable[1].getClassTypeInfo)(\n         v3,\n         this,\n         Block);\n  if ( v8 > 0xF )\n  {\n    v5 = Block[0];\n    if ( v8 + 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  return v4;\n}", "assembly": "; \n; cocos2d::CCDictionary::writeToFile from 0x18000c610 to 0x18000c6a6 (150 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ade40\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, 0x18000c610\nsub     rsp, 50h                                                       ; +0x2, 0x18000c612\nmov     rax, cs:__security_cookie                                      ; +0x6, 0x18000c616\nxor     rax, rsp                                                       ; +0xd, 0x18000c61d\nmov     [rsp+58h+var_18], rax                                          ; +0x10, 0x18000c620\nmov     rbx, rcx                                                       ; +0x15, 0x18000c625\nlea     rcx, [rsp+58h+Block]                                           ; +0x18, 0x18000c628\ncall    sub_180005910                                                  ; +0x1d, 0x18000c62d\nnop                                                                    ; +0x22, 0x18000c632\ncall    ?sharedFileUtils@CCFileUtils@cocos2d@@SAPEAV12@XZ; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x23, 0x18000c633\nmov     r9, [rax]                                                      ; +0x28, 0x18000c638\nlea     r8, [rsp+58h+Block]                                            ; +0x2b, 0x18000c63b\nmov     rdx, rbx                                                       ; +0x30, 0x18000c640\nmov     rcx, rax                                                       ; +0x33, 0x18000c643\ncall    qword ptr [r9+0F0h]                                            ; +0x36, 0x18000c646\nmovzx   ebx, al                                                        ; +0x3d, 0x18000c64d\nmov     rdx, [rsp+58h+var_20]                                          ; +0x40, 0x18000c650\ncmp     rdx, 0Fh                                                       ; +0x45, 0x18000c655\njbe     short loc_18000C690                                            ; +0x49, 0x18000c659\ninc     rdx                                                            ; +0x4b, 0x18000c65b\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x4e, 0x18000c65e\nmov     rax, rcx                                                       ; +0x53, 0x18000c663\ncmp     rdx, 1000h                                                     ; +0x56, 0x18000c666\njb      short loc_18000C68B                                            ; +0x5d, 0x18000c66d\nadd     rdx, 27h ; '''                                                 ; +0x5f, 0x18000c66f\nmov     rcx, [rcx-8]                                                   ; +0x63, 0x18000c673\nsub     rax, rcx                                                       ; +0x67, 0x18000c677\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x6a, 0x18000c67a\ncmp     rax, 1Fh                                                       ; +0x6e, 0x18000c67e\njbe     short loc_18000C68B                                            ; +0x72, 0x18000c682\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x74, 0x18000c684\ndb 0CCh                                                                ; +0x7a, 0x18000c68a\ncall    j_j_free_0                                                     ; +0x7b, 0x18000c68b\nmovzx   eax, bl                                                        ; +0x80, 0x18000c690\nmov     rcx, [rsp+58h+var_18]                                          ; +0x83, 0x18000c693\nxor     rcx, rsp; StackCookie                                          ; +0x88, 0x18000c698\ncall    __security_check_cookie                                        ; +0x8b, 0x18000c69b\nadd     rsp, 50h                                                       ; +0x90, 0x18000c6a0\npop     rbx                                                            ; +0x94, 0x18000c6a4\nretn                                                                   ; +0x95, 0x18000c6a5", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801ade40"], "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"}