{"type": "func", "start": 4302899264, "end": 4302899552, "name": "FRequestProfilePage::onClose", "pseudocode": "// \n// FRequestProfilePage::onClose from 0x100790840 to 0x100790960 (288 bytes)\n// \n// 3 xrefs:\n// > FRequestProfilePage::keyBackClicked @ 0x1007914a5\n// > sub_1007914B0 @ 0x1007914bc\n// > FRequestProfilePage::init @ 0x1007900c2\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 FRequestProfilePage::onClose(FRequestProfilePage *a1, cocos2d::CCObject *m_listLayer)\n{\n  cocos2d::CCDirector *v2; // rax\n  cocos2d::CCTouchDispatcher *v3; // rax\n  cocos2d::CCDirector *v4; // rax\n  cocos2d::CCTouchDispatcher *v5; // rax\n  GameLevelManager *v6; // rax\n  cocos2d::CCArray *StoredOnlineLevels; // rax\n  cocos2d::ccArray *data; // rax\n  __int64 num; // rcx\n  unsigned __int64 arr; // rax\n  unsigned __int64 v11; // rcx\n  _BYTE *v12; // rax\n  GJAccountManager *v13; // rax\n\n  if ( a1->m_listLayer )\n  {\n    v2 = cocos2d::CCDirector::sharedDirector();\n    v3 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *, cocos2d::CCObject *))v2->getTouchDispatcher)(\n                                         v2,\n                                         m_listLayer);\n    m_listLayer = a1->m_listLayer;\n    cocos2d::CCTouchDispatcher::unregisterForcePrio(v3, m_listLayer);\n  }\n  v4 = cocos2d::CCDirector::sharedDirector();\n  v5 = (cocos2d::CCTouchDispatcher *)((__int64 (__fastcall *)(cocos2d::CCDirector *, cocos2d::CCObject *))v4->getTouchDispatcher)(\n                                       v4,\n                                       m_listLayer);\n  cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a1);\n  v6 = GameLevelManager::sharedState();\n  if ( (a1->m_key.m_data.m_short.sizex2 & 1) != 0 )\n  {\n    StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v6, a1->m_key.m_data.m_long.longStorage);\n    if ( !StoredOnlineLevels )\n      goto LABEL_11;\n  }\n  else\n  {\n    StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v6, a1->m_key.m_data.m_short.shortStorage.__elems_);\n    if ( !StoredOnlineLevels )\n      goto LABEL_11;\n  }\n  data = StoredOnlineLevels->data;\n  num = data->num;\n  if ( data->num )\n  {\n    arr = (unsigned __int64)data->arr;\n    v11 = arr + 8 * num - 8;\n    do\n    {\n      if ( !*(_QWORD *)arr )\n        break;\n      *(_BYTE *)(*(_QWORD *)arr + 689LL) = 0;\n      arr += 8LL;\n    }\n    while ( arr <= v11 );\n  }\nLABEL_11:\n  if ( a1->m_sent )\n  {\n    v12 = FRequestProfilePage::create(0);\n  }\n  else\n  {\n    v13 = GJAccountManager::sharedState();\n    v12 = ProfilePage::create(v13->m_accountID - v13->m_unkInt1, 1);\n    v12[588] = 1;\n  }\n  (*(void (__fastcall **)(_BYTE *))(*(_QWORD *)v12 + 1288LL))(v12);\n  ((void (__fastcall *)(FRequestProfilePage *, _QWORD))a1->setKeypadEnabled)(a1, 0);\n  ((void (__fastcall *)(FRequestProfilePage *, __int64))a1->removeFromParentAndCleanup)(a1, 1);\n}", "assembly": "; \n; FRequestProfilePage::onClose from 0x100790840 to 0x100790960 (288 bytes)\n; \n; 3 xrefs:\n; > FRequestProfilePage::keyBackClicked @ 0x1007914a5\n; > sub_1007914B0 @ 0x1007914bc\n; > FRequestProfilePage::init @ 0x1007900c2\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, 0x100790840\nmov     rbp, rsp                                                       ; +0x1, 0x100790841\npush    rbx                                                            ; +0x4, 0x100790844\npush    rax                                                            ; +0x5, 0x100790845\nmov     rbx, rdi                                                       ; +0x6, 0x100790846\ncmp     qword ptr [rdi+2C8h], 0                                        ; +0x9, 0x100790849\njz      short loc_100790873                                            ; +0x11, 0x100790851\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x13, 0x100790853\nmov     rcx, [rax]                                                     ; +0x18, 0x100790858\nmov     rdi, rax                                                       ; +0x1b, 0x10079085b\ncall    qword ptr [rcx+0A0h]                                           ; +0x1e, 0x10079085e\nmov     rsi, [rbx+2C8h]                                                ; +0x24, 0x100790864\nmov     rdi, rax                                                       ; +0x2b, 0x10079086b\ncall    cocos2d__CCTouchDispatcher__unregisterForcePrio                ; +0x2e, 0x10079086e\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x33, 0x100790873\nmov     rcx, [rax]                                                     ; +0x38, 0x100790878\nmov     rdi, rax                                                       ; +0x3b, 0x10079087b\ncall    qword ptr [rcx+0A0h]                                           ; +0x3e, 0x10079087e\nmov     rdi, rax                                                       ; +0x44, 0x100790884\nmov     rsi, rbx                                                       ; +0x47, 0x100790887\ncall    cocos2d__CCTouchDispatcher__unregisterForcePrio                ; +0x4a, 0x10079088a\ncall    GameLevelManager__sharedState                                  ; +0x4f, 0x10079088f\ntest    byte ptr [rbx+2A0h], 1                                         ; +0x54, 0x100790894\njnz     short loc_1007908B3                                            ; +0x5b, 0x10079089b\nlea     rsi, [rbx+2A1h]                                                ; +0x5d, 0x10079089d\nmov     rdi, rax                                                       ; +0x64, 0x1007908a4\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x67, 0x1007908a7\ntest    rax, rax                                                       ; +0x6c, 0x1007908ac\njnz     short loc_1007908C7                                            ; +0x6f, 0x1007908af\njmp     short loc_1007908F8                                            ; +0x71, 0x1007908b1\nmov     rsi, [rbx+2B0h]                                                ; +0x73, 0x1007908b3\nmov     rdi, rax                                                       ; +0x7a, 0x1007908ba\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x7d, 0x1007908bd\ntest    rax, rax                                                       ; +0x82, 0x1007908c2\njz      short loc_1007908F8                                            ; +0x85, 0x1007908c5\nmov     rax, [rax+38h]                                                 ; +0x87, 0x1007908c7\nmov     ecx, [rax]                                                     ; +0x8b, 0x1007908cb\ntest    rcx, rcx                                                       ; +0x8d, 0x1007908cd\njz      short loc_1007908F8                                            ; +0x90, 0x1007908d0\nmov     rax, [rax+10h]                                                 ; +0x92, 0x1007908d2\nlea     rcx, [rax+rcx*8]                                               ; +0x96, 0x1007908d6\nadd     rcx, 0FFFFFFFFFFFFFFF8h                                        ; +0x9a, 0x1007908da\nxchg    ax, ax                                                         ; +0x9e, 0x1007908de\nmov     rdx, [rax]                                                     ; +0xa0, 0x1007908e0\ntest    rdx, rdx                                                       ; +0xa3, 0x1007908e3\njz      short loc_1007908F8                                            ; +0xa6, 0x1007908e6\nmov     byte ptr [rdx+2B1h], 0                                         ; +0xa8, 0x1007908e8\nadd     rax, 8                                                         ; +0xaf, 0x1007908ef\ncmp     rax, rcx                                                       ; +0xb3, 0x1007908f3\njbe     short loc_1007908E0                                            ; +0xb6, 0x1007908f6\ncmp     byte ptr [rbx+298h], 0                                         ; +0xb8, 0x1007908f8\njz      short loc_10079090A                                            ; +0xbf, 0x1007908ff\nxor     edi, edi                                                       ; +0xc1, 0x100790901\ncall    FRequestProfilePage__create                                    ; +0xc3, 0x100790903\njmp     short loc_10079092C                                            ; +0xc8, 0x100790908\ncall    GJAccountManager__sharedState                                  ; +0xca, 0x10079090a\nmov     edi, [rax+160h]                                                ; +0xcf, 0x10079090f\nsub     edi, [rax+164h]                                                ; +0xd5, 0x100790915\nmov     esi, 1                                                         ; +0xdb, 0x10079091b\ncall    ProfilePage__create                                            ; +0xe0, 0x100790920\nmov     byte ptr [rax+24Ch], 1                                         ; +0xe5, 0x100790925\nmov     rcx, [rax]                                                     ; +0xec, 0x10079092c\nmov     rdi, rax                                                       ; +0xef, 0x10079092f\ncall    qword ptr [rcx+508h]                                           ; +0xf2, 0x100790932\nmov     rax, [rbx]                                                     ; +0xf8, 0x100790938\nmov     rdi, rbx                                                       ; +0xfb, 0x10079093b\nxor     esi, esi                                                       ; +0xfe, 0x10079093e\ncall    qword ptr [rax+420h]                                           ; +0x100, 0x100790940\nmov     rax, [rbx]                                                     ; +0x106, 0x100790946\nmov     rax, [rax+200h]                                                ; +0x109, 0x100790949\nmov     rdi, rbx                                                       ; +0x110, 0x100790950\nmov     esi, 1                                                         ; +0x113, 0x100790953\nadd     rsp, 8                                                         ; +0x118, 0x100790958\npop     rbx                                                            ; +0x11c, 0x10079095c\npop     rbp                                                            ; +0x11d, 0x10079095d\njmp     rax                                                            ; +0x11e, 0x10079095e", "xrefs": ["FRequestProfilePage::keyBackClicked @ 0x1007914a5", "sub_1007914B0 @ 0x1007914bc", "FRequestProfilePage::init @ 0x1007900c2"], "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"}