{"type": "func", "start": 6442966336, "end": 6442966535, "name": "cocos2d::CCFileUtilsWin32::init", "pseudocode": "// \n// cocos2d::CCFileUtilsWin32::init from 0x18007dd40 to 0x18007de07 (199 bytes)\n// \n// 5 xrefs:\n// > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2cf\n// > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2c0\n// > <???> @ 0x1801077f0\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801befa4\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:01 +0000\n// \n\nchar __fastcall cocos2d::CCFileUtilsWin32::init(void **this)\n{\n  DWORD CurrentDirectoryW; // eax\n  size_t v3; // rax\n  WCHAR Buffer[264]; // [rsp+40h] [rbp-228h] BYREF\n\n  if ( !Str[0] )\n  {\n    memset(Buffer, 0, 0x208u);\n    CurrentDirectoryW = GetCurrentDirectoryW(0x208u, Buffer);\n    Str[WideCharToMultiByte(0, 0, Buffer, CurrentDirectoryW, Str, 260, nullptr, nullptr)] = 92;\n  }\n  v3 = strlen(Str);\n  sub_1800101E0(this + 8, Str, v3);\n  return cocos2d::CCFileUtils::init((cocos2d::CCFileUtils *)this);\n}", "assembly": "; \n; cocos2d::CCFileUtilsWin32::init from 0x18007dd40 to 0x18007de07 (199 bytes)\n; \n; 5 xrefs:\n; > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2cf\n; > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2c0\n; > <???> @ 0x1801077f0\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801befa4\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:01 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18007dd40\npush    rdi                                                            ; +0x5, 0x18007dd45\nsub     rsp, 260h                                                      ; +0x6, 0x18007dd46\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x18007dd4d\nxor     rax, rsp                                                       ; +0x14, 0x18007dd54\nmov     [rsp+268h+var_18], rax                                         ; +0x17, 0x18007dd57\ncmp     cs:Str, 0                                                      ; +0x1f, 0x18007dd5f\nlea     rdi, Str                                                       ; +0x26, 0x18007dd66\nmov     rbx, rcx                                                       ; +0x2d, 0x18007dd6d\njnz     short loc_18007DDC7                                            ; +0x30, 0x18007dd70\nxor     edx, edx; Val                                                  ; +0x32, 0x18007dd72\nlea     rcx, [rsp+268h+Buffer]; void *                                 ; +0x34, 0x18007dd74\nmov     r8d, 208h; Size                                                ; +0x39, 0x18007dd79\ncall    memset                                                         ; +0x3f, 0x18007dd7f\nlea     rdx, [rsp+268h+Buffer]; lpBuffer                               ; +0x44, 0x18007dd84\nmov     ecx, 208h; nBufferLength                                       ; +0x49, 0x18007dd89\ncall    cs:GetCurrentDirectoryW                                        ; +0x4e, 0x18007dd8e\nlea     r8, [rsp+268h+Buffer]; lpWideCharStr                           ; +0x54, 0x18007dd94\nxor     edx, edx; dwFlags                                              ; +0x59, 0x18007dd99\nmov     r9d, eax; cchWideChar                                          ; +0x5b, 0x18007dd9b\nxor     ecx, ecx; CodePage                                             ; +0x5e, 0x18007dd9e\nxor     eax, eax                                                       ; +0x60, 0x18007dda0\nmov     [rsp+268h+lpUsedDefaultChar], rax; lpUsedDefaultChar           ; +0x62, 0x18007dda2\nmov     [rsp+268h+lpDefaultChar], rax; lpDefaultChar                   ; +0x67, 0x18007dda7\nmov     [rsp+268h+cbMultiByte], 104h; cbMultiByte                      ; +0x6c, 0x18007ddac\nmov     [rsp+268h+lpMultiByteStr], rdi; lpMultiByteStr                 ; +0x74, 0x18007ddb4\ncall    cs:WideCharToMultiByte                                         ; +0x79, 0x18007ddb9\nmovsxd  r8, eax                                                        ; +0x7f, 0x18007ddbf\nmov     byte ptr [r8+rdi], 5Ch ; '\\'                                   ; +0x82, 0x18007ddc2\nmov     rcx, rdi; Str                                                  ; +0x87, 0x18007ddc7\ncall    strlen                                                         ; +0x8a, 0x18007ddca\nlea     rcx, [rbx+40h]; void *                                         ; +0x8f, 0x18007ddcf\nmov     r8, rax; Size                                                  ; +0x93, 0x18007ddd3\nmov     rdx, rdi; Src                                                  ; +0x96, 0x18007ddd6\ncall    sub_1800101E0                                                  ; +0x99, 0x18007ddd9\nmov     rcx, rbx; this                                                 ; +0x9e, 0x18007ddde\ncall    ?init@CCFileUtils@cocos2d@@MEAA_NXZ; cocos2d::CCFileUtils::init(void) ; +0xa1, 0x18007dde1\nmov     rcx, [rsp+268h+var_18]                                         ; +0xa6, 0x18007dde6\nxor     rcx, rsp; StackCookie                                          ; +0xae, 0x18007ddee\ncall    __security_check_cookie                                        ; +0xb1, 0x18007ddf1\nmov     rbx, [rsp+268h+arg_8]                                          ; +0xb6, 0x18007ddf6\nadd     rsp, 260h                                                      ; +0xbe, 0x18007ddfe\npop     rdi                                                            ; +0xc5, 0x18007de05\nretn                                                                   ; +0xc6, 0x18007de06", "xrefs": ["cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2cf", "cocos2d::CCFileUtils::sharedFileUtils @ 0x18007e2c0", "<???> @ 0x1801077f0", "<???> @ 0x18014cf68", "<???> @ 0x1801befa4"], "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"}