{"type": "func", "start": 5369246976, "end": 5369247187, "name": "AppDelegate::trySaveGame", "pseudocode": "// \n// AppDelegate::trySaveGame from 0x140083500 to 0x1400835d3 (211 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x14053c560\n// > <???> @ 0x1406c6ab0\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// local variable allocation has failed, the output may be wrong!\n// Hidden C++ exception states: #wind=1\nvoid AppDelegate::trySaveGame(AppDelegate *a1, bool a2)\n{\n  GManager *v3; // rcx\n  LocalLevelManager *v4; // rax\n  float v5; // xmm1_4\n  __int64 v6; // rax\n  void *v7; // [rsp+30h] [rbp+8h]\n\n  if ( a2 )\n    *((_DWORD *)&a1[2].m_resourceRootPath.m_data.m_bigStorage + 2) = 0;\n  if ( *((float *)&a1[2].m_resourceRootPath.m_data.m_bigStorage + 2) == 0.0\n    || sub_14003CF30() - *((float *)&a1[2].m_resourceRootPath.m_data.m_bigStorage + 2) >= 10.0 )\n  {\n    if ( a1[2].m_resourceRootPath.m_data.m_smallStorage._Elems[0] )\n    {\n      v3 = (GManager *)qword_1406C2ED8;\n      if ( !qword_1406C2ED8 )\n      {\n        v7 = operator new(0x668u);\n        qword_1406C2ED8 = sub_14017AB00(v7);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8);\n        v3 = (GManager *)qword_1406C2ED8;\n      }\n      GManager::save(v3);\n      v4 = LocalLevelManager::sharedState();\n      GManager::save(v4);\n      v5 = sub_14003CF30();\n      *((float *)&a1[2].m_resourceRootPath.m_data.m_bigStorage + 2) = v5;\n    }\n    v6 = cocos2d::CCApplication::sharedApplication(a1, a2);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 56LL))(v6);\n  }\n}", "assembly": "; \n; AppDelegate::trySaveGame from 0x140083500 to 0x1400835d3 (211 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x14053c560\n; > <???> @ 0x1406c6ab0\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, 0x140083500\npush    rdi                                                            ; +0x5, 0x140083505\nsub     rsp, 20h                                                       ; +0x6, 0x140083506\nmov     rdi, rcx                                                       ; +0xa, 0x14008350a\ntest    dl, dl                                                         ; +0xd, 0x14008350d\njz      short loc_14008351B                                            ; +0xf, 0x14008350f\nmov     dword ptr [rcx+0F0h], 0                                        ; +0x11, 0x140083511\nmovss   xmm1, dword ptr [rcx+0F0h]                                     ; +0x1b, 0x14008351b\nxorps   xmm0, xmm0                                                     ; +0x23, 0x140083523\nucomiss xmm1, xmm0                                                     ; +0x26, 0x140083526\njp      short loc_14008352D                                            ; +0x29, 0x140083529\njz      short loc_14008354F                                            ; +0x2b, 0x14008352b\ncall    sub_14003CF30                                                  ; +0x2d, 0x14008352d\nmovss   xmm1, dword ptr [rdi+0F0h]                                     ; +0x32, 0x140083532\ncvtps2pd xmm1, xmm1                                                    ; +0x3a, 0x14008353a\nsubsd   xmm0, xmm1                                                     ; +0x3d, 0x14008353d\nmovsd   xmm2, cs:qword_140622EC8                                       ; +0x41, 0x140083541\ncomisd  xmm2, xmm0                                                     ; +0x49, 0x140083549\nja      short loc_1400835C8                                            ; +0x4d, 0x14008354d\ncmp     byte ptr [rdi+0E8h], 0                                         ; +0x4f, 0x14008354f\njz      short loc_1400835B9                                            ; +0x56, 0x140083556\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x58, 0x140083558\ntest    rcx, rcx                                                       ; +0x5f, 0x14008355f\njnz     short loc_140083593                                            ; +0x62, 0x140083562\nmov     ecx, 668h; Size                                                ; +0x64, 0x140083564\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x69, 0x140083569\nmov     [rsp+28h+arg_0], rax                                           ; +0x6e, 0x14008356e\nmov     rcx, rax                                                       ; +0x73, 0x140083573\ncall    sub_14017AB00                                                  ; +0x76, 0x140083576\nnop                                                                    ; +0x7b, 0x14008357b\nmov     cs:qword_1406C2ED8, rax                                        ; +0x7c, 0x14008357c\nmov     rdx, [rax]                                                     ; +0x83, 0x140083583\nmov     rcx, rax                                                       ; +0x86, 0x140083586\ncall    qword ptr [rdx+48h]                                            ; +0x89, 0x140083589\nmov     rcx, cs:qword_1406C2ED8                                        ; +0x8c, 0x14008358c\ncall    GManager__save                                                 ; +0x93, 0x140083593\ncall    LocalLevelManager__sharedState                                 ; +0x98, 0x140083598\nmov     rcx, rax                                                       ; +0x9d, 0x14008359d\ncall    GManager__save                                                 ; +0xa0, 0x1400835a0\ncall    sub_14003CF30                                                  ; +0xa5, 0x1400835a5\nxorps   xmm1, xmm1                                                     ; +0xaa, 0x1400835aa\ncvtsd2ss xmm1, xmm0                                                    ; +0xad, 0x1400835ad\nmovss   dword ptr [rdi+0F0h], xmm1                                     ; +0xb1, 0x1400835b1\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0xb9, 0x1400835b9\nmov     rdx, [rax]                                                     ; +0xbf, 0x1400835bf\nmov     rcx, rax                                                       ; +0xc2, 0x1400835c2\ncall    qword ptr [rdx+38h]                                            ; +0xc5, 0x1400835c5\nmov     rbx, [rsp+28h+arg_8]                                           ; +0xc8, 0x1400835c8\nadd     rsp, 20h                                                       ; +0xcd, 0x1400835cd\npop     rdi                                                            ; +0xd1, 0x1400835d1\nretn                                                                   ; +0xd2, 0x1400835d2", "xrefs": ["<???> @ 0x14053c560", "<???> @ 0x1406c6ab0"], "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"}