{"type": "func", "start": 4301636448, "end": 4301636691, "name": "AppDelegate::applicationDidEnterBackground", "pseudocode": "// \n// AppDelegate::applicationDidEnterBackground from 0x10065c360 to 0x10065c453 (243 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x100986b30\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\nvoid __fastcall AppDelegate::applicationDidEnterBackground(AppDelegate *a1)\n{\n  FMODAudioEngine *v1; // rax\n  FMODAudioEngine *v2; // rax\n  FMODAudioEngine *v3; // rax\n  FMODAudioEngine *v4; // rax\n  cocos2d::CCScene *m_pRunningScene; // rax\n  GameManager *v6; // rax\n  cocos2d::CCDirector *v7; // rax\n  cocos2d::CCDirector *v8; // rax\n  GameManager *v9; // rax\n\n  v1 = FMODAudioEngine::sharedEngine();\n  FMODAudioEngine::pauseAllEffects(v1);\n  if ( a1->m_loadingFinished )\n  {\n    v2 = FMODAudioEngine::sharedEngine();\n    FMODAudioEngine::pauseAllMusic(v2, 1);\n  }\n  v3 = FMODAudioEngine::sharedEngine();\n  FMODAudioEngine::stop(v3);\n  v4 = FMODAudioEngine::sharedEngine();\n  ((void (__fastcall *)(FMODAudioEngine *, double))v4->update)(v4, 0.0);\n  m_pRunningScene = cocos2d::CCDirector::sharedDirector()->m_pRunningScene;\n  if ( m_pRunningScene\n    && m_pRunningScene->m_eObjType == PlayLayerObjectType\n    && GameManager::sharedState()->m_playLayer\n    && !GameManager::sharedState()->m_playLayer->m_hasCompletedLevel\n    && !cocos2d::CCApplication::sharedApplication()[1].m_resourceRootPath.m_data.m_short.shortStorage.__elems_[0] )\n  {\n    v6 = GameManager::sharedState();\n    PlayLayer::pauseGame(v6->m_playLayer, 1);\n  }\n  ((void (__fastcall *)(AppDelegate *, _QWORD))a1->trySaveGame)(a1, 0);\n  v7 = cocos2d::CCDirector::sharedDirector();\n  ((void (__fastcall *)(cocos2d::CCDirector *))v7->stopAnimation)(v7);\n  v8 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::pause(v8);\n  if ( a1->m_loadingFinished )\n  {\n    PlatformToolbox::onNativePause();\n    v9 = GameManager::sharedState();\n    GameManager::applicationDidEnterBackground(v9);\n  }\n}", "assembly": "; \n; AppDelegate::applicationDidEnterBackground from 0x10065c360 to 0x10065c453 (243 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x100986b30\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\npush    rbp                                                            ; +0x0, 0x10065c360\nmov     rbp, rsp                                                       ; +0x1, 0x10065c361\npush    rbx                                                            ; +0x4, 0x10065c364\npush    rax                                                            ; +0x5, 0x10065c365\nmov     rbx, rdi                                                       ; +0x6, 0x10065c366\ncall    FMODAudioEngine__sharedEngine                                  ; +0x9, 0x10065c369\nmov     rdi, rax                                                       ; +0xe, 0x10065c36e\ncall    FMODAudioEngine__pauseAllEffects                               ; +0x11, 0x10065c371\ncmp     byte ptr [rbx+50h], 1                                          ; +0x16, 0x10065c376\njnz     short loc_10065C38E                                            ; +0x1a, 0x10065c37a\ncall    FMODAudioEngine__sharedEngine                                  ; +0x1c, 0x10065c37c\nmov     rdi, rax                                                       ; +0x21, 0x10065c381\nmov     esi, 1                                                         ; +0x24, 0x10065c384\ncall    FMODAudioEngine__pauseAllMusic                                 ; +0x29, 0x10065c389\ncall    FMODAudioEngine__sharedEngine                                  ; +0x2e, 0x10065c38e\nmov     rdi, rax                                                       ; +0x33, 0x10065c393\ncall    FMODAudioEngine__stop                                          ; +0x36, 0x10065c396\ncall    FMODAudioEngine__sharedEngine                                  ; +0x3b, 0x10065c39b\nmov     rcx, [rax]                                                     ; +0x40, 0x10065c3a0\nxorps   xmm0, xmm0                                                     ; +0x43, 0x10065c3a3\nmov     rdi, rax                                                       ; +0x46, 0x10065c3a6\ncall    qword ptr [rcx+28h]                                            ; +0x49, 0x10065c3a9\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x4c, 0x10065c3ac\nmov     rax, [rax+108h]                                                ; +0x51, 0x10065c3b1\ntest    rax, rax                                                       ; +0x58, 0x10065c3b8\njz      short loc_10065C408                                            ; +0x5b, 0x10065c3bb\ncmp     dword ptr [rax+1Ch], 5                                         ; +0x5d, 0x10065c3bd\njnz     short loc_10065C408                                            ; +0x61, 0x10065c3c1\ncall    GameManager__sharedState                                       ; +0x63, 0x10065c3c3\ncmp     qword ptr [rax+1F8h], 0                                        ; +0x68, 0x10065c3c8\njz      short loc_10065C408                                            ; +0x70, 0x10065c3d0\ncall    GameManager__sharedState                                       ; +0x72, 0x10065c3d2\nmov     rax, [rax+1F8h]                                                ; +0x77, 0x10065c3d7\ncmp     byte ptr [rax+3735h], 0                                        ; +0x7e, 0x10065c3de\njnz     short loc_10065C408                                            ; +0x85, 0x10065c3e5\ncall    cocos2d__CCApplication__sharedApplication                      ; +0x87, 0x10065c3e7\ncmp     byte ptr [rax+41h], 0                                          ; +0x8c, 0x10065c3ec\njnz     short loc_10065C408                                            ; +0x90, 0x10065c3f0\ncall    GameManager__sharedState                                       ; +0x92, 0x10065c3f2\nmov     rdi, [rax+1F8h]                                                ; +0x97, 0x10065c3f7\nmov     esi, 1                                                         ; +0x9e, 0x10065c3fe\ncall    PlayLayer__pauseGame                                           ; +0xa3, 0x10065c403\nmov     rax, [rbx]                                                     ; +0xa8, 0x10065c408\nmov     rdi, rbx                                                       ; +0xab, 0x10065c40b\nxor     esi, esi                                                       ; +0xae, 0x10065c40e\ncall    qword ptr [rax+38h]                                            ; +0xb0, 0x10065c410\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xb3, 0x10065c413\nmov     rcx, [rax]                                                     ; +0xb8, 0x10065c418\nmov     rdi, rax                                                       ; +0xbb, 0x10065c41b\ncall    qword ptr [rcx+68h]                                            ; +0xbe, 0x10065c41e\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xc1, 0x10065c421\nmov     rdi, rax                                                       ; +0xc6, 0x10065c426\ncall    cocos2d__CCDirector__pause                                     ; +0xc9, 0x10065c429\ncmp     byte ptr [rbx+50h], 1                                          ; +0xce, 0x10065c42e\njnz     short loc_10065C44C                                            ; +0xd2, 0x10065c432\ncall    PlatformToolbox__onNativePause                                 ; +0xd4, 0x10065c434\ncall    GameManager__sharedState                                       ; +0xd9, 0x10065c439\nmov     rdi, rax                                                       ; +0xde, 0x10065c43e\nadd     rsp, 8                                                         ; +0xe1, 0x10065c441\npop     rbx                                                            ; +0xe5, 0x10065c445\npop     rbp                                                            ; +0xe6, 0x10065c446\njmp     GameManager__applicationDidEnterBackground                     ; +0xe7, 0x10065c447\nadd     rsp, 8                                                         ; +0xec, 0x10065c44c\npop     rbx                                                            ; +0xf0, 0x10065c450\npop     rbp                                                            ; +0xf1, 0x10065c451\nretn                                                                   ; +0xf2, 0x10065c452", "xrefs": ["<???> @ 0x100986b30"], "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"}