{"type": "func", "start": 5369349648, "end": 5369350184, "name": "AutoSaveSettingsLayer::onSelectBackupDir", "pseudocode": "// \n// AutoSaveSettingsLayer::onSelectBackupDir from 0x14009c610 to 0x14009c828 (536 bytes)\n// \n// 2 xrefs:\n// > AutoSaveSettingsLayer::init @ 0x14009bb0f\n// > <???> @ 0x140912f14\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:26:05 +0000\n// \n\n// Hidden C++ exception states: #wind=4\nvoid __fastcall AutoSaveSettingsLayer::onSelectBackupDir(__int64 a1)\n{\n  void **v2; // rdx\n  __int64 v3; // rbx\n  __int64 v4; // rax\n  __int64 v5; // rdi\n  __int64 v6; // rax\n  void *v7; // rcx\n  void *v8; // rcx\n  void *v9; // [rsp+38h] [rbp-21h]\n  _BYTE v10[32]; // [rsp+40h] [rbp-19h] BYREF\n  void *Src[2]; // [rsp+60h] [rbp+7h] BYREF\n  size_t Size; // [rsp+70h] [rbp+17h]\n  unsigned __int64 v13; // [rsp+78h] [rbp+1Fh]\n  void *Block[2]; // [rsp+80h] [rbp+27h] BYREF\n  __int64 v15; // [rsp+90h] [rbp+37h]\n  unsigned __int64 v16; // [rsp+98h] [rbp+3Fh]\n\n  *(_OWORD *)Src = 0;\n  Size = 0;\n  v13 = 15;\n  LOBYTE(Src[0]) = 0;\n  if ( GameToolbox::showFolderDialog(\"Select Backup Directory\", (LPSTR *)Src) )\n  {\n    if ( (void **)(a1 + 1016) != Src )\n    {\n      v2 = Src;\n      if ( v13 > 0xF )\n        v2 = (void **)Src[0];\n      sub_1400405A0((void **)(a1 + 1016), v2, Size);\n    }\n    v3 = sub_14003F4F0((__int64)v10, a1 + 1016);\n    v4 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v9 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager(v9);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v4 = qword_14090BFD0;\n    }\n    v5 = *(_QWORD *)(v4 + 440);\n    if ( v5 )\n    {\n      v15 = 13;\n      v16 = 15;\n      strcpy((char *)Block, \"autoBackupDir\");\n      HIWORD(Block[1]) = 0;\n      v6 = cocos2d::CCString::create(v3);\n      cocos2d::CCDictionary::setObject(v5, v6, Block);\n      if ( v16 > 0xF )\n      {\n        v7 = Block[0];\n        if ( v16 + 1 >= 0x1000 )\n        {\n          v7 = *((void **)Block[0] - 1);\n          if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n            invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n        }\n        j_j_free(v7);\n      }\n    }\n    sub_14003D310(v3);\n    AutoSaveSettingsLayer::updateBackupDirLabel(a1);\n  }\n  if ( v13 > 0xF )\n  {\n    v8 = Src[0];\n    if ( v13 + 1 >= 0x1000 )\n    {\n      v8 = *((void **)Src[0] - 1);\n      if ( (unsigned __int64)((char *)Src[0] - (char *)v8 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free(v8);\n  }\n}", "assembly": "; \n; AutoSaveSettingsLayer::onSelectBackupDir from 0x14009c610 to 0x14009c828 (536 bytes)\n; \n; 2 xrefs:\n; > AutoSaveSettingsLayer::init @ 0x14009bb0f\n; > <???> @ 0x140912f14\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:26:05 +0000\n; \nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x14009c610\nmov     [rsp-8+arg_10], rsi                                            ; +0x5, 0x14009c615\nmov     [rsp-8+arg_18], rdi                                            ; +0xa, 0x14009c61a\npush    rbp                                                            ; +0xf, 0x14009c61f\nlea     rbp, [rsp-57h]                                                 ; +0x10, 0x14009c620\nsub     rsp, 0B0h                                                      ; +0x15, 0x14009c625\nmov     rax, cs:__security_cookie                                      ; +0x1c, 0x14009c62c\nxor     rax, rsp                                                       ; +0x23, 0x14009c633\nmov     [rbp+57h+var_10], rax                                          ; +0x26, 0x14009c636\nmov     rsi, rcx                                                       ; +0x2a, 0x14009c63a\nxorps   xmm0, xmm0                                                     ; +0x2d, 0x14009c63d\nmovups  xmmword ptr [rbp+57h+Src], xmm0                                ; +0x30, 0x14009c640\nmov     [rbp+57h+Size], 0                                              ; +0x34, 0x14009c644\nmov     [rbp+57h+var_38], 0Fh                                          ; +0x3c, 0x14009c64c\nmov     byte ptr [rbp+57h+Src], 0                                      ; +0x44, 0x14009c654\nlea     rdx, [rbp+57h+Src]; void *                                     ; +0x48, 0x14009c658\nlea     rcx, MultiByteStr; \"Select Backup Directory\"                   ; +0x4c, 0x14009c65c\ncall    GameToolbox__showFolderDialog                                  ; +0x53, 0x14009c663\ntest    al, al                                                         ; +0x58, 0x14009c668\njz      loc_14009C7B2                                                  ; +0x5a, 0x14009c66a\nlea     rbx, [rsi+3F8h]                                                ; +0x60, 0x14009c670\nlea     rax, [rbp+57h+Src]                                             ; +0x67, 0x14009c677\ncmp     rbx, rax                                                       ; +0x6b, 0x14009c67b\njz      short loc_14009C69A                                            ; +0x6e, 0x14009c67e\nlea     rdx, [rbp+57h+Src]                                             ; +0x70, 0x14009c680\ncmp     [rbp+57h+var_38], 0Fh                                          ; +0x74, 0x14009c684\ncmova   rdx, [rbp+57h+Src]; Src                                        ; +0x79, 0x14009c689\nmov     r8, [rbp+57h+Size]; Size                                       ; +0x7e, 0x14009c68e\nmov     rcx, rbx; void *                                               ; +0x82, 0x14009c692\ncall    sub_1400405A0                                                  ; +0x85, 0x14009c695\nmov     rdx, rbx                                                       ; +0x8a, 0x14009c69a\nlea     rcx, [rbp+57h+var_70]                                          ; +0x8d, 0x14009c69d\ncall    sub_14003F4F0                                                  ; +0x91, 0x14009c6a1\nmov     rbx, rax                                                       ; +0x96, 0x14009c6a6\nmov     [rbp+57h+var_80], rax                                          ; +0x99, 0x14009c6a9\nmov     rax, cs:qword_14090BFD0                                        ; +0x9d, 0x14009c6ad\ntest    rax, rax                                                       ; +0xa4, 0x14009c6b4\njnz     short loc_14009C6EA                                            ; +0xa7, 0x14009c6b7\nmov     ecx, 6E8h; Size                                                ; +0xa9, 0x14009c6b9\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xae, 0x14009c6be\nmov     [rbp+57h+var_78], rax                                          ; +0xb3, 0x14009c6c3\nmov     rcx, rax                                                       ; +0xb7, 0x14009c6c7\ncall    GameManager__GameManager                                       ; +0xba, 0x14009c6ca\nnop                                                                    ; +0xbf, 0x14009c6cf\nmov     cs:qword_14090BFD0, rax                                        ; +0xc0, 0x14009c6d0\nmov     rcx, [rax]                                                     ; +0xc7, 0x14009c6d7\nmov     rdx, [rcx+48h]                                                 ; +0xca, 0x14009c6da\nmov     rcx, rax                                                       ; +0xce, 0x14009c6de\ncall    rdx                                                            ; +0xd1, 0x14009c6e1\nmov     rax, cs:qword_14090BFD0                                        ; +0xd3, 0x14009c6e3\nmov     rdi, [rax+1B8h]                                                ; +0xda, 0x14009c6ea\ntest    rdi, rdi                                                       ; +0xe1, 0x14009c6f1\njz      loc_14009C7A1                                                  ; +0xe4, 0x14009c6f4\nxorps   xmm0, xmm0                                                     ; +0xea, 0x14009c6fa\nmovups  xmmword ptr [rbp+57h+Block], xmm0                              ; +0xed, 0x14009c6fd\nmov     [rbp+57h+var_20], 0Dh                                          ; +0xf1, 0x14009c701\nmov     [rbp+57h+var_18], 0Fh                                          ; +0xf9, 0x14009c709\nmovsd   xmm0, cs:qword_14071BBF8                                       ; +0x101, 0x14009c711\nmovsd   [rbp+57h+Block], xmm0                                          ; +0x109, 0x14009c719\nmov     eax, cs:dword_14071BC00                                        ; +0x10e, 0x14009c71e\nmov     dword ptr [rbp+57h+Block+8], eax                               ; +0x114, 0x14009c724\nmovzx   eax, cs:byte_14071BC04                                         ; +0x117, 0x14009c727\nmov     byte ptr [rbp+57h+Block+0Ch], al                               ; +0x11e, 0x14009c72e\nmov     byte ptr [rbp+57h+Block+0Dh], 0                                ; +0x121, 0x14009c731\nmov     rcx, rbx                                                       ; +0x125, 0x14009c735\ncall    cs:?create@CCString@cocos2d@@SAPEAV12@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCString::create(std::string const &) ; +0x128, 0x14009c738\nmov     rdx, rax                                                       ; +0x12e, 0x14009c73e\nlea     r8, [rbp+57h+Block]                                            ; +0x131, 0x14009c741\nmov     rcx, rdi                                                       ; +0x135, 0x14009c745\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x138, 0x14009c748\nnop                                                                    ; +0x13e, 0x14009c74e\nmov     rdx, [rbp+57h+var_18]                                          ; +0x13f, 0x14009c74f\ncmp     rdx, 0Fh                                                       ; +0x143, 0x14009c753\njbe     short loc_14009C7A1                                            ; +0x147, 0x14009c757\ninc     rdx                                                            ; +0x149, 0x14009c759\nmov     rcx, [rbp+57h+Block]; Block                                    ; +0x14c, 0x14009c75c\nmov     rax, rcx                                                       ; +0x150, 0x14009c760\ncmp     rdx, 1000h                                                     ; +0x153, 0x14009c763\njb      short loc_14009C79B                                            ; +0x15a, 0x14009c76a\nadd     rdx, 27h ; '''                                                 ; +0x15c, 0x14009c76c\nmov     rcx, [rcx-8]                                                   ; +0x160, 0x14009c770\nsub     rax, rcx                                                       ; +0x164, 0x14009c774\nsub     rax, 8                                                         ; +0x167, 0x14009c777\ncmp     rax, 1Fh                                                       ; +0x16b, 0x14009c77b\njbe     short loc_14009C79B                                            ; +0x16f, 0x14009c77f\nmov     [rsp+0B0h+Reserved], 0; Reserved                               ; +0x171, 0x14009c781\nxor     r9d, r9d; LineNo                                               ; +0x17a, 0x14009c78a\nxor     r8d, r8d; FileName                                             ; +0x17d, 0x14009c78d\nxor     edx, edx; FunctionName                                         ; +0x180, 0x14009c790\nxor     ecx, ecx; Expression                                           ; +0x182, 0x14009c792\ncall    cs:_invoke_watson                                              ; +0x184, 0x14009c794\ndb 0CCh                                                                ; +0x18a, 0x14009c79a\ncall    j_j_free                                                       ; +0x18b, 0x14009c79b\nnop                                                                    ; +0x190, 0x14009c7a0\nmov     rcx, rbx                                                       ; +0x191, 0x14009c7a1\ncall    sub_14003D310                                                  ; +0x194, 0x14009c7a4\nmov     rcx, rsi                                                       ; +0x199, 0x14009c7a9\ncall    AutoSaveSettingsLayer__updateBackupDirLabel                    ; +0x19c, 0x14009c7ac\nnop                                                                    ; +0x1a1, 0x14009c7b1\nmov     rdx, [rbp+57h+var_38]                                          ; +0x1a2, 0x14009c7b2\ncmp     rdx, 0Fh                                                       ; +0x1a6, 0x14009c7b6\njbe     short loc_14009C803                                            ; +0x1aa, 0x14009c7ba\ninc     rdx                                                            ; +0x1ac, 0x14009c7bc\nmov     rcx, [rbp+57h+Src]; Block                                      ; +0x1af, 0x14009c7bf\nmov     rax, rcx                                                       ; +0x1b3, 0x14009c7c3\ncmp     rdx, 1000h                                                     ; +0x1b6, 0x14009c7c6\njb      short loc_14009C7FE                                            ; +0x1bd, 0x14009c7cd\nadd     rdx, 27h ; '''                                                 ; +0x1bf, 0x14009c7cf\nmov     rcx, [rcx-8]                                                   ; +0x1c3, 0x14009c7d3\nsub     rax, rcx                                                       ; +0x1c7, 0x14009c7d7\nsub     rax, 8                                                         ; +0x1ca, 0x14009c7da\ncmp     rax, 1Fh                                                       ; +0x1ce, 0x14009c7de\njbe     short loc_14009C7FE                                            ; +0x1d2, 0x14009c7e2\nmov     [rsp+0B0h+Reserved], 0; Reserved                               ; +0x1d4, 0x14009c7e4\nxor     r9d, r9d; LineNo                                               ; +0x1dd, 0x14009c7ed\nxor     r8d, r8d; FileName                                             ; +0x1e0, 0x14009c7f0\nxor     edx, edx; FunctionName                                         ; +0x1e3, 0x14009c7f3\nxor     ecx, ecx; Expression                                           ; +0x1e5, 0x14009c7f5\ncall    cs:_invoke_watson                                              ; +0x1e7, 0x14009c7f7\nalign 2                                                                ; +0x1ed, 0x14009c7fd\ncall    j_j_free                                                       ; +0x1ee, 0x14009c7fe\nmov     rcx, [rbp+57h+var_10]                                          ; +0x1f3, 0x14009c803\nxor     rcx, rsp; StackCookie                                          ; +0x1f7, 0x14009c807\ncall    __security_check_cookie                                        ; +0x1fa, 0x14009c80a\nlea     r11, [rsp+0B0h+var_s0]                                         ; +0x1ff, 0x14009c80f\nmov     rbx, [r11+18h]                                                 ; +0x207, 0x14009c817\nmov     rsi, [r11+20h]                                                 ; +0x20b, 0x14009c81b\nmov     rdi, [r11+28h]                                                 ; +0x20f, 0x14009c81f\nmov     rsp, r11                                                       ; +0x213, 0x14009c823\npop     rbp                                                            ; +0x216, 0x14009c826\nretn                                                                   ; +0x217, 0x14009c827", "xrefs": ["AutoSaveSettingsLayer::init @ 0x14009bb0f", "<???> @ 0x140912f14"], "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"}