{"type": "func", "start": 6442963728, "end": 6442964212, "name": "cocos2d::CCFileUtilsWin32::getPathForFilename", "pseudocode": "// \n// cocos2d::CCFileUtilsWin32::getPathForFilename from 0x18007d310 to 0x18007d4f4 (484 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x180107810\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bef74\n// > <???> @ 0x1801bef80\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\n// Hidden C++ exception states: #wind=3\n_QWORD *__fastcall cocos2d::CCFileUtilsWin32::getPathForFilename(\n        __int64 a1,\n        _QWORD *a2,\n        _QWORD *a3,\n        _QWORD *a4,\n        _QWORD *a5)\n{\n  _QWORD *v8; // rdi\n  void *v9; // rcx\n  __m128i si128; // xmm0\n  void *v11; // rcx\n  void *v12; // rcx\n  void *Block[2]; // [rsp+40h] [rbp-98h] BYREF\n  __m128i v15; // [rsp+50h] [rbp-88h]\n  void *v16[2]; // [rsp+60h] [rbp-78h] BYREF\n  __m128i v17; // [rsp+70h] [rbp-68h]\n  void *v18[3]; // [rsp+80h] [rbp-58h] BYREF\n  unsigned __int64 v19; // [rsp+98h] [rbp-40h]\n\n  v8 = a5;\n  if ( a3[3] > 0xFu )\n    a3 = (_QWORD *)*a3;\n  cocos2d::CCFileUtilsWin32::utf8Togbk(a1, v18, a3);\n  if ( a4[3] > 0xFu )\n    a4 = (_QWORD *)*a4;\n  cocos2d::CCFileUtilsWin32::utf8Togbk(a1, v16, a4);\n  if ( a5[3] > 0xFu )\n    v8 = (_QWORD *)*a5;\n  cocos2d::CCFileUtilsWin32::utf8Togbk(a1, Block, v8);\n  cocos2d::CCFileUtils::getPathForFilename(a1, a2, (__int64)v18, (unsigned __int64 *)v16, (__int64)Block);\n  if ( v15.m128i_i64[1] > 0xFuLL )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(v15.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v9);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  v15 = si128;\n  LOBYTE(Block[0]) = 0;\n  if ( v17.m128i_i64[1] > 0xFuLL )\n  {\n    v11 = v16[0];\n    if ( (unsigned __int64)(v17.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v11 = *((void **)v16[0] - 1);\n      if ( (unsigned __int64)((char *)v16[0] - (char *)v11 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v11);\n    si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  }\n  v17 = si128;\n  LOBYTE(v16[0]) = 0;\n  if ( v19 > 0xF )\n  {\n    v12 = v18[0];\n    if ( v19 + 1 >= 0x1000 )\n    {\n      v12 = *((void **)v18[0] - 1);\n      if ( (unsigned __int64)((char *)v18[0] - (char *)v12 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v12);\n  }\n  return a2;\n}", "assembly": "; \n; cocos2d::CCFileUtilsWin32::getPathForFilename from 0x18007d310 to 0x18007d4f4 (484 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x180107810\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bef74\n; > <???> @ 0x1801bef80\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; \npush    rbx                                                            ; +0x0, 0x18007d310\npush    rbp                                                            ; +0x2, 0x18007d312\npush    rsi                                                            ; +0x3, 0x18007d313\npush    rdi                                                            ; +0x4, 0x18007d314\npush    r14                                                            ; +0x5, 0x18007d315\nsub     rsp, 0B0h                                                      ; +0x7, 0x18007d317\nmov     rax, cs:__security_cookie                                      ; +0xe, 0x18007d31e\nxor     rax, rsp                                                       ; +0x15, 0x18007d325\nmov     [rsp+0D8h+var_38], rax                                         ; +0x18, 0x18007d328\nmov     rbx, r9                                                        ; +0x20, 0x18007d330\nmov     rbp, rdx                                                       ; +0x23, 0x18007d333\nmov     rsi, rcx                                                       ; +0x26, 0x18007d336\nmov     rdi, [rsp+0D8h+arg_20]                                         ; +0x29, 0x18007d339\nmov     [rsp+0D8h+var_A0], rdx                                         ; +0x31, 0x18007d341\nxor     r14d, r14d                                                     ; +0x36, 0x18007d346\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x39, 0x18007d349\njbe     short loc_18007D353                                            ; +0x3e, 0x18007d34e\nmov     r8, [r8]                                                       ; +0x40, 0x18007d350\nlea     rdx, [rsp+0D8h+var_58]                                         ; +0x43, 0x18007d353\ncall    ?utf8Togbk@CCFileUtilsWin32@cocos2d@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; cocos2d::CCFileUtilsWin32::utf8Togbk(char const *) ; +0x4b, 0x18007d35b\nnop                                                                    ; +0x50, 0x18007d360\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x51, 0x18007d361\njbe     short loc_18007D36B                                            ; +0x56, 0x18007d366\nmov     rbx, [rbx]                                                     ; +0x58, 0x18007d368\nmov     r8, rbx                                                        ; +0x5b, 0x18007d36b\nlea     rdx, [rsp+0D8h+var_78]                                         ; +0x5e, 0x18007d36e\nmov     rcx, rsi                                                       ; +0x63, 0x18007d373\ncall    ?utf8Togbk@CCFileUtilsWin32@cocos2d@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; cocos2d::CCFileUtilsWin32::utf8Togbk(char const *) ; +0x66, 0x18007d376\nnop                                                                    ; +0x6b, 0x18007d37b\ncmp     qword ptr [rdi+18h], 0Fh                                       ; +0x6c, 0x18007d37c\njbe     short loc_18007D386                                            ; +0x71, 0x18007d381\nmov     rdi, [rdi]                                                     ; +0x73, 0x18007d383\nmov     r8, rdi                                                        ; +0x76, 0x18007d386\nlea     rdx, [rsp+0D8h+Block]                                          ; +0x79, 0x18007d389\nmov     rcx, rsi                                                       ; +0x7e, 0x18007d38e\ncall    ?utf8Togbk@CCFileUtilsWin32@cocos2d@@QEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PEBD@Z; cocos2d::CCFileUtilsWin32::utf8Togbk(char const *) ; +0x81, 0x18007d391\nnop                                                                    ; +0x86, 0x18007d396\nlea     rax, [rsp+0D8h+Block]                                          ; +0x87, 0x18007d397\nmov     [rsp+0D8h+Reserved], rax                                       ; +0x8c, 0x18007d39c\nlea     r9, [rsp+0D8h+var_78]                                          ; +0x91, 0x18007d3a1\nlea     r8, [rsp+0D8h+var_58]                                          ; +0x96, 0x18007d3a6\nmov     rdx, rbp                                                       ; +0x9e, 0x18007d3ae\nmov     rcx, rsi                                                       ; +0xa1, 0x18007d3b1\ncall    ?getPathForFilename@CCFileUtils@cocos2d@@MEAA?AV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEBV34@00@Z; cocos2d::CCFileUtils::getPathForFilename(std::string const &,std::string const &,std::string const &) ; +0xa4, 0x18007d3b4\nnop                                                                    ; +0xa9, 0x18007d3b9\nmov     rdx, [rsp+0D8h+var_80]                                         ; +0xaa, 0x18007d3ba\ncmp     rdx, 0Fh                                                       ; +0xaf, 0x18007d3bf\njbe     short loc_18007D409                                            ; +0xb3, 0x18007d3c3\ninc     rdx                                                            ; +0xb5, 0x18007d3c5\nmov     rcx, [rsp+0D8h+Block]; Block                                   ; +0xb8, 0x18007d3c8\nmov     rax, rcx                                                       ; +0xbd, 0x18007d3cd\ncmp     rdx, 1000h                                                     ; +0xc0, 0x18007d3d0\njb      short loc_18007D404                                            ; +0xc7, 0x18007d3d7\nadd     rdx, 27h ; '''                                                 ; +0xc9, 0x18007d3d9\nmov     rcx, [rcx-8]                                                   ; +0xcd, 0x18007d3dd\nsub     rax, rcx                                                       ; +0xd1, 0x18007d3e1\nsub     rax, 8                                                         ; +0xd4, 0x18007d3e4\ncmp     rax, 1Fh                                                       ; +0xd8, 0x18007d3e8\njbe     short loc_18007D404                                            ; +0xdc, 0x18007d3ec\nmov     [rsp+0D8h+Reserved], r14; Reserved                             ; +0xde, 0x18007d3ee\nxor     r9d, r9d; LineNo                                               ; +0xe3, 0x18007d3f3\nxor     r8d, r8d; FileName                                             ; +0xe6, 0x18007d3f6\nxor     edx, edx; FunctionName                                         ; +0xe9, 0x18007d3f9\nxor     ecx, ecx; Expression                                           ; +0xeb, 0x18007d3fb\ncall    cs:_invoke_watson                                              ; +0xed, 0x18007d3fd\nalign 4                                                                ; +0xf3, 0x18007d403\ncall    j_j_free_0                                                     ; +0xf4, 0x18007d404\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0xf9, 0x18007d409\nmovdqu  xmmword ptr [rsp+50h], xmm0                                    ; +0x101, 0x18007d411\nmov     byte ptr [rsp+0D8h+Block], 0                                   ; +0x107, 0x18007d417\nmov     rdx, [rsp+0D8h+var_60]                                         ; +0x10c, 0x18007d41c\ncmp     rdx, 0Fh                                                       ; +0x111, 0x18007d421\njbe     short loc_18007D473                                            ; +0x115, 0x18007d425\ninc     rdx                                                            ; +0x117, 0x18007d427\nmov     rcx, [rsp+0D8h+var_78]; Block                                  ; +0x11a, 0x18007d42a\nmov     rax, rcx                                                       ; +0x11f, 0x18007d42f\ncmp     rdx, 1000h                                                     ; +0x122, 0x18007d432\njb      short loc_18007D466                                            ; +0x129, 0x18007d439\nadd     rdx, 27h ; '''                                                 ; +0x12b, 0x18007d43b\nmov     rcx, [rcx-8]                                                   ; +0x12f, 0x18007d43f\nsub     rax, rcx                                                       ; +0x133, 0x18007d443\nsub     rax, 8                                                         ; +0x136, 0x18007d446\ncmp     rax, 1Fh                                                       ; +0x13a, 0x18007d44a\njbe     short loc_18007D466                                            ; +0x13e, 0x18007d44e\nmov     [rsp+0D8h+Reserved], r14; Reserved                             ; +0x140, 0x18007d450\nxor     r9d, r9d; LineNo                                               ; +0x145, 0x18007d455\nxor     r8d, r8d; FileName                                             ; +0x148, 0x18007d458\nxor     edx, edx; FunctionName                                         ; +0x14b, 0x18007d45b\nxor     ecx, ecx; Expression                                           ; +0x14d, 0x18007d45d\ncall    cs:_invoke_watson                                              ; +0x14f, 0x18007d45f\nalign 2                                                                ; +0x155, 0x18007d465\ncall    j_j_free_0                                                     ; +0x156, 0x18007d466\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0x15b, 0x18007d46b\nmovdqu  xmmword ptr [rsp+70h], xmm0                                    ; +0x163, 0x18007d473\nmov     byte ptr [rsp+0D8h+var_78], 0                                  ; +0x169, 0x18007d479\nmov     rdx, [rsp+0D8h+var_40]                                         ; +0x16e, 0x18007d47e\ncmp     rdx, 0Fh                                                       ; +0x176, 0x18007d486\njbe     short loc_18007D4D3                                            ; +0x17a, 0x18007d48a\ninc     rdx                                                            ; +0x17c, 0x18007d48c\nmov     rcx, [rsp+0D8h+var_58]; Block                                  ; +0x17f, 0x18007d48f\nmov     rax, rcx                                                       ; +0x187, 0x18007d497\ncmp     rdx, 1000h                                                     ; +0x18a, 0x18007d49a\njb      short loc_18007D4CE                                            ; +0x191, 0x18007d4a1\nadd     rdx, 27h ; '''                                                 ; +0x193, 0x18007d4a3\nmov     rcx, [rcx-8]                                                   ; +0x197, 0x18007d4a7\nsub     rax, rcx                                                       ; +0x19b, 0x18007d4ab\nsub     rax, 8                                                         ; +0x19e, 0x18007d4ae\ncmp     rax, 1Fh                                                       ; +0x1a2, 0x18007d4b2\njbe     short loc_18007D4CE                                            ; +0x1a6, 0x18007d4b6\nmov     [rsp+0D8h+Reserved], r14; Reserved                             ; +0x1a8, 0x18007d4b8\nxor     r9d, r9d; LineNo                                               ; +0x1ad, 0x18007d4bd\nxor     r8d, r8d; FileName                                             ; +0x1b0, 0x18007d4c0\nxor     edx, edx; FunctionName                                         ; +0x1b3, 0x18007d4c3\nxor     ecx, ecx; Expression                                           ; +0x1b5, 0x18007d4c5\ncall    cs:_invoke_watson                                              ; +0x1b7, 0x18007d4c7\nalign 2                                                                ; +0x1bd, 0x18007d4cd\ncall    j_j_free_0                                                     ; +0x1be, 0x18007d4ce\nmov     rax, rbp                                                       ; +0x1c3, 0x18007d4d3\nmov     rcx, [rsp+0D8h+var_38]                                         ; +0x1c6, 0x18007d4d6\nxor     rcx, rsp; StackCookie                                          ; +0x1ce, 0x18007d4de\ncall    __security_check_cookie                                        ; +0x1d1, 0x18007d4e1\nadd     rsp, 0B0h                                                      ; +0x1d6, 0x18007d4e6\npop     r14                                                            ; +0x1dd, 0x18007d4ed\npop     rdi                                                            ; +0x1df, 0x18007d4ef\npop     rsi                                                            ; +0x1e0, 0x18007d4f0\npop     rbp                                                            ; +0x1e1, 0x18007d4f1\npop     rbx                                                            ; +0x1e2, 0x18007d4f2\nretn                                                                   ; +0x1e3, 0x18007d4f3", "xrefs": ["<???> @ 0x180107810", "<???> @ 0x18014cf68", "<???> @ 0x1801bef74", "<???> @ 0x1801bef80"], "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"}