{"type": "func", "start": 5372666320, "end": 5372667062, "name": "ProfilePage::loadPage", "pseudocode": "// \n// ProfilePage::loadPage from 0x1403c61d0 to 0x1403c64b6 (742 bytes)\n// \n// 6 xrefs:\n// > ProfilePage::getUserInfoFinished @ 0x1403c5f79\n// > ProfilePage::onNextPage @ 0x1403c68f8\n// > ProfilePage::onPrevPage @ 0x1403c6908\n// > ProfilePage::commentUploadFinished @ 0x1403c694a\n// > ProfilePage::commentDeleteFailed @ 0x1403c6c58\n// > <???> @ 0x1406d78c8\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\n// Hidden C++ exception states: #wind=6\nvoid ProfilePage::loadPage(ProfilePage *a1, int a2)\n{\n  cocos2d::CCString *v4; // rax\n  char *CString; // rax\n  size_t v6; // rbx\n  size_t v7; // r8\n  std::string *p_m_profileKey; // rsi\n  _BOOL8 v9; // rdx\n  _BOOL8 v10; // rdx\n  std::string *m_bigStorage; // r14\n  GameLevelManager *v12; // rcx\n  _BOOL8 v13; // rdx\n  GameLevelManager *v14; // rcx\n  cocos2d::CCArray *StoredOnlineLevels; // r14\n  std::string *v16; // rsi\n  GameLevelManager *v17; // rcx\n  const char *PageInfo; // rax\n  GameLevelManager *v19; // rcx\n  __int128 v20; // [rsp+20h] [rbp-38h] BYREF\n  __int64 v21; // [rsp+30h] [rbp-28h]\n  __int64 v22; // [rsp+38h] [rbp-20h]\n  void *v23; // [rsp+60h] [rbp+8h]\n  void *v24; // [rsp+60h] [rbp+8h]\n  void *v25; // [rsp+60h] [rbp+8h]\n  void *v26; // [rsp+60h] [rbp+8h]\n  void *v27; // [rsp+60h] [rbp+8h]\n\n  if ( !qword_1406C2EC0 )\n  {\n    v23 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v23);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n  }\n  v4 = cocos2d::CCString::createWithFormat(\"a_%i_%i\", a1->m_accountID, a2);\n  CString = (char *)cocos2d::CCString::getCString(v4);\n  v6 = -1;\n  v7 = -1;\n  do\n    ++v7;\n  while ( CString[v7] );\n  p_m_profileKey = &a1->m_profileKey;\n  sub_14003CCE0((void **)&a1->m_profileKey, CString, v7);\n  LOBYTE(v9) = 1;\n  a1->m_circle->setVisible(a1->m_circle, v9);\n  a1->m_refreshBtn->setVisible(a1->m_refreshBtn, 0);\n  if ( a2 <= 0 )\n    v10 = 0;\n  else\n    LOBYTE(v10) = 1;\n  a1->m_leftArrow->setVisible(a1->m_leftArrow, v10);\n  m_bigStorage = &a1->m_profileKey;\n  if ( a1->m_profileKey.m_data.m_capacity > 0xF )\n    m_bigStorage = (std::string *)p_m_profileKey->m_data.m_bigStorage;\n  v12 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v24 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v24);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v12 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  if ( GameLevelManager::getStoredOnlineLevels(v12, m_bigStorage->m_data.m_smallStorage._Elems) )\n    LOBYTE(v13) = 1;\n  else\n    v13 = 0;\n  a1->m_rightArrow->setVisible(a1->m_rightArrow, v13);\n  if ( a1->m_profileKey.m_data.m_capacity > 0xF )\n    p_m_profileKey = (std::string *)p_m_profileKey->m_data.m_bigStorage;\n  v14 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v25 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v25);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v14 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v14, p_m_profileKey->m_data.m_smallStorage._Elems);\n  if ( StoredOnlineLevels )\n  {\n    v16 = &a1->m_profileKey;\n    if ( a1->m_profileKey.m_data.m_capacity > 0xF )\n      v16 = (std::string *)v16->m_data.m_bigStorage;\n    v17 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v26 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v26);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v17 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    PageInfo = GameLevelManager::getPageInfo(v17, v16->m_data.m_smallStorage._Elems);\n    v20 = 0;\n    v21 = 0;\n    v22 = 0;\n    do\n      ++v6;\n    while ( PageInfo[v6] );\n    sub_14003A930(&v20, PageInfo, v6);\n    ((void (__fastcall *)(LevelCommentDelegate *, __int128 *))a1->setupPageInfo)(&a1->LevelCommentDelegate, &v20);\n    ((void (__fastcall *)(LevelCommentDelegate *, cocos2d::CCArray *))a1->loadCommentsFinished)(\n      &a1->LevelCommentDelegate,\n      StoredOnlineLevels);\n  }\n  else\n  {\n    ProfilePage::setupCommentsBrowser(a1, nullptr);\n    v19 = (GameLevelManager *)qword_1406C2EC0;\n    if ( !qword_1406C2EC0 )\n    {\n      v27 = operator new(0x3D0u);\n      qword_1406C2EC0 = sub_140141280((__int64)v27);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n      v19 = (GameLevelManager *)qword_1406C2EC0;\n    }\n    v19->m_levelCommentDelegate = &a1->LevelCommentDelegate;\n    GameLevelManager::getAccountComments(v19, a1->m_accountID, a2, a1->m_itemCount);\n  }\n  a1->m_page = a2;\n}", "assembly": "; \n; ProfilePage::loadPage from 0x1403c61d0 to 0x1403c64b6 (742 bytes)\n; \n; 6 xrefs:\n; > ProfilePage::getUserInfoFinished @ 0x1403c5f79\n; > ProfilePage::onNextPage @ 0x1403c68f8\n; > ProfilePage::onPrevPage @ 0x1403c6908\n; > ProfilePage::commentUploadFinished @ 0x1403c694a\n; > ProfilePage::commentDeleteFailed @ 0x1403c6c58\n; > <???> @ 0x1406d78c8\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403c61d0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1403c61d5\npush    rsi                                                            ; +0xa, 0x1403c61da\npush    rdi                                                            ; +0xb, 0x1403c61db\npush    r14                                                            ; +0xc, 0x1403c61dc\nsub     rsp, 40h                                                       ; +0xe, 0x1403c61de\nmov     ebp, edx                                                       ; +0x12, 0x1403c61e2\nmov     rdi, rcx                                                       ; +0x14, 0x1403c61e4\ncmp     cs:qword_1406C2EC0, 0                                          ; +0x17, 0x1403c61e7\njnz     short loc_1403C6219                                            ; +0x1f, 0x1403c61ef\nmov     ecx, 3D0h; Size                                                ; +0x21, 0x1403c61f1\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x26, 0x1403c61f6\nmov     [rsp+58h+arg_0], rax                                           ; +0x2b, 0x1403c61fb\nmov     rcx, rax                                                       ; +0x30, 0x1403c6200\ncall    sub_140141280                                                  ; +0x33, 0x1403c6203\nnop                                                                    ; +0x38, 0x1403c6208\nmov     cs:qword_1406C2EC0, rax                                        ; +0x39, 0x1403c6209\nmov     rdx, [rax]                                                     ; +0x40, 0x1403c6210\nmov     rcx, rax                                                       ; +0x43, 0x1403c6213\ncall    qword ptr [rdx+48h]                                            ; +0x46, 0x1403c6216\nmov     r8d, ebp                                                       ; +0x49, 0x1403c6219\nmov     edx, [rdi+2B8h]                                                ; +0x4c, 0x1403c621c\nlea     rcx, aAII; \"a_%i_%i\"                                           ; +0x52, 0x1403c6222\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x59, 0x1403c6229\nmov     rcx, rax                                                       ; +0x5f, 0x1403c622f\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x62, 0x1403c6232\nmov     rbx, 0FFFFFFFFFFFFFFFFh                                        ; +0x68, 0x1403c6238\nmov     r8, rbx                                                        ; +0x6f, 0x1403c623f\ninc     r8; Size                                                       ; +0x72, 0x1403c6242\ncmp     byte ptr [rax+r8], 0                                           ; +0x75, 0x1403c6245\njnz     short loc_1403C6242                                            ; +0x7a, 0x1403c624a\nlea     rsi, [rdi+2C0h]                                                ; +0x7c, 0x1403c624c\nmov     rdx, rax; Src                                                  ; +0x83, 0x1403c6253\nmov     rcx, rsi; void *                                               ; +0x86, 0x1403c6256\ncall    sub_14003CCE0                                                  ; +0x89, 0x1403c6259\nmov     rcx, [rdi+338h]                                                ; +0x8e, 0x1403c625e\nmov     rax, [rcx]                                                     ; +0x95, 0x1403c6265\nmov     dl, 1                                                          ; +0x98, 0x1403c6268\ncall    qword ptr [rax+140h]                                           ; +0x9a, 0x1403c626a\nmov     rcx, [rdi+348h]                                                ; +0xa0, 0x1403c6270\nmov     rax, [rcx]                                                     ; +0xa7, 0x1403c6277\nxor     edx, edx                                                       ; +0xaa, 0x1403c627a\ncall    qword ptr [rax+140h]                                           ; +0xac, 0x1403c627c\nmov     rcx, [rdi+300h]                                                ; +0xb2, 0x1403c6282\nmov     rax, [rcx]                                                     ; +0xb9, 0x1403c6289\ntest    ebp, ebp                                                       ; +0xbc, 0x1403c628c\njle     short loc_1403C6294                                            ; +0xbe, 0x1403c628e\nmov     dl, 1                                                          ; +0xc0, 0x1403c6290\njmp     short loc_1403C6296                                            ; +0xc2, 0x1403c6292\nxor     edx, edx                                                       ; +0xc4, 0x1403c6294\ncall    qword ptr [rax+140h]                                           ; +0xc6, 0x1403c6296\nmov     r14, rsi                                                       ; +0xcc, 0x1403c629c\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0xcf, 0x1403c629f\njbe     short loc_1403C62A9                                            ; +0xd4, 0x1403c62a4\nmov     r14, [rsi]                                                     ; +0xd6, 0x1403c62a6\nmov     rcx, cs:qword_1406C2EC0                                        ; +0xd9, 0x1403c62a9\ntest    rcx, rcx                                                       ; +0xe0, 0x1403c62b0\njnz     short loc_1403C62E5                                            ; +0xe3, 0x1403c62b3\nmov     ecx, 3D0h; Size                                                ; +0xe5, 0x1403c62b5\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xea, 0x1403c62ba\nmov     [rsp+58h+arg_0], rax                                           ; +0xef, 0x1403c62bf\nmov     rcx, rax                                                       ; +0xf4, 0x1403c62c4\ncall    sub_140141280                                                  ; +0xf7, 0x1403c62c7\nnop                                                                    ; +0xfc, 0x1403c62cc\nmov     cs:qword_1406C2EC0, rax                                        ; +0xfd, 0x1403c62cd\nmov     r8, [rax]                                                      ; +0x104, 0x1403c62d4\nmov     rcx, rax                                                       ; +0x107, 0x1403c62d7\ncall    qword ptr [r8+48h]                                             ; +0x10a, 0x1403c62da\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x10e, 0x1403c62de\nmov     rdx, r14                                                       ; +0x115, 0x1403c62e5\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x118, 0x1403c62e8\nmov     rcx, [rdi+2F8h]                                                ; +0x11d, 0x1403c62ed\nmov     r8, [rcx]                                                      ; +0x124, 0x1403c62f4\ntest    rax, rax                                                       ; +0x127, 0x1403c62f7\njz      short loc_1403C6300                                            ; +0x12a, 0x1403c62fa\nmov     dl, 1                                                          ; +0x12c, 0x1403c62fc\njmp     short loc_1403C6302                                            ; +0x12e, 0x1403c62fe\nxor     edx, edx                                                       ; +0x130, 0x1403c6300\ncall    qword ptr [r8+140h]                                            ; +0x132, 0x1403c6302\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x139, 0x1403c6309\njbe     short loc_1403C6313                                            ; +0x13e, 0x1403c630e\nmov     rsi, [rsi]                                                     ; +0x140, 0x1403c6310\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x143, 0x1403c6313\ntest    rcx, rcx                                                       ; +0x14a, 0x1403c631a\njnz     short loc_1403C634F                                            ; +0x14d, 0x1403c631d\nmov     ecx, 3D0h; Size                                                ; +0x14f, 0x1403c631f\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x154, 0x1403c6324\nmov     [rsp+58h+arg_0], rax                                           ; +0x159, 0x1403c6329\nmov     rcx, rax                                                       ; +0x15e, 0x1403c632e\ncall    sub_140141280                                                  ; +0x161, 0x1403c6331\nnop                                                                    ; +0x166, 0x1403c6336\nmov     cs:qword_1406C2EC0, rax                                        ; +0x167, 0x1403c6337\nmov     r8, [rax]                                                      ; +0x16e, 0x1403c633e\nmov     rcx, rax                                                       ; +0x171, 0x1403c6341\ncall    qword ptr [r8+48h]                                             ; +0x174, 0x1403c6344\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x178, 0x1403c6348\nmov     rdx, rsi                                                       ; +0x17f, 0x1403c634f\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x182, 0x1403c6352\nmov     r14, rax                                                       ; +0x187, 0x1403c6357\ntest    rax, rax                                                       ; +0x18a, 0x1403c635a\njz      loc_1403C6435                                                  ; +0x18d, 0x1403c635d\nlea     rsi, [rdi+2C0h]                                                ; +0x193, 0x1403c6363\ncmp     qword ptr [rsi+18h], 0Fh                                       ; +0x19a, 0x1403c636a\njbe     short loc_1403C6374                                            ; +0x19f, 0x1403c636f\nmov     rsi, [rsi]                                                     ; +0x1a1, 0x1403c6371\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x1a4, 0x1403c6374\ntest    rcx, rcx                                                       ; +0x1ab, 0x1403c637b\njnz     short loc_1403C63B0                                            ; +0x1ae, 0x1403c637e\nmov     ecx, 3D0h; Size                                                ; +0x1b0, 0x1403c6380\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x1b5, 0x1403c6385\nmov     [rsp+58h+arg_0], rax                                           ; +0x1ba, 0x1403c638a\nmov     rcx, rax                                                       ; +0x1bf, 0x1403c638f\ncall    sub_140141280                                                  ; +0x1c2, 0x1403c6392\nnop                                                                    ; +0x1c7, 0x1403c6397\nmov     cs:qword_1406C2EC0, rax                                        ; +0x1c8, 0x1403c6398\nmov     r8, [rax]                                                      ; +0x1cf, 0x1403c639f\nmov     rcx, rax                                                       ; +0x1d2, 0x1403c63a2\ncall    qword ptr [r8+48h]                                             ; +0x1d5, 0x1403c63a5\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x1d9, 0x1403c63a9\nmov     rdx, rsi                                                       ; +0x1e0, 0x1403c63b0\ncall    GameLevelManager__getPageInfo                                  ; +0x1e3, 0x1403c63b3\nxorps   xmm0, xmm0                                                     ; +0x1e8, 0x1403c63b8\nmovups  [rsp+58h+var_38], xmm0                                         ; +0x1eb, 0x1403c63bb\nxor     ecx, ecx                                                       ; +0x1f0, 0x1403c63c0\nmov     [rsp+58h+var_28], rcx                                          ; +0x1f2, 0x1403c63c2\nmov     [rsp+58h+var_20], rcx                                          ; +0x1f7, 0x1403c63c7\nnop     dword ptr [rax+00h]                                            ; +0x1fc, 0x1403c63cc\ninc     rbx                                                            ; +0x200, 0x1403c63d0\ncmp     [rax+rbx], cl                                                  ; +0x203, 0x1403c63d3\njnz     short loc_1403C63D0                                            ; +0x206, 0x1403c63d6\nmov     r8, rbx                                                        ; +0x208, 0x1403c63d8\nmov     rdx, rax                                                       ; +0x20b, 0x1403c63db\nlea     rcx, [rsp+58h+var_38]                                          ; +0x20e, 0x1403c63de\ncall    sub_14003A930                                                  ; +0x213, 0x1403c63e3\nlea     r8, [rdi+2C0h]                                                 ; +0x218, 0x1403c63e8\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x21f, 0x1403c63ef\njbe     short loc_1403C63F9                                            ; +0x224, 0x1403c63f4\nmov     r8, [r8]                                                       ; +0x226, 0x1403c63f6\nmov     rax, [rdi+280h]                                                ; +0x229, 0x1403c63f9\nlea     rdx, [rsp+58h+var_38]                                          ; +0x230, 0x1403c6400\nlea     rcx, [rdi+280h]                                                ; +0x235, 0x1403c6405\ncall    qword ptr [rax+18h]                                            ; +0x23c, 0x1403c640c\nlea     r8, [rdi+2C0h]                                                 ; +0x23f, 0x1403c640f\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x246, 0x1403c6416\njbe     short loc_1403C6420                                            ; +0x24b, 0x1403c641b\nmov     r8, [r8]                                                       ; +0x24d, 0x1403c641d\nmov     rax, [rdi+280h]                                                ; +0x250, 0x1403c6420\nmov     rdx, r14                                                       ; +0x257, 0x1403c6427\nlea     rcx, [rdi+280h]                                                ; +0x25a, 0x1403c642a\ncall    qword ptr [rax]                                                ; +0x261, 0x1403c6431\njmp     short loc_1403C649D                                            ; +0x263, 0x1403c6433\nxor     edx, edx                                                       ; +0x265, 0x1403c6435\nmov     rcx, rdi                                                       ; +0x267, 0x1403c6437\ncall    ProfilePage__setupCommentsBrowser                              ; +0x26a, 0x1403c643a\nlea     rbx, [rdi+280h]                                                ; +0x26f, 0x1403c643f\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x276, 0x1403c6446\ntest    rcx, rcx                                                       ; +0x27d, 0x1403c644d\njnz     short loc_1403C6481                                            ; +0x280, 0x1403c6450\nmov     ecx, 3D0h; Size                                                ; +0x282, 0x1403c6452\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x287, 0x1403c6457\nmov     [rsp+58h+arg_0], rax                                           ; +0x28c, 0x1403c645c\nmov     rcx, rax                                                       ; +0x291, 0x1403c6461\ncall    sub_140141280                                                  ; +0x294, 0x1403c6464\nnop                                                                    ; +0x299, 0x1403c6469\nmov     cs:qword_1406C2EC0, rax                                        ; +0x29a, 0x1403c646a\nmov     rdx, [rax]                                                     ; +0x2a1, 0x1403c6471\nmov     rcx, rax                                                       ; +0x2a4, 0x1403c6474\ncall    qword ptr [rdx+48h]                                            ; +0x2a7, 0x1403c6477\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2aa, 0x1403c647a\nmov     [rcx+2E0h], rbx                                                ; +0x2b1, 0x1403c6481\nmov     r9d, [rdi+328h]                                                ; +0x2b8, 0x1403c6488\nmov     r8d, ebp                                                       ; +0x2bf, 0x1403c648f\nmov     edx, [rdi+2B8h]                                                ; +0x2c2, 0x1403c6492\ncall    GameLevelManager__getAccountComments                           ; +0x2c8, 0x1403c6498\nmov     [rdi+334h], ebp                                                ; +0x2cd, 0x1403c649d\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x2d3, 0x1403c64a3\nmov     rbp, [rsp+58h+arg_10]                                          ; +0x2d8, 0x1403c64a8\nadd     rsp, 40h                                                       ; +0x2dd, 0x1403c64ad\npop     r14                                                            ; +0x2e1, 0x1403c64b1\npop     rdi                                                            ; +0x2e3, 0x1403c64b3\npop     rsi                                                            ; +0x2e4, 0x1403c64b4\nretn                                                                   ; +0x2e5, 0x1403c64b5", "xrefs": ["ProfilePage::getUserInfoFinished @ 0x1403c5f79", "ProfilePage::onNextPage @ 0x1403c68f8", "ProfilePage::onPrevPage @ 0x1403c6908", "ProfilePage::commentUploadFinished @ 0x1403c694a", "ProfilePage::commentDeleteFailed @ 0x1403c6c58", "<???> @ 0x1406d78c8"], "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"}