{"type": "func", "start": 4296764784, "end": 4296765260, "name": "FRequestProfilePage::loadPage", "pseudocode": "// \n// FRequestProfilePage::loadPage from 0x1001b6d70 to 0x1001b6f4c (476 bytes)\n// \n// 5 xrefs:\n// > FRequestProfilePage::init @ 0x1001b6960\n// > FRequestProfilePage::onPrevPage @ 0x1001b6cfc\n// > FRequestProfilePage::onNextPage @ 0x1001b6d08\n// > FRequestProfilePage::forceReloadRequests @ 0x1001b7718\n// > sub_1001B7720 @ 0x1001b7734\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::loadPage(FRequestProfilePage *a1, int a2)\n{\n  GameLevelManager *v4; // x0\n  char *FriendRequestKey; // x0\n  std::size_t size; // x8\n  std::string *p_m_key; // x21\n  GameLevelManager *v8; // x0\n  std::string *capacitym1; // x1\n  _BOOL8 v10; // x1\n  GameLevelManager *v11; // x0\n  std::string *v12; // x1\n  cocos2d::CCArray *StoredOnlineLevels; // x22\n  GameLevelManager *v14; // x0\n  std::string *v15; // x1\n  char *PageInfo; // x0\n  std::string *v17; // x2\n  GameLevelManager *v18; // x0\n  void *__p[2]; // [xsp+0h] [xbp-50h] BYREF\n  char v20; // [xsp+17h] [xbp-39h]\n  std::string __str; // [xsp+18h] [xbp-38h] BYREF\n\n  v4 = GameLevelManager::sharedState();\n  FriendRequestKey = (char *)GameLevelManager::getFriendRequestKey(v4, a1->m_sent, a2);\n  sub_100009900(&__str, FriendRequestKey);\n  size = a1->m_key.m_data.m_short.shortStorage.__elems_[22];\n  if ( (size & 0x8000000000000000LL) != 0 )\n    size = a1->m_key.m_data.m_long.size;\n  p_m_key = &a1->m_key;\n  if ( size && !sub_1000045BC(&__str, &a1->m_key.m_data.m_long.capacitym1) )\n    FRequestProfilePage::untoggleAll(a1);\n  std::string::operator=((std::string *)&a1->m_key, &__str);\n  ((void (__fastcall *)(LoadingCircle *, __int64))a1->m_circle->setVisible)(a1->m_circle, 1);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))a1->m_refreshButton->setVisible)(a1->m_refreshButton, 0);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _QWORD))a1->m_errorLabel->setVisible)(a1->m_errorLabel, 0);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, bool))a1->m_prevButton->setVisible)(a1->m_prevButton, a2 > 0);\n  v8 = GameLevelManager::sharedState();\n  capacitym1 = &a1->m_key;\n  if ( a1->m_key.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    capacitym1 = (std::string *)p_m_key->m_data.m_long.capacitym1;\n  v10 = GameLevelManager::getStoredOnlineLevels(v8, (const char *)capacitym1) != nullptr;\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, _BOOL8))a1->m_nextButton->setVisible)(a1->m_nextButton, v10);\n  v11 = GameLevelManager::sharedState();\n  v12 = &a1->m_key;\n  if ( a1->m_key.m_data.m_short.shortStorage.__elems_[22] < 0 )\n    v12 = (std::string *)p_m_key->m_data.m_long.capacitym1;\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v11, (const char *)v12);\n  if ( StoredOnlineLevels )\n  {\n    v14 = GameLevelManager::sharedState();\n    v15 = &a1->m_key;\n    if ( a1->m_key.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      v15 = (std::string *)p_m_key->m_data.m_long.capacitym1;\n    PageInfo = (char *)GameLevelManager::getPageInfo(v14, (const char *)v15);\n    sub_100009900(__p, PageInfo);\n    v17 = &a1->m_key;\n    if ( a1->m_key.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      v17 = (std::string *)p_m_key->m_data.m_long.capacitym1;\n    ((void (__fastcall *)(FRequestProfilePage *, void **, std::string *))a1->setupPageInfo)(a1, __p, v17);\n    if ( v20 < 0 )\n      operator delete(__p[0]);\n    if ( a1->m_key.m_data.m_short.shortStorage.__elems_[22] < 0 )\n      p_m_key = (std::string *)p_m_key->m_data.m_long.capacitym1;\n    ((void (__fastcall *)(FRequestProfilePage *, cocos2d::CCArray *, std::string *))a1->loadFRequestsFinished)(\n      a1,\n      StoredOnlineLevels,\n      p_m_key);\n  }\n  else\n  {\n    FRequestProfilePage::setupCommentsBrowser(a1, nullptr);\n    v18 = GameLevelManager::sharedState();\n    GameLevelManager::getFriendRequests(v18, a1->m_sent, a2, a1->m_itemCount);\n  }\n  a1->m_page = a2;\n  if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )\n    operator delete(__str.__r_.__value_.__l.__data_);\n}", "assembly": "; \n; FRequestProfilePage::loadPage from 0x1001b6d70 to 0x1001b6f4c (476 bytes)\n; \n; 5 xrefs:\n; > FRequestProfilePage::init @ 0x1001b6960\n; > FRequestProfilePage::onPrevPage @ 0x1001b6cfc\n; > FRequestProfilePage::onNextPage @ 0x1001b6d08\n; > FRequestProfilePage::forceReloadRequests @ 0x1001b7718\n; > sub_1001B7720 @ 0x1001b7734\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\nSUB             SP, SP, #0x60                                          ; +0x0, 0x1001b6d70\nSTP             X22, X21, [SP,#0x50+var_20]                            ; +0x4, 0x1001b6d74\nSTP             X20, X19, [SP,#0x50+var_10]                            ; +0x8, 0x1001b6d78\nSTP             X29, X30, [SP,#0x50+var_s0]                            ; +0xc, 0x1001b6d7c\nADD             X29, SP, #0x50                                         ; +0x10, 0x1001b6d80\nMOV             X19, X1                                                ; +0x14, 0x1001b6d84\nMOV             X20, X0                                                ; +0x18, 0x1001b6d88\nBL              GameLevelManager__sharedState                          ; +0x1c, 0x1001b6d8c\nLDRB            W1, [X20,#0x298]                                       ; +0x20, 0x1001b6d90\nMOV             X2, X19                                                ; +0x24, 0x1001b6d94\nBL              GameLevelManager__getFriendRequestKey                  ; +0x28, 0x1001b6d98\nMOV             X1, X0; __s                                            ; +0x2c, 0x1001b6d9c\nADD             X0, SP, #0x50+__str; int                               ; +0x30, 0x1001b6da0\nBL              sub_100009900                                          ; +0x34, 0x1001b6da4\nLDRSB           X8, [X20,#0x2B7]                                       ; +0x38, 0x1001b6da8\nTBZ             X8, #0x3F, loc_1001B6DB4 ; '?'                         ; +0x3c, 0x1001b6dac\nLDR             X8, [X20,#0x2A8]                                       ; +0x40, 0x1001b6db0\nADD             X21, X20, #0x2A0                                       ; +0x44, 0x1001b6db4\nCBZ             X8, loc_1001B6DD4                                      ; +0x48, 0x1001b6db8\nADD             X0, SP, #0x50+__str                                    ; +0x4c, 0x1001b6dbc\nMOV             X1, X21                                                ; +0x50, 0x1001b6dc0\nBL              sub_1000045BC                                          ; +0x54, 0x1001b6dc4\nTBNZ            W0, #0, loc_1001B6DD4                                  ; +0x58, 0x1001b6dc8\nMOV             X0, X20                                                ; +0x5c, 0x1001b6dcc\nBL              FRequestProfilePage__untoggleAll                       ; +0x60, 0x1001b6dd0\nADD             X1, SP, #0x50+__str; __str                             ; +0x64, 0x1001b6dd4\nMOV             X0, X21; this                                          ; +0x68, 0x1001b6dd8\nBL              __ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEaSERKS5_; std::string::operator=(std::string const&) ; +0x6c, 0x1001b6ddc\nLDR             X0, [X20,#0x2D0]                                       ; +0x70, 0x1001b6de0\nLDR             X8, [X0]                                               ; +0x74, 0x1001b6de4\nLDR             X8, [X8,#0x148]                                        ; +0x78, 0x1001b6de8\nMOV             W1, #1                                                 ; +0x7c, 0x1001b6dec\nBLR             X8                                                     ; +0x80, 0x1001b6df0\nLDR             X0, [X20,#0x2F8]                                       ; +0x84, 0x1001b6df4\nLDR             X8, [X0]                                               ; +0x88, 0x1001b6df8\nLDR             X8, [X8,#0x148]                                        ; +0x8c, 0x1001b6dfc\nMOV             W1, #0                                                 ; +0x90, 0x1001b6e00\nBLR             X8                                                     ; +0x94, 0x1001b6e04\nLDR             X0, [X20,#0x2C0]                                       ; +0x98, 0x1001b6e08\nLDR             X8, [X0]                                               ; +0x9c, 0x1001b6e0c\nLDR             X8, [X8,#0x148]                                        ; +0xa0, 0x1001b6e10\nMOV             W1, #0                                                 ; +0xa4, 0x1001b6e14\nBLR             X8                                                     ; +0xa8, 0x1001b6e18\nCMP             W19, #0                                                ; +0xac, 0x1001b6e1c\nCSET            W1, GT                                                 ; +0xb0, 0x1001b6e20\nLDR             X0, [X20,#0x2F0]                                       ; +0xb4, 0x1001b6e24\nLDR             X8, [X0]                                               ; +0xb8, 0x1001b6e28\nLDR             X8, [X8,#0x148]                                        ; +0xbc, 0x1001b6e2c\nBLR             X8                                                     ; +0xc0, 0x1001b6e30\nBL              GameLevelManager__sharedState                          ; +0xc4, 0x1001b6e34\nLDRSB           W8, [X20,#0x2B7]                                       ; +0xc8, 0x1001b6e38\nMOV             X1, X21                                                ; +0xcc, 0x1001b6e3c\nTBZ             W8, #0x1F, loc_1001B6E48                               ; +0xd0, 0x1001b6e40\nLDR             X1, [X21]                                              ; +0xd4, 0x1001b6e44\nBL              GameLevelManager__getStoredOnlineLevels                ; +0xd8, 0x1001b6e48\nCMP             X0, #0                                                 ; +0xdc, 0x1001b6e4c\nCSET            W1, NE                                                 ; +0xe0, 0x1001b6e50\nLDR             X0, [X20,#0x2E8]                                       ; +0xe4, 0x1001b6e54\nLDR             X8, [X0]                                               ; +0xe8, 0x1001b6e58\nLDR             X8, [X8,#0x148]                                        ; +0xec, 0x1001b6e5c\nBLR             X8                                                     ; +0xf0, 0x1001b6e60\nBL              GameLevelManager__sharedState                          ; +0xf4, 0x1001b6e64\nLDRSB           W8, [X20,#0x2B7]                                       ; +0xf8, 0x1001b6e68\nMOV             X1, X21                                                ; +0xfc, 0x1001b6e6c\nTBZ             W8, #0x1F, loc_1001B6E78                               ; +0x100, 0x1001b6e70\nLDR             X1, [X21]                                              ; +0x104, 0x1001b6e74\nBL              GameLevelManager__getStoredOnlineLevels                ; +0x108, 0x1001b6e78\nMOV             X22, X0                                                ; +0x10c, 0x1001b6e7c\nCBZ             X0, loc_1001B6F04                                      ; +0x110, 0x1001b6e80\nBL              GameLevelManager__sharedState                          ; +0x114, 0x1001b6e84\nLDRSB           W8, [X20,#0x2B7]                                       ; +0x118, 0x1001b6e88\nMOV             X1, X21                                                ; +0x11c, 0x1001b6e8c\nTBZ             W8, #0x1F, loc_1001B6E98                               ; +0x120, 0x1001b6e90\nLDR             X1, [X21]                                              ; +0x124, 0x1001b6e94\nBL              GameLevelManager__getPageInfo                          ; +0x128, 0x1001b6e98\nMOV             X1, X0; __s                                            ; +0x12c, 0x1001b6e9c\nMOV             X0, SP; int                                            ; +0x130, 0x1001b6ea0\nBL              sub_100009900                                          ; +0x134, 0x1001b6ea4\nLDRSB           W8, [X20,#0x2B7]                                       ; +0x138, 0x1001b6ea8\nMOV             X2, X21                                                ; +0x13c, 0x1001b6eac\nTBZ             W8, #0x1F, loc_1001B6EB8                               ; +0x140, 0x1001b6eb0\nLDR             X2, [X21]                                              ; +0x144, 0x1001b6eb4\nLDR             X8, [X20]                                              ; +0x148, 0x1001b6eb8\nLDR             X8, [X8,#0x540]                                        ; +0x14c, 0x1001b6ebc\nMOV             X1, SP                                                 ; +0x150, 0x1001b6ec0\nMOV             X0, X20                                                ; +0x154, 0x1001b6ec4\nBLR             X8                                                     ; +0x158, 0x1001b6ec8\nLDRSB           W8, [SP,#0x50+var_39]                                  ; +0x15c, 0x1001b6ecc\nTBZ             W8, #0x1F, loc_1001B6EDC                               ; +0x160, 0x1001b6ed0\nLDR             X0, [SP,#0x50+__p]; __p                                ; +0x164, 0x1001b6ed4\nBL              __ZdlPv; operator delete(void *)                       ; +0x168, 0x1001b6ed8\nLDRSB           W8, [X20,#0x2B7]                                       ; +0x16c, 0x1001b6edc\nTBZ             W8, #0x1F, loc_1001B6EE8                               ; +0x170, 0x1001b6ee0\nLDR             X21, [X21]                                             ; +0x174, 0x1001b6ee4\nLDR             X8, [X20]                                              ; +0x178, 0x1001b6ee8\nLDR             X8, [X8,#0x530]                                        ; +0x17c, 0x1001b6eec\nMOV             X0, X20                                                ; +0x180, 0x1001b6ef0\nMOV             X1, X22                                                ; +0x184, 0x1001b6ef4\nMOV             X2, X21                                                ; +0x188, 0x1001b6ef8\nBLR             X8                                                     ; +0x18c, 0x1001b6efc\nB               loc_1001B6F24                                          ; +0x190, 0x1001b6f00\nMOV             X0, X20                                                ; +0x194, 0x1001b6f04\nMOV             X1, #0                                                 ; +0x198, 0x1001b6f08\nBL              FRequestProfilePage__setupCommentsBrowser              ; +0x19c, 0x1001b6f0c\nBL              GameLevelManager__sharedState                          ; +0x1a0, 0x1001b6f10\nLDRB            W1, [X20,#0x298]                                       ; +0x1a4, 0x1001b6f14\nLDR             W3, [X20,#0x300]                                       ; +0x1a8, 0x1001b6f18\nMOV             X2, X19                                                ; +0x1ac, 0x1001b6f1c\nBL              GameLevelManager__getFriendRequests                    ; +0x1b0, 0x1001b6f20\nSTR             W19, [X20,#0x30C]                                      ; +0x1b4, 0x1001b6f24\nLDRSB           W8, [SP,#0x50+__str.__r_.__value_+0x17]                ; +0x1b8, 0x1001b6f28\nTBZ             W8, #0x1F, loc_1001B6F38                               ; +0x1bc, 0x1001b6f2c\nLDR             X0, [SP,#0x50+__str]; __p                              ; +0x1c0, 0x1001b6f30\nBL              __ZdlPv; operator delete(void *)                       ; +0x1c4, 0x1001b6f34\nLDP             X29, X30, [SP,#0x50+var_s0]                            ; +0x1c8, 0x1001b6f38\nLDP             X20, X19, [SP,#0x50+var_10]                            ; +0x1cc, 0x1001b6f3c\nLDP             X22, X21, [SP,#0x50+var_20]                            ; +0x1d0, 0x1001b6f40\nADD             SP, SP, #0x60 ; '`'                                    ; +0x1d4, 0x1001b6f44\nRET                                                                    ; +0x1d8, 0x1001b6f48", "xrefs": ["FRequestProfilePage::init @ 0x1001b6960", "FRequestProfilePage::onPrevPage @ 0x1001b6cfc", "FRequestProfilePage::onNextPage @ 0x1001b6d08", "FRequestProfilePage::forceReloadRequests @ 0x1001b7718", "sub_1001B7720 @ 0x1001b7734"], "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"}