{"type": "func", "start": 6442953488, "end": 6442953695, "name": "cocos2d::CCFileUtilsWin32::init", "pseudocode": "// \n// cocos2d::CCFileUtilsWin32::init from 0x18007ab10 to 0x18007abdf (207 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0bf\n// > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0b0\n// > <???> @ 0x180101118\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b4cbc\n// > <???> @ 0x1801b4cc8\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\nchar __fastcall cocos2d::CCFileUtilsWin32::init(cocos2d::CCFileUtilsWin32 *this)\n{\n  DWORD CurrentDirectoryW; // eax\n  size_t v3; // r8\n  WCHAR Buffer[264]; // [rsp+40h] [rbp-228h] BYREF\n\n  if ( !MultiByteStr[0] )\n  {\n    memset(Buffer, 0, 0x208u);\n    CurrentDirectoryW = GetCurrentDirectoryW(0x208u, Buffer);\n    MultiByteStr[WideCharToMultiByte(0, 0, Buffer, CurrentDirectoryW, MultiByteStr, 260, nullptr, nullptr)] = 92;\n  }\n  v3 = -1;\n  do\n    ++v3;\n  while ( MultiByteStr[v3] );\n  sub_180010050((void **)this + 8, MultiByteStr, v3);\n  return cocos2d::CCFileUtils::init(this);\n}", "assembly": "; \n; cocos2d::CCFileUtilsWin32::init from 0x18007ab10 to 0x18007abdf (207 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0bf\n; > cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0b0\n; > <???> @ 0x180101118\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b4cbc\n; > <???> @ 0x1801b4cc8\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_8], rbx                                               ; +0x0, 0x18007ab10\npush    rdi                                                            ; +0x5, 0x18007ab15\nsub     rsp, 260h                                                      ; +0x6, 0x18007ab16\nmov     rax, cs:__security_cookie                                      ; +0xd, 0x18007ab1d\nxor     rax, rsp                                                       ; +0x14, 0x18007ab24\nmov     [rsp+268h+var_18], rax                                         ; +0x17, 0x18007ab27\ncmp     cs:MultiByteStr, 0                                             ; +0x1f, 0x18007ab2f\nlea     rdi, MultiByteStr                                              ; +0x26, 0x18007ab36\nmov     rbx, rcx                                                       ; +0x2d, 0x18007ab3d\njnz     short loc_18007AB96                                            ; +0x30, 0x18007ab40\nxor     edx, edx; Val                                                  ; +0x32, 0x18007ab42\nlea     rcx, [rsp+268h+Buffer]; void *                                 ; +0x34, 0x18007ab44\nmov     r8d, 208h; Size                                                ; +0x39, 0x18007ab49\ncall    memset                                                         ; +0x3f, 0x18007ab4f\nlea     rdx, [rsp+268h+Buffer]; lpBuffer                               ; +0x44, 0x18007ab54\nmov     ecx, 208h; nBufferLength                                       ; +0x49, 0x18007ab59\ncall    cs:GetCurrentDirectoryW                                        ; +0x4e, 0x18007ab5e\nlea     r8, [rsp+268h+Buffer]; lpWideCharStr                           ; +0x54, 0x18007ab64\nxor     edx, edx; dwFlags                                              ; +0x59, 0x18007ab69\nmov     r9d, eax; cchWideChar                                          ; +0x5b, 0x18007ab6b\nxor     ecx, ecx; CodePage                                             ; +0x5e, 0x18007ab6e\nxor     eax, eax                                                       ; +0x60, 0x18007ab70\nmov     [rsp+268h+lpUsedDefaultChar], rax; lpUsedDefaultChar           ; +0x62, 0x18007ab72\nmov     [rsp+268h+lpDefaultChar], rax; lpDefaultChar                   ; +0x67, 0x18007ab77\nmov     [rsp+268h+cbMultiByte], 104h; cbMultiByte                      ; +0x6c, 0x18007ab7c\nmov     [rsp+268h+lpMultiByteStr], rdi; lpMultiByteStr                 ; +0x74, 0x18007ab84\ncall    cs:WideCharToMultiByte                                         ; +0x79, 0x18007ab89\nmovsxd  rcx, eax                                                       ; +0x7f, 0x18007ab8f\nmov     byte ptr [rcx+rdi], 5Ch ; '\\'                                  ; +0x82, 0x18007ab92\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x86, 0x18007ab96\nnop     dword ptr [rax]                                                ; +0x8d, 0x18007ab9d\ninc     r8; Size                                                       ; +0x90, 0x18007aba0\ncmp     byte ptr [rdi+r8], 0                                           ; +0x93, 0x18007aba3\njnz     short loc_18007ABA0                                            ; +0x98, 0x18007aba8\nlea     rcx, [rbx+40h]; void *                                         ; +0x9a, 0x18007abaa\nmov     rdx, rdi; Src                                                  ; +0x9e, 0x18007abae\ncall    sub_180010050                                                  ; +0xa1, 0x18007abb1\nmov     rcx, rbx; this                                                 ; +0xa6, 0x18007abb6\ncall    ?init@CCFileUtils@cocos2d@@MEAA_NXZ; cocos2d::CCFileUtils::init(void) ; +0xa9, 0x18007abb9\nmov     rcx, [rsp+268h+var_18]                                         ; +0xae, 0x18007abbe\nxor     rcx, rsp; StackCookie                                          ; +0xb6, 0x18007abc6\ncall    __security_check_cookie                                        ; +0xb9, 0x18007abc9\nmov     rbx, [rsp+268h+arg_8]                                          ; +0xbe, 0x18007abce\nadd     rsp, 260h                                                      ; +0xc6, 0x18007abd6\npop     rdi                                                            ; +0xcd, 0x18007abdd\nretn                                                                   ; +0xce, 0x18007abde", "xrefs": ["cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0bf", "cocos2d::CCFileUtils::sharedFileUtils @ 0x18007b0b0", "<???> @ 0x180101118", "<???> @ 0x1801438a8", "<???> @ 0x1801b4cbc", "<???> @ 0x1801b4cc8"], "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"}