{"type": "func", "start": 5372082864, "end": 5372083050, "name": "MessagesProfilePage::onClose", "pseudocode": "// \n// MessagesProfilePage::onClose from 0x140337ab0 to 0x140337b6a (186 bytes)\n// \n// 3 xrefs:\n// > MessagesProfilePage::keyBackClicked @ 0x140337b79\n// > MessagesProfilePage::init @ 0x1403369bd\n// > <???> @ 0x1406d52a0\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 MessagesProfilePage::onClose(MessagesProfilePage *a1, cocos2d::CCObject *a2)\n{\n  __int64 v3; // rax\n  cocos2d::CCTouchDispatcher *v4; // rax\n  __int64 v5; // rax\n  cocos2d::CCTouchDispatcher *v6; // rax\n  GJAccountManager *v7; // rax\n  _BYTE *v8; // rax\n  _BOOL8 v9; // rdx\n\n  if ( a1->m_listLayer )\n  {\n    v3 = cocos2d::CCDirector::sharedDirector(a1);\n    v4 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v3 + 144LL))(v3);\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v4, a1->m_listLayer);\n  }\n  v5 = cocos2d::CCDirector::sharedDirector(a1);\n  v6 = (cocos2d::CCTouchDispatcher *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 144LL))(v5);\n  cocos2d::CCTouchDispatcher::unregisterForcePrio(v6, a1);\n  MessagesProfilePage::untoggleAll(a1);\n  if ( a1->m_sentMessages )\n  {\n    v8 = MessagesProfilePage::create(0);\n  }\n  else\n  {\n    v7 = GJAccountManager::sharedState();\n    v8 = ProfilePage::create(v7->m_accountID - v7->m_unkInt1, 1);\n    v8[588] = 1;\n  }\n  (*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v8 + 1040LL))(v8);\n  a1->setKeypadEnabled(a1, 0);\n  LOBYTE(v9) = 1;\n  a1->removeFromParentAndCleanup(a1, v9);\n}", "assembly": "; \n; MessagesProfilePage::onClose from 0x140337ab0 to 0x140337b6a (186 bytes)\n; \n; 3 xrefs:\n; > MessagesProfilePage::keyBackClicked @ 0x140337b79\n; > MessagesProfilePage::init @ 0x1403369bd\n; > <???> @ 0x1406d52a0\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    rbx                                                            ; +0x0, 0x140337ab0\nsub     rsp, 20h                                                       ; +0x2, 0x140337ab2\ncmp     qword ptr [rcx+2D0h], 0                                        ; +0x6, 0x140337ab6\nmov     rbx, rcx                                                       ; +0xe, 0x140337abe\njz      short loc_140337AE5                                            ; +0x11, 0x140337ac1\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x13, 0x140337ac3\nmov     rcx, rax                                                       ; +0x19, 0x140337ac9\nmov     rdx, [rax]                                                     ; +0x1c, 0x140337acc\ncall    qword ptr [rdx+90h]                                            ; +0x1f, 0x140337acf\nmov     rdx, [rbx+2D0h]                                                ; +0x25, 0x140337ad5\nmov     rcx, rax                                                       ; +0x2c, 0x140337adc\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x2f, 0x140337adf\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x35, 0x140337ae5\nmov     rcx, rax                                                       ; +0x3b, 0x140337aeb\nmov     rdx, [rax]                                                     ; +0x3e, 0x140337aee\ncall    qword ptr [rdx+90h]                                            ; +0x41, 0x140337af1\nmov     rcx, rax                                                       ; +0x47, 0x140337af7\nmov     rdx, rbx                                                       ; +0x4a, 0x140337afa\ncall    cs:?unregisterForcePrio@CCTouchDispatcher@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCTouchDispatcher::unregisterForcePrio(cocos2d::CCObject *) ; +0x4d, 0x140337afd\nmov     rcx, rbx                                                       ; +0x53, 0x140337b03\ncall    MessagesProfilePage__untoggleAll                               ; +0x56, 0x140337b06\ncmp     byte ptr [rbx+298h], 0                                         ; +0x5b, 0x140337b0b\njnz     short loc_140337B35                                            ; +0x62, 0x140337b12\ncall    GJAccountManager__sharedState                                  ; +0x64, 0x140337b14\nmov     dl, 1                                                          ; +0x69, 0x140337b19\nmov     ecx, [rax+168h]                                                ; +0x6b, 0x140337b1b\nsub     ecx, [rax+16Ch]                                                ; +0x71, 0x140337b21\ncall    ProfilePage__create                                            ; +0x77, 0x140337b27\nmov     byte ptr [rax+24Ch], 1                                         ; +0x7c, 0x140337b2c\njmp     short loc_140337B3C                                            ; +0x83, 0x140337b33\nxor     ecx, ecx                                                       ; +0x85, 0x140337b35\ncall    MessagesProfilePage__create                                    ; +0x87, 0x140337b37\nmov     rdx, [rax]                                                     ; +0x8c, 0x140337b3c\nmov     rcx, rax                                                       ; +0x8f, 0x140337b3f\ncall    qword ptr [rdx+410h]                                           ; +0x92, 0x140337b42\nmov     rax, [rbx]                                                     ; +0x98, 0x140337b48\nxor     edx, edx                                                       ; +0x9b, 0x140337b4b\nmov     rcx, rbx                                                       ; +0x9d, 0x140337b4d\ncall    qword ptr [rax+3D0h]                                           ; +0xa0, 0x140337b50\nmov     rax, [rbx]                                                     ; +0xa6, 0x140337b56\nmov     dl, 1                                                          ; +0xa9, 0x140337b59\nmov     rcx, rbx                                                       ; +0xab, 0x140337b5b\nadd     rsp, 20h                                                       ; +0xae, 0x140337b5e\npop     rbx                                                            ; +0xb2, 0x140337b62\njmp     qword ptr [rax+1F8h]                                           ; +0xb3, 0x140337b63", "xrefs": ["MessagesProfilePage::keyBackClicked @ 0x140337b79", "MessagesProfilePage::init @ 0x1403369bd", "<???> @ 0x1406d52a0"], "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"}