{"type": "func", "start": 11801740, "end": 11801964, "name": "FileOperation::getFilePath", "pseudocode": "// \n// FileOperation::getFilePath from 0xb4148c to 0xb4156c (224 bytes)\n// \n// 8 xrefs:\n// > FileOperation::saveFile @ 0xb4158c\n// > FileOperation::readFile @ 0xb416a4\n// > DS_Dictionary::saveRootSubDictToFile @ 0xb41c10\n// > DS_Dictionary::copyFile @ 0xb421c8\n// > DS_Dictionary::saveRootSubDictToCompressedFile @ 0xb42734\n// > DS_Dictionary::loadRootSubDictFromFile @ 0xb47c50\n// > DS_Dictionary::loadRootSubDictFromCompressedFile @ 0xb47e2c\n// > <???> @ 0x9d998\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__int64 __usercall FileOperation::getFilePath@<X0>(FileOperation *this@<X0>, __int64 a2@<X8>)\n{\n  void *v3; // x0\n  unsigned int *v5; // x2\n  int v6; // w1\n  __int64 v7; // [xsp+40h] [xbp+40h] BYREF\n\n  sub_D153B8(a2, &byte_F288A0);\n  cocos2d::CCFileUtils::sharedFileUtils();\n  sub_D18D28(&v7);\n  sub_D15E14(a2, &v7);\n  v3 = (void *)(v7 - 24);\n  if ( (__int64 *)(v7 - 24) != &qword_124B6B0 )\n  {\n    if ( &pthread_create )\n    {\n      v5 = (unsigned int *)(v7 - 8);\n      do\n        v6 = __ldaxr(v5);\n      while ( __stlxr(v6 - 1, v5) );\n    }\n    else\n    {\n      v6 = *(_DWORD *)(v7 - 8);\n      *(_DWORD *)(v7 - 8) = v6 - 1;\n    }\n    if ( v6 <= 0 )\n      operator delete(v3);\n  }\n  return a2;\n}", "assembly": "; \n; FileOperation::getFilePath from 0xb4148c to 0xb4156c (224 bytes)\n; \n; 8 xrefs:\n; > FileOperation::saveFile @ 0xb4158c\n; > FileOperation::readFile @ 0xb416a4\n; > DS_Dictionary::saveRootSubDictToFile @ 0xb41c10\n; > DS_Dictionary::copyFile @ 0xb421c8\n; > DS_Dictionary::saveRootSubDictToCompressedFile @ 0xb42734\n; > DS_Dictionary::loadRootSubDictFromFile @ 0xb47c50\n; > DS_Dictionary::loadRootSubDictFromCompressedFile @ 0xb47e2c\n; > <???> @ 0x9d998\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0xb4148c\nADRP            X1, #byte_F288A0@PAGE                                  ; +0x4, 0xb41490\nMOV             X0, X8; int                                            ; +0x8, 0xb41494\nMOV             X29, SP                                                ; +0xc, 0xb41498\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x10, 0xb4149c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x14, 0xb414a0\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x18, 0xb414a4\nADD             X21, X29, #0x50+var_10                                 ; +0x1c, 0xb414a8\nADD             X1, X1, #byte_F288A0@PAGEOFF; char *                   ; +0x20, 0xb414ac\nMOV             X2, X21                                                ; +0x24, 0xb414b0\nMOV             X20, X8                                                ; +0x28, 0xb414b4\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0xb414b8\nLDR             X3, [X3]                                               ; +0x30, 0xb414bc\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x34, 0xb414c0\nBL              sub_D153B8                                             ; +0x38, 0xb414c4\nBL              _ZN7cocos2d11CCFileUtils15sharedFileUtilsEv; cocos2d::CCFileUtils::sharedFileUtils(void) ; +0x3c, 0xb414c8\nADD             X1, X0, #0x78 ; 'x'                                    ; +0x40, 0xb414cc\nMOV             X0, X21                                                ; +0x44, 0xb414d0\nBL              sub_D18D28                                             ; +0x48, 0xb414d4\nMOV             X1, X21                                                ; +0x4c, 0xb414d8\nMOV             X0, X20                                                ; +0x50, 0xb414dc\nBL              sub_D15E14                                             ; +0x54, 0xb414e0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x58, 0xb414e4\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x5c, 0xb414e8\nSUB             X0, X2, #0x18; p                                       ; +0x60, 0xb414ec\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x64, 0xb414f0\nCMP             X0, X1                                                 ; +0x68, 0xb414f4\nB.NE            loc_B41524                                             ; +0x6c, 0xb414f8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x70, 0xb414fc\nMOV             X0, X20                                                ; +0x74, 0xb41500\nLDR             X2, [X29,#0x50+var_8]                                  ; +0x78, 0xb41504\nLDR             X1, [X19]                                              ; +0x7c, 0xb41508\nCMP             X2, X1                                                 ; +0x80, 0xb4150c\nB.NE            loc_B41568                                             ; +0x84, 0xb41510\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x88, 0xb41514\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x8c, 0xb41518\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x90, 0xb4151c\nRET                                                                    ; +0x94, 0xb41520\nADRP            X1, #pthread_create_ptr_0@PAGE                         ; +0x98, 0xb41524\nLDR             X1, [X1,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x9c, 0xb41528\nCBZ             X1, loc_B41558                                         ; +0xa0, 0xb4152c\nSUB             X2, X2, #8                                             ; +0xa4, 0xb41530\nLDAXR           W1, [X2]                                               ; +0xa8, 0xb41534\nSUB             W3, W1, #1                                             ; +0xac, 0xb41538\nSTLXR           W4, W3, [X2]                                           ; +0xb0, 0xb4153c\nCBNZ            W4, loc_B41534                                         ; +0xb4, 0xb41540\nCMP             W1, WZR                                                ; +0xb8, 0xb41544\nB.GT            loc_B414FC                                             ; +0xbc, 0xb41548\nADD             X1, X29, #0x50+var_18                                  ; +0xc0, 0xb4154c\nBL              j__ZdlPv; operator delete(void *)                      ; +0xc4, 0xb41550\nB               loc_B414FC                                             ; +0xc8, 0xb41554\nLDUR            W1, [X2,#-8]                                           ; +0xcc, 0xb41558\nSUB             W3, W1, #1                                             ; +0xd0, 0xb4155c\nSTUR            W3, [X2,#-8]                                           ; +0xd4, 0xb41560\nB               loc_B41544                                             ; +0xd8, 0xb41564\nBL              .__stack_chk_fail                                      ; +0xdc, 0xb41568", "xrefs": ["FileOperation::saveFile @ 0xb4158c", "FileOperation::readFile @ 0xb416a4", "DS_Dictionary::saveRootSubDictToFile @ 0xb41c10", "DS_Dictionary::copyFile @ 0xb421c8", "DS_Dictionary::saveRootSubDictToCompressedFile @ 0xb42734", "DS_Dictionary::loadRootSubDictFromFile @ 0xb47c50", "DS_Dictionary::loadRootSubDictFromCompressedFile @ 0xb47e2c", "<???> @ 0x9d998"], "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"}