{"type": "func", "start": 4298492240, "end": 4298492708, "name": "AchievementsLayer::loadPage", "pseudocode": "// \n// AchievementsLayer::loadPage from 0x10035c950 to 0x10035cb24 (468 bytes)\n// \n// 6 xrefs:\n// > AchievementsLayer::customSetup @ 0x10035c8dd\n// > AchievementsLayer::onPrevPage @ 0x10035c91d\n// > AchievementsLayer::onNextPage @ 0x10035c93d\n// > AchievementsLayer::keyDown @ 0x10035cb82\n// > AchievementsLayer::keyDown @ 0x10035cbaf\n// > sub_10035CBD0 @ 0x10035cc48\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:28:54 +0000\n// \n\n__int64 __fastcall AchievementsLayer::loadPage(__int64 a1, int a2)\n{\n  _BOOL8 v3; // rsi\n  __int64 v4; // rdi\n  __int64 v5; // r12\n  __int64 v6; // r14\n  int v7; // r13d\n  unsigned int v8; // r15d\n  __int64 v9; // rax\n  unsigned int v11; // r15d\n  unsigned int v12; // eax\n  _QWORD **v13; // rbx\n  __int64 v14; // rax\n  __int64 CString; // rax\n  char *v16; // r14\n  int v19; // [rsp+8h] [rbp-38h]\n  int v20; // [rsp+14h] [rbp-2Ch]\n\n  *(_DWORD *)(a1 + 604) = a2;\n  v3 = a2 > 0;\n  v4 = *(_QWORD *)(a1 + 616);\n  (*(void (__fastcall **)(__int64, _BOOL8))(*(_QWORD *)v4 + 344LL))(v4, v3);\n  v5 = *(_QWORD *)(AchievementManager::sharedState(v4, v3) + 368);\n  v6 = sub_1007FE900(v4);\n  v19 = a2;\n  v7 = 10 * a2;\n  v20 = sub_1007FEF90(v5);\n  if ( v5 && (unsigned int)sub_1007FEF90(v5) )\n  {\n    v8 = 10 * a2;\n    do\n    {\n      if ( v8 > (unsigned int)sub_1007FEF90(v5) - 1 )\n        break;\n      v9 = sub_1007FEFE0(v5, v8);\n      sub_1007FEBF0(v6, v9);\n    }\n    while ( (int)v8++ < v7 + 9 );\n  }\n  v11 = v7 + sub_1007FEF90(v6);\n  v12 = sub_1007FEF90(v5);\n  v13 = (_QWORD **)a1;\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 608) + 344LL))(*(_QWORD *)(a1 + 608), v11 < v12);\n  (*(void (__fastcall **)(_QWORD *, bool))(*v13[77] + 344LL))(v13[77], v19 != 0);\n  (*(void (__fastcall **)(_QWORD, bool))(**(_QWORD **)(a1 + 608) + 344LL))(*(_QWORD *)(a1 + 608), v7 + 10 < v20);\n  v14 = sub_10088E820(\"%i to %i of %i\", a1);\n  CString = cocos2d::CCString::getCString(v14);\n  (*(void (__fastcall **)(_QWORD *, __int64))(*v13[78] + 928LL))(v13[78], CString);\n  (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*v13[71] + 568LL))(v13[71], 9, 1);\n  v16 = CustomListView::create(v6, 0, 0, 3u, 220.0, 356.0, 0.0);\n  (*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v16 + 72LL))(v16, 9);\n  return (*(__int64 (__fastcall **)(_QWORD *, char *, __int64))(*v13[71] + 464LL))(v13[71], v16, 6);\n}", "assembly": "; \n; AchievementsLayer::loadPage from 0x10035c950 to 0x10035cb24 (468 bytes)\n; \n; 6 xrefs:\n; > AchievementsLayer::customSetup @ 0x10035c8dd\n; > AchievementsLayer::onPrevPage @ 0x10035c91d\n; > AchievementsLayer::onNextPage @ 0x10035c93d\n; > AchievementsLayer::keyDown @ 0x10035cb82\n; > AchievementsLayer::keyDown @ 0x10035cbaf\n; > sub_10035CBD0 @ 0x10035cc48\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:28:54 +0000\n; \npush    rbp                                                            ; +0x0, 0x10035c950\nmov     rbp, rsp                                                       ; +0x1, 0x10035c951\npush    r15                                                            ; +0x4, 0x10035c954\npush    r14                                                            ; +0x6, 0x10035c956\npush    r13                                                            ; +0x8, 0x10035c958\npush    r12                                                            ; +0xa, 0x10035c95a\npush    rbx                                                            ; +0xc, 0x10035c95c\nsub     rsp, 18h                                                       ; +0xd, 0x10035c95d\nmov     ebx, esi                                                       ; +0x11, 0x10035c961\nmov     [rdi+25Ch], esi                                                ; +0x13, 0x10035c963\nxor     esi, esi                                                       ; +0x19, 0x10035c969\ntest    ebx, ebx                                                       ; +0x1b, 0x10035c96b\nsetnle  sil                                                            ; +0x1d, 0x10035c96d\nmov     [rbp+var_40], rdi                                              ; +0x21, 0x10035c971\nmov     rdi, [rdi+268h]                                                ; +0x25, 0x10035c975\nmov     rax, [rdi]                                                     ; +0x2c, 0x10035c97c\ncall    qword ptr [rax+158h]                                           ; +0x2f, 0x10035c97f\ncall    AchievementManager__sharedState                                ; +0x35, 0x10035c985\nmov     r12, [rax+170h]                                                ; +0x3a, 0x10035c98a\ncall    sub_1007FE900                                                  ; +0x41, 0x10035c991\nmov     r14, rax                                                       ; +0x46, 0x10035c996\nmov     qword ptr [rbp+var_38], rbx                                    ; +0x49, 0x10035c999\nlea     eax, [rbx+rbx]                                                 ; +0x4d, 0x10035c99d\nlea     r13d, [rax+rax*4]                                              ; +0x50, 0x10035c9a0\nmov     rdi, r12                                                       ; +0x54, 0x10035c9a4\ncall    sub_1007FEF90                                                  ; +0x57, 0x10035c9a7\nmov     [rbp+var_2C], eax                                              ; +0x5c, 0x10035c9ac\ntest    r12, r12                                                       ; +0x5f, 0x10035c9af\njz      short loc_10035CA01                                            ; +0x62, 0x10035c9b2\nmov     rdi, r12                                                       ; +0x64, 0x10035c9b4\ncall    sub_1007FEF90                                                  ; +0x67, 0x10035c9b7\ntest    eax, eax                                                       ; +0x6c, 0x10035c9bc\njz      short loc_10035CA01                                            ; +0x6e, 0x10035c9be\nlea     ebx, [r13+9]                                                   ; +0x70, 0x10035c9c0\nmov     r15d, r13d                                                     ; +0x74, 0x10035c9c4\nnop     word ptr [rax+rax+00000000h]                                   ; +0x77, 0x10035c9c7\nmov     rdi, r12                                                       ; +0x80, 0x10035c9d0\ncall    sub_1007FEF90                                                  ; +0x83, 0x10035c9d3\ndec     eax                                                            ; +0x88, 0x10035c9d8\ncmp     r15d, eax                                                      ; +0x8a, 0x10035c9da\nja      short loc_10035CA01                                            ; +0x8d, 0x10035c9dd\nmov     rdi, r12                                                       ; +0x8f, 0x10035c9df\nmov     esi, r15d                                                      ; +0x92, 0x10035c9e2\ncall    sub_1007FEFE0                                                  ; +0x95, 0x10035c9e5\nmov     rdi, r14                                                       ; +0x9a, 0x10035c9ea\nmov     rsi, rax                                                       ; +0x9d, 0x10035c9ed\ncall    sub_1007FEBF0                                                  ; +0xa0, 0x10035c9f0\nlea     eax, [r15+1]                                                   ; +0xa5, 0x10035c9f5\ncmp     r15d, ebx                                                      ; +0xa9, 0x10035c9f9\nmov     r15d, eax                                                      ; +0xac, 0x10035c9fc\njl      short loc_10035C9D0                                            ; +0xaf, 0x10035c9ff\nmov     rdi, r14                                                       ; +0xb1, 0x10035ca01\ncall    sub_1007FEF90                                                  ; +0xb4, 0x10035ca04\nmov     r15d, eax                                                      ; +0xb9, 0x10035ca09\nadd     r15d, r13d                                                     ; +0xbc, 0x10035ca0c\nmov     rdi, r12                                                       ; +0xbf, 0x10035ca0f\ncall    sub_1007FEF90                                                  ; +0xc2, 0x10035ca12\nxor     esi, esi                                                       ; +0xc7, 0x10035ca17\ncmp     r15d, eax                                                      ; +0xc9, 0x10035ca19\nsetb    sil                                                            ; +0xcc, 0x10035ca1c\nmov     rbx, [rbp+var_40]                                              ; +0xd0, 0x10035ca20\nmov     rdi, [rbx+260h]                                                ; +0xd4, 0x10035ca24\nmov     rax, [rdi]                                                     ; +0xdb, 0x10035ca2b\ncall    qword ptr [rax+158h]                                           ; +0xde, 0x10035ca2e\nxor     esi, esi                                                       ; +0xe4, 0x10035ca34\ncmp     [rbp+var_38], 0                                                ; +0xe6, 0x10035ca36\nsetnz   sil                                                            ; +0xea, 0x10035ca3a\nmov     rdi, [rbx+268h]                                                ; +0xee, 0x10035ca3e\nmov     rax, [rdi]                                                     ; +0xf5, 0x10035ca45\ncall    qword ptr [rax+158h]                                           ; +0xf8, 0x10035ca48\nlea     eax, [r13+0Ah]                                                 ; +0xfe, 0x10035ca4e\nmov     rdi, [rbx+260h]                                                ; +0x102, 0x10035ca52\nmov     rcx, [rdi]                                                     ; +0x109, 0x10035ca59\nxor     esi, esi                                                       ; +0x10c, 0x10035ca5c\nmov     r12d, [rbp+var_2C]                                             ; +0x10e, 0x10035ca5e\ncmp     eax, r12d                                                      ; +0x112, 0x10035ca62\nsetl    sil                                                            ; +0x115, 0x10035ca65\nmov     r15d, r12d                                                     ; +0x119, 0x10035ca69\ncmovl   r15d, eax                                                      ; +0x11c, 0x10035ca6c\ncall    qword ptr [rcx+158h]                                           ; +0x120, 0x10035ca70\nor      r13d, 1                                                        ; +0x126, 0x10035ca76\nlea     rdi, aIToIOfI; \"%i to %i of %i\"                                ; +0x12a, 0x10035ca7a\nmov     esi, r13d                                                      ; +0x131, 0x10035ca81\nmov     edx, r15d                                                      ; +0x134, 0x10035ca84\nmov     ecx, r12d                                                      ; +0x137, 0x10035ca87\nxor     eax, eax                                                       ; +0x13a, 0x10035ca8a\ncall    sub_10088E820                                                  ; +0x13c, 0x10035ca8c\nmov     rdi, rax                                                       ; +0x141, 0x10035ca91\ncall    cocos2d__CCString__getCString                                  ; +0x144, 0x10035ca94\nmov     rdi, [rbx+270h]                                                ; +0x149, 0x10035ca99\nmov     rcx, [rdi]                                                     ; +0x150, 0x10035caa0\nmov     rsi, rax                                                       ; +0x153, 0x10035caa3\ncall    qword ptr [rcx+3A0h]                                           ; +0x156, 0x10035caa6\nmov     rdi, [rbx+238h]                                                ; +0x15c, 0x10035caac\nmov     rax, [rdi]                                                     ; +0x163, 0x10035cab3\nmov     esi, 9                                                         ; +0x166, 0x10035cab6\nmov     edx, 1                                                         ; +0x16b, 0x10035cabb\ncall    qword ptr [rax+238h]                                           ; +0x170, 0x10035cac0\nmovss   xmm0, cs:dword_100A03F20                                       ; +0x176, 0x10035cac6\nmovss   xmm1, cs:dword_100A03F24                                       ; +0x17e, 0x10035cace\nxorps   xmm2, xmm2                                                     ; +0x186, 0x10035cad6\nmov     rdi, r14                                                       ; +0x189, 0x10035cad9\nxor     esi, esi                                                       ; +0x18c, 0x10035cadc\nxor     edx, edx                                                       ; +0x18e, 0x10035cade\nmov     ecx, 3                                                         ; +0x190, 0x10035cae0\ncall    CustomListView__create                                         ; +0x195, 0x10035cae5\nmov     r14, rax                                                       ; +0x19a, 0x10035caea\nmov     rax, [rax]                                                     ; +0x19d, 0x10035caed\nmov     rdi, r14                                                       ; +0x1a0, 0x10035caf0\nmov     esi, 9                                                         ; +0x1a3, 0x10035caf3\ncall    qword ptr [rax+48h]                                            ; +0x1a8, 0x10035caf8\nmov     rdi, [rbx+238h]                                                ; +0x1ab, 0x10035cafb\nmov     rax, [rdi]                                                     ; +0x1b2, 0x10035cb02\nmov     rax, [rax+1D0h]                                                ; +0x1b5, 0x10035cb05\nmov     rsi, r14                                                       ; +0x1bc, 0x10035cb0c\nmov     edx, 6                                                         ; +0x1bf, 0x10035cb0f\nadd     rsp, 18h                                                       ; +0x1c4, 0x10035cb14\npop     rbx                                                            ; +0x1c8, 0x10035cb18\npop     r12                                                            ; +0x1c9, 0x10035cb19\npop     r13                                                            ; +0x1cb, 0x10035cb1b\npop     r14                                                            ; +0x1cd, 0x10035cb1d\npop     r15                                                            ; +0x1cf, 0x10035cb1f\npop     rbp                                                            ; +0x1d1, 0x10035cb21\njmp     rax                                                            ; +0x1d2, 0x10035cb22", "xrefs": ["AchievementsLayer::customSetup @ 0x10035c8dd", "AchievementsLayer::onPrevPage @ 0x10035c91d", "AchievementsLayer::onNextPage @ 0x10035c93d", "AchievementsLayer::keyDown @ 0x10035cb82", "AchievementsLayer::keyDown @ 0x10035cbaf", "sub_10035CBD0 @ 0x10035cc48"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}