{"type": "func", "start": 4990468, "end": 4990808, "name": "FRequestProfilePage::loadPage", "pseudocode": "// \n// FRequestProfilePage::loadPage from 0x4c2604 to 0x4c2758 (340 bytes)\n// \n// 4 xrefs:\n// > sub_4C275C @ 0x4c2f20\n// > FRequestProfilePage::forceReloadRequests @ 0x4c31cc\n// > FRequestProfilePage::onNextPage @ 0x4c31e0\n// > FRequestProfilePage::onPrevPage @ 0x4c31ea\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 FRequestProfilePage::loadPage(FRequestProfilePage *a1, int a2)\n{\n  std::string *p_m_key; // r9\n  GameLevelManager *v5; // r0\n  char *FriendRequestKey; // r0\n  GameLevelManager *v7; // r0\n  cocos2d::CCArray *StoredOnlineLevels; // r0\n  GameLevelManager *v9; // r0\n  cocos2d::CCArray *v10; // r9\n  void (__fastcall *setupPageInfo)(FRequestProfilePage *__hidden, std::string, const unsigned __int8 *); // r10\n  GameLevelManager *v12; // r0\n  char *PageInfo; // r0\n  int v14; // r3\n  GameLevelManager *v15; // r0\n  int v17; // [sp+4h] [bp-4h] BYREF\n  int v18; // [sp+8h] [bp+0h] BYREF\n\n  v17 = a2;\n  p_m_key = &a1->m_key;\n  v5 = GameLevelManager::sharedState();\n  FriendRequestKey = (char *)GameLevelManager::getFriendRequestKey(v5, a1->m_sent, a2);\n  sub_776584((int)&v17, FriendRequestKey);\n  if ( *((_DWORD *)a1->m_key.m_data.m_data - 3) && sub_774DBC(&v17, p_m_key) )\n    FRequestProfilePage::untoggleAll(a1);\n  sub_775D40(p_m_key, &v17);\n  a1->m_circle->setVisible(a1->m_circle, 1);\n  a1->m_refreshButton->setVisible(a1->m_refreshButton, 0);\n  a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);\n  a1->m_prevButton->setVisible(a1->m_prevButton, a2 > 0);\n  v7 = GameLevelManager::sharedState();\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v7, (const char *)a1->m_key.m_data.m_data);\n  a1->m_nextButton->setVisible(a1->m_nextButton, StoredOnlineLevels != nullptr);\n  v9 = GameLevelManager::sharedState();\n  v10 = GameLevelManager::getStoredOnlineLevels(v9, (const char *)a1->m_key.m_data.m_data);\n  if ( v10 )\n  {\n    setupPageInfo = a1->setupPageInfo;\n    v12 = GameLevelManager::sharedState();\n    PageInfo = (char *)GameLevelManager::getPageInfo(v12, (const char *)a1->m_key.m_data.m_data);\n    sub_776584((int)&v18, PageInfo);\n    ((void (__fastcall *)(FRequestProfilePage *, int *, stl::StringData<char>::Internal *, int, FRequestProfilePage *, int))setupPageInfo)(\n      a1,\n      &v18,\n      a1->m_key.m_data.m_data,\n      v14,\n      a1,\n      v17);\n    sub_774008(&v18);\n    a1->loadFRequestsFinished(a1, v10, (const unsigned __int8 *)a1->m_key.m_data.m_data);\n  }\n  else\n  {\n    FRequestProfilePage::setupCommentsBrowser(a1, nullptr);\n    v15 = GameLevelManager::sharedState();\n    GameLevelManager::getFriendRequests(v15, a1->m_sent, a2, a1->m_itemCount);\n  }\n  a1->m_page = a2;\n  sub_774008(&v17);\n}", "assembly": "; \n; FRequestProfilePage::loadPage from 0x4c2604 to 0x4c2758 (340 bytes)\n; \n; 4 xrefs:\n; > sub_4C275C @ 0x4c2f20\n; > FRequestProfilePage::forceReloadRequests @ 0x4c31cc\n; > FRequestProfilePage::onNextPage @ 0x4c31e0\n; > FRequestProfilePage::onPrevPage @ 0x4c31ea\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.W          {R0-R10,LR}                                            ; +0x0, 0x4c2604\nMOV             R4, R0                                                 ; +0x4, 0x4c2608\nLDR             R5, =(__stack_chk_guard_ptr - 0x4C2616)                ; +0x6, 0x4c260a\nMOV             R8, R1                                                 ; +0x8, 0x4c260c\nADD             R6, SP, #0x10+var_C                                    ; +0xa, 0x4c260e\nADD             R7, SP, #8                                             ; +0xc, 0x4c2610\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xe, 0x4c2612\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x10, 0x4c2614\nADD.W           R9, R4, #0x204                                         ; +0x12, 0x4c2616\nLDR             R3, [R5]                                               ; +0x16, 0x4c261a\nSTR             R3, [SP,#0x10+var_4]                                   ; +0x18, 0x4c261c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x1a, 0x4c261e\nLDRB.W          R1, [R4,#0x200]; bool                                  ; +0x1e, 0x4c2622\nMOV             R2, R8; int                                            ; +0x22, 0x4c2626\nBL              _ZN16GameLevelManager19getFriendRequestKeyEbi; GameLevelManager::getFriendRequestKey(bool,int) ; +0x24, 0x4c2628\nMOV             R2, R7                                                 ; +0x28, 0x4c262c\nMOV             R1, R0; char *                                         ; +0x2a, 0x4c262e\nMOV             R0, R6; int                                            ; +0x2c, 0x4c2630\nBL              sub_776584                                             ; +0x2e, 0x4c2632\nLDR.W           R3, [R4,#0x204]                                        ; +0x32, 0x4c2636\nLDR.W           R3, [R3,#-0xC]                                         ; +0x36, 0x4c263a\nCBNZ            R3, loc_4C264A                                         ; +0x3a, 0x4c263e\nMOV             R0, R9                                                 ; +0x3c, 0x4c2640\nMOV             R1, R6                                                 ; +0x3e, 0x4c2642\nBL              sub_775D40                                             ; +0x40, 0x4c2644\nB               loc_4C2658                                             ; +0x44, 0x4c2648\nMOV             R0, R6                                                 ; +0x46, 0x4c264a\nMOV             R1, R9                                                 ; +0x48, 0x4c264c\nBL              sub_774DBC                                             ; +0x4a, 0x4c264e\nCMP             R0, #0                                                 ; +0x4e, 0x4c2652\nBEQ             loc_4C2640                                             ; +0x50, 0x4c2654\nB               loc_4C274A                                             ; +0x52, 0x4c2656\nLDR.W           R0, [R4,#0x214]                                        ; +0x54, 0x4c2658\nMOVS            R1, #1                                                 ; +0x58, 0x4c265c\nLDR             R3, [R0]                                               ; +0x5a, 0x4c265e\nLDR.W           R3, [R3,#0xA4]                                         ; +0x5c, 0x4c2660\nBLX             R3                                                     ; +0x60, 0x4c2664\nLDR.W           R0, [R4,#0x228]                                        ; +0x62, 0x4c2666\nMOVS            R1, #0                                                 ; +0x66, 0x4c266a\nLDR             R3, [R0]                                               ; +0x68, 0x4c266c\nLDR.W           R3, [R3,#0xA4]                                         ; +0x6a, 0x4c266e\nBLX             R3                                                     ; +0x6e, 0x4c2672\nLDR.W           R0, [R4,#0x20C]                                        ; +0x70, 0x4c2674\nMOVS            R1, #0                                                 ; +0x74, 0x4c2678\nLDR             R3, [R0]                                               ; +0x76, 0x4c267a\nLDR.W           R3, [R3,#0xA4]                                         ; +0x78, 0x4c267c\nBLX             R3                                                     ; +0x7c, 0x4c2680\nLDR.W           R0, [R4,#0x224]                                        ; +0x7e, 0x4c2682\nCMP.W           R8, #0                                                 ; +0x82, 0x4c2686\nLDR             R3, [R0]                                               ; +0x86, 0x4c268a\nLDR.W           R3, [R3,#0xA4]                                         ; +0x88, 0x4c268c\nBLE             loc_4C26A4                                             ; +0x8c, 0x4c2690\nMOVS            R1, #1                                                 ; +0x8e, 0x4c2692\nBLX             R3                                                     ; +0x90, 0x4c2694\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x92, 0x4c2696\nLDR.W           R1, [R4,#0x204]; char *                                ; +0x96, 0x4c269a\nBL              _ZN16GameLevelManager21getStoredOnlineLevelsEPKc; GameLevelManager::getStoredOnlineLevels(char const*) ; +0x9a, 0x4c269e\nB               loc_4C26A8                                             ; +0x9e, 0x4c26a2\nMOVS            R1, #0                                                 ; +0xa0, 0x4c26a4\nB               loc_4C2694                                             ; +0xa2, 0x4c26a6\nMOV             R1, R0                                                 ; +0xa4, 0x4c26a8\nLDR.W           R0, [R4,#0x220]                                        ; +0xa6, 0x4c26aa\nLDR             R3, [R0]                                               ; +0xaa, 0x4c26ae\nLDR.W           R3, [R3,#0xA4]                                         ; +0xac, 0x4c26b0\nCBZ             R1, loc_4C26B8                                         ; +0xb0, 0x4c26b4\nMOVS            R1, #1                                                 ; +0xb2, 0x4c26b6\nBLX             R3                                                     ; +0xb4, 0x4c26b8\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xb6, 0x4c26ba\nLDR.W           R1, [R4,#0x204]; char *                                ; +0xba, 0x4c26be\nBL              _ZN16GameLevelManager21getStoredOnlineLevelsEPKc; GameLevelManager::getStoredOnlineLevels(char const*) ; +0xbe, 0x4c26c2\nMOV             R9, R0                                                 ; +0xc2, 0x4c26c6\nCBZ             R0, loc_4C271C                                         ; +0xc4, 0x4c26c8\nLDR             R3, [R4]                                               ; +0xc6, 0x4c26ca\nLDR.W           R10, [R3,#0x2A0]                                       ; +0xc8, 0x4c26cc\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xcc, 0x4c26d0\nLDR.W           R1, [R4,#0x204]; char *                                ; +0xd0, 0x4c26d4\nBL              _ZN16GameLevelManager11getPageInfoEPKc; GameLevelManager::getPageInfo(char const*) ; +0xd4, 0x4c26d8\nMOV             R1, R0; char *                                         ; +0xd8, 0x4c26dc\nMOV             R2, SP                                                 ; +0xda, 0x4c26de\nMOV             R0, R7; int                                            ; +0xdc, 0x4c26e0\nBL              sub_776584                                             ; +0xde, 0x4c26e2\nMOV             R0, R4                                                 ; +0xe2, 0x4c26e6\nMOV             R1, R7                                                 ; +0xe4, 0x4c26e8\nLDR.W           R2, [R4,#0x204]                                        ; +0xe6, 0x4c26ea\nBLX             R10                                                    ; +0xea, 0x4c26ee\nMOV             R0, R7                                                 ; +0xec, 0x4c26f0\nBL              sub_774008                                             ; +0xee, 0x4c26f2\nLDR             R3, [R4]                                               ; +0xf2, 0x4c26f6\nMOV             R0, R4                                                 ; +0xf4, 0x4c26f8\nMOV             R1, R9                                                 ; +0xf6, 0x4c26fa\nLDR.W           R2, [R4,#0x204]                                        ; +0xf8, 0x4c26fc\nLDR.W           R3, [R3,#0x298]                                        ; +0xfc, 0x4c2700\nBLX             R3                                                     ; +0x100, 0x4c2704\nSTR.W           R8, [R4,#0x238]                                        ; +0x102, 0x4c2706\nMOV             R0, R6                                                 ; +0x106, 0x4c270a\nBL              sub_774008                                             ; +0x108, 0x4c270c\nLDR             R2, [SP,#0x10+var_4]                                   ; +0x10c, 0x4c2710\nLDR             R3, [R5]                                               ; +0x10e, 0x4c2712\nCMP             R2, R3                                                 ; +0x110, 0x4c2714\nBEQ             loc_4C2752                                             ; +0x112, 0x4c2716\nBLX             __stack_chk_fail                                       ; +0x114, 0x4c2718\nMOV             R0, R4; this                                           ; +0x118, 0x4c271c\nMOV             R1, R9; cocos2d::CCArray *                             ; +0x11a, 0x4c271e\nBL              _ZN19FRequestProfilePage20setupCommentsBrowserEPN7cocos2d7CCArrayE; FRequestProfilePage::setupCommentsBrowser(cocos2d::CCArray *) ; +0x11c, 0x4c2720\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x120, 0x4c2724\nLDRB.W          R1, [R4,#0x200]; bool                                  ; +0x124, 0x4c2728\nMOV             R2, R8; int                                            ; +0x128, 0x4c272c\nLDR.W           R3, [R4,#0x22C]; int                                   ; +0x12a, 0x4c272e\nBL              _ZN16GameLevelManager17getFriendRequestsEbii; GameLevelManager::getFriendRequests(bool,int,int) ; +0x12e, 0x4c2732\nB               loc_4C2706                                             ; +0x132, 0x4c2736\nMOV             R0, R7                                                 ; +0x134, 0x4c2738\nBL              sub_774008                                             ; +0x136, 0x4c273a\nB               loc_4C2740                                             ; +0x13a, 0x4c273e\nMOV             R0, R6                                                 ; +0x13c, 0x4c2740\nBL              sub_774008                                             ; +0x13e, 0x4c2742\nBL              __cxa_end_cleanup                                      ; +0x142, 0x4c2746\nMOV             R0, R4; this                                           ; +0x146, 0x4c274a\nBL              _ZN19FRequestProfilePage11untoggleAllEv; FRequestProfilePage::untoggleAll(void) ; +0x148, 0x4c274c\nB               loc_4C2640                                             ; +0x14c, 0x4c2750\nADD             SP, SP, #0x10                                          ; +0x14e, 0x4c2752\nPOP.W           {R4-R10,PC}                                            ; +0x150, 0x4c2754", "xrefs": ["sub_4C275C @ 0x4c2f20", "FRequestProfilePage::forceReloadRequests @ 0x4c31cc", "FRequestProfilePage::onNextPage @ 0x4c31e0", "FRequestProfilePage::onPrevPage @ 0x4c31ea"], "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"}