{"type": "func", "start": 4298491504, "end": 4298492163, "name": "AchievementsLayer::customSetup", "pseudocode": "// \n// AchievementsLayer::customSetup from 0x10035c670 to 0x10035c903 (659 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x100b25780\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::customSetup(__int64 a1, __int64 a2, double a3)\n{\n  __int64 v4; // rsi\n  char isControllerConnected; // r14\n  __int64 v6; // r15\n  const char *v7; // rdi\n  const char *v8; // r12\n  char *v9; // rax\n  void *v10; // rax\n  void *v11; // rsi\n  __int64 v12; // r13\n  __int64 v13; // rax\n  float v14; // xmm0_4\n  double v15; // xmm0_8\n  unsigned __int8 *v16; // rax\n  __int64 v17; // r12\n  void *v18; // rax\n  void *v19; // rsi\n  __int64 v20; // r14\n  __int64 v21; // rax\n  float v22; // xmm0_4\n  __int64 v23; // rax\n  __int64 v24; // rdi\n  __int64 v25; // rsi\n  __int64 v26; // r15\n  __int64 v27; // rdi\n  __int64 v28; // rax\n  double v29; // xmm0_8\n  __int64 v30; // r14\n  __int64 result; // rax\n  _BYTE v32[4]; // [rsp+8h] [rbp-48h] BYREF\n  float v33; // [rsp+Ch] [rbp-44h]\n  unsigned int v34; // [rsp+10h] [rbp-40h] BYREF\n  double v35; // [rsp+18h] [rbp-38h] BYREF\n  float v36; // [rsp+20h] [rbp-30h]\n  char v37; // [rsp+27h] [rbp-29h]\n\n  v4 = cocos2d::CCDirector::sharedDirector(a1, a2);\n  cocos2d::CCDirector::getWinSize(v32, v4);\n  isControllerConnected = PlatformToolbox::isControllerConnected(a3);\n  v37 = isControllerConnected;\n  v6 = cocos2d::CCMenu::create();\n  v36 = v33 * 0.5;\n  v7 = \"controllerBtn_DPad_Left_001.png\";\n  if ( !isControllerConnected )\n    v7 = \"GJ_arrow_01_001.png\";\n  v8 = \"controllerBtn_DPad_Right_001.png\";\n  if ( !isControllerConnected )\n    v8 = \"GJ_arrow_01_001.png\";\n  v9 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)v7, COERCE_DOUBLE((unsigned __int64)LODWORD(v33)));\n  v10 = CCMenuItemSpriteExtra::create((__int64)v9, 0, a1, (__int64)AchievementsLayer::onPrevPage, 0);\n  *(_QWORD *)(a1 + 616) = v10;\n  v11 = v10;\n  (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v6 + 456LL))(v6, v10);\n  v12 = *(_QWORD *)(a1 + 616);\n  v13 = cocos2d::CCDirector::sharedDirector(v6, v11);\n  v14 = sub_100479760(v13);\n  sub_100278250((float *)&v34, v14 + 24.0, v36);\n  cocos2d::CCNode::convertToNodeSpace(&v35, v6, &v34);\n  v15 = (*(double (__fastcall **)(__int64, double *))(*(_QWORD *)v12 + 184LL))(v12, &v35);\n  v16 = (unsigned __int8 *)cocos2d::CCSprite::createWithSpriteFrameName((__int64)v8, v15);\n  v17 = (__int64)v16;\n  if ( !v37 )\n    cocos2d::CCSprite::setFlipX(v16, 1u);\n  v18 = CCMenuItemSpriteExtra::create(v17, 0, a1, (__int64)AchievementsLayer::onNextPage, 0);\n  *(_QWORD *)(a1 + 608) = v18;\n  v19 = v18;\n  (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v6 + 456LL))(v6, v18);\n  v20 = *(_QWORD *)(a1 + 608);\n  v21 = cocos2d::CCDirector::sharedDirector(v6, v19);\n  v22 = sub_100479770(v21);\n  sub_100278250((float *)&v34, v22 + -24.0, v36);\n  cocos2d::CCNode::convertToNodeSpace(&v35, v6, &v34);\n  (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v20 + 184LL))(v20, &v35);\n  (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v6, 10);\n  v23 = cocos2d::CCLabelBMFont::create_3(\" \", \"goldFont.fnt\");\n  *(_QWORD *)(a1 + 624) = v23;\n  v24 = *(_QWORD *)(a1 + 576);\n  v25 = v23;\n  (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v24 + 456LL))(v24, v23);\n  v26 = *(_QWORD *)(a1 + 624);\n  v27 = cocos2d::CCDirector::sharedDirector(v24, v25);\n  v36 = sub_100479770(v27) + -7.0;\n  v28 = cocos2d::CCDirector::sharedDirector(v27, v25);\n  v29 = sub_100479740(v28);\n  sub_100278250((float *)&v35, v36, *(float *)&v29 + -4.0);\n  (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v26 + 184LL))(v26, &v35);\n  v30 = *(_QWORD *)(a1 + 624);\n  sub_100278250((float *)&v35, 1.0, 1.0);\n  (*(void (__fastcall **)(__int64, double *))(*(_QWORD *)v30 + 296LL))(v30, &v35);\n  (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(a1 + 624) + 160LL))(*(_QWORD *)(a1 + 624), 0.60000002);\n  result = AchievementsLayer::loadPage(a1, 0);\n  if ( v37 )\n    return GameToolbox::addRThumbScrollButton(*(_QWORD *)(a1 + 576));\n  return result;\n}", "assembly": "; \n; AchievementsLayer::customSetup from 0x10035c670 to 0x10035c903 (659 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x100b25780\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, 0x10035c670\nmov     rbp, rsp                                                       ; +0x1, 0x10035c671\npush    r15                                                            ; +0x4, 0x10035c674\npush    r14                                                            ; +0x6, 0x10035c676\npush    r13                                                            ; +0x8, 0x10035c678\npush    r12                                                            ; +0xa, 0x10035c67a\npush    rbx                                                            ; +0xc, 0x10035c67c\nsub     rsp, 28h                                                       ; +0xd, 0x10035c67d\nmov     rbx, rdi                                                       ; +0x11, 0x10035c681\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x14, 0x10035c684\nlea     rdi, [rbp+var_48]                                              ; +0x19, 0x10035c689\nmov     rsi, rax                                                       ; +0x1d, 0x10035c68d\ncall    cocos2d__CCDirector__getWinSize                                ; +0x20, 0x10035c690\ncall    PlatformToolbox__isControllerConnected                         ; +0x25, 0x10035c695\nmov     r14d, eax                                                      ; +0x2a, 0x10035c69a\nmov     [rbp+var_29], al                                               ; +0x2d, 0x10035c69d\ncall    cocos2d__CCMenu__create                                        ; +0x30, 0x10035c6a0\nmov     r15, rax                                                       ; +0x35, 0x10035c6a5\nmovss   xmm0, [rbp+var_44]                                             ; +0x38, 0x10035c6a8\nmulss   xmm0, cs:dword_100A03578                                       ; +0x3d, 0x10035c6ad\nmovss   [rbp+var_30], xmm0                                             ; +0x45, 0x10035c6b5\nlea     rdi, aControllerbtnD_0; \"controllerBtn_DPad_Left_001.png\"      ; +0x4a, 0x10035c6ba\nlea     rax, aGjArrow01001Pn; \"GJ_arrow_01_001.png\"                    ; +0x51, 0x10035c6c1\ntest    r14b, r14b                                                     ; +0x58, 0x10035c6c8\ncmovz   rdi, rax                                                       ; +0x5b, 0x10035c6cb\nlea     r13, AchievementsLayer__onPrevPage                             ; +0x5f, 0x10035c6cf\nlea     r12, aControllerbtnD_1; \"controllerBtn_DPad_Right_001.png\"     ; +0x66, 0x10035c6d6\ncmovz   r12, rax                                                       ; +0x6d, 0x10035c6dd\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0x71, 0x10035c6e1\nmov     rdi, rax                                                       ; +0x76, 0x10035c6e6\nxor     esi, esi                                                       ; +0x79, 0x10035c6e9\nmov     rdx, rbx                                                       ; +0x7b, 0x10035c6eb\nmov     rcx, r13                                                       ; +0x7e, 0x10035c6ee\nxor     r8d, r8d                                                       ; +0x81, 0x10035c6f1\ncall    CCMenuItemSpriteExtra__create                                  ; +0x84, 0x10035c6f4\nmov     [rbx+268h], rax                                                ; +0x89, 0x10035c6f9\nmov     rcx, [r15]                                                     ; +0x90, 0x10035c700\nmov     rdi, r15                                                       ; +0x93, 0x10035c703\nmov     rsi, rax                                                       ; +0x96, 0x10035c706\ncall    qword ptr [rcx+1C8h]                                           ; +0x99, 0x10035c709\nmov     r13, [rbx+268h]                                                ; +0x9f, 0x10035c70f\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xa6, 0x10035c716\nmov     rdi, rax                                                       ; +0xab, 0x10035c71b\ncall    sub_100479760                                                  ; +0xae, 0x10035c71e\naddss   xmm0, cs:dword_100A04CAC                                       ; +0xb3, 0x10035c723\nlea     rdi, [rbp+var_40]                                              ; +0xbb, 0x10035c72b\nmovss   xmm1, [rbp+var_30]                                             ; +0xbf, 0x10035c72f\ncall    sub_100278250                                                  ; +0xc4, 0x10035c734\nlea     r14, [rbp+var_38]                                              ; +0xc9, 0x10035c739\nmov     rdi, r14                                                       ; +0xcd, 0x10035c73d\nmov     rsi, r15                                                       ; +0xd0, 0x10035c740\nlea     rdx, [rbp+var_40]                                              ; +0xd3, 0x10035c743\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0xd7, 0x10035c747\nmov     rax, [r13+0]                                                   ; +0xdc, 0x10035c74c\nmov     rdi, r13                                                       ; +0xe0, 0x10035c750\nmov     rsi, r14                                                       ; +0xe3, 0x10035c753\ncall    qword ptr [rax+0B8h]                                           ; +0xe6, 0x10035c756\nmov     rdi, r12                                                       ; +0xec, 0x10035c75c\ncall    cocos2d__CCSprite__createWithSpriteFrameName                   ; +0xef, 0x10035c75f\nmov     r12, rax                                                       ; +0xf4, 0x10035c764\ncmp     [rbp+var_29], 0                                                ; +0xf7, 0x10035c767\njnz     short loc_10035C77A                                            ; +0xfb, 0x10035c76b\nmov     rdi, r12                                                       ; +0xfd, 0x10035c76d\nmov     esi, 1                                                         ; +0x100, 0x10035c770\ncall    cocos2d__CCSprite__setFlipX                                    ; +0x105, 0x10035c775\nlea     rcx, AchievementsLayer__onNextPage                             ; +0x10a, 0x10035c77a\nmov     rdi, r12                                                       ; +0x111, 0x10035c781\nxor     esi, esi                                                       ; +0x114, 0x10035c784\nmov     rdx, rbx                                                       ; +0x116, 0x10035c786\nxor     r8d, r8d                                                       ; +0x119, 0x10035c789\ncall    CCMenuItemSpriteExtra__create                                  ; +0x11c, 0x10035c78c\nmov     [rbx+260h], rax                                                ; +0x121, 0x10035c791\nmov     rcx, [r15]                                                     ; +0x128, 0x10035c798\nmov     rdi, r15                                                       ; +0x12b, 0x10035c79b\nmov     rsi, rax                                                       ; +0x12e, 0x10035c79e\ncall    qword ptr [rcx+1C8h]                                           ; +0x131, 0x10035c7a1\nmov     r14, [rbx+260h]                                                ; +0x137, 0x10035c7a7\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x13e, 0x10035c7ae\nmov     rdi, rax                                                       ; +0x143, 0x10035c7b3\ncall    sub_100479770                                                  ; +0x146, 0x10035c7b6\naddss   xmm0, cs:dword_100A037B0                                       ; +0x14b, 0x10035c7bb\nlea     r12, [rbp+var_40]                                              ; +0x153, 0x10035c7c3\nmov     rdi, r12                                                       ; +0x157, 0x10035c7c7\nmovss   xmm1, [rbp+var_30]                                             ; +0x15a, 0x10035c7ca\ncall    sub_100278250                                                  ; +0x15f, 0x10035c7cf\nlea     r13, [rbp+var_38]                                              ; +0x164, 0x10035c7d4\nmov     rdi, r13                                                       ; +0x168, 0x10035c7d8\nmov     rsi, r15                                                       ; +0x16b, 0x10035c7db\nmov     rdx, r12                                                       ; +0x16e, 0x10035c7de\ncall    cocos2d__CCNode__convertToNodeSpace                            ; +0x171, 0x10035c7e1\nmov     rax, [r14]                                                     ; +0x176, 0x10035c7e6\nmov     rdi, r14                                                       ; +0x179, 0x10035c7e9\nmov     rsi, r13                                                       ; +0x17c, 0x10035c7ec\ncall    qword ptr [rax+0B8h]                                           ; +0x17f, 0x10035c7ef\nmov     rdi, [rbx+240h]                                                ; +0x185, 0x10035c7f5\nmov     rax, [rdi]                                                     ; +0x18c, 0x10035c7fc\nmov     rsi, r15                                                       ; +0x18f, 0x10035c7ff\nmov     edx, 0Ah                                                       ; +0x192, 0x10035c802\ncall    qword ptr [rax+1D0h]                                           ; +0x197, 0x10035c807\nlea     rdi, asc_100A41844; \" \"                                        ; +0x19d, 0x10035c80d\nlea     rsi, aGoldfontFnt; \"goldFont.fnt\"                              ; +0x1a4, 0x10035c814\ncall    cocos2d__CCLabelBMFont__create_3                               ; +0x1ab, 0x10035c81b\nmov     [rbx+270h], rax                                                ; +0x1b0, 0x10035c820\nmov     rdi, [rbx+240h]                                                ; +0x1b7, 0x10035c827\nmov     rcx, [rdi]                                                     ; +0x1be, 0x10035c82e\nmov     rsi, rax                                                       ; +0x1c1, 0x10035c831\ncall    qword ptr [rcx+1C8h]                                           ; +0x1c4, 0x10035c834\nmov     r15, [rbx+270h]                                                ; +0x1ca, 0x10035c83a\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x1d1, 0x10035c841\nmov     rdi, rax                                                       ; +0x1d6, 0x10035c846\ncall    sub_100479770                                                  ; +0x1d9, 0x10035c849\naddss   xmm0, cs:dword_100A040B4                                       ; +0x1de, 0x10035c84e\nmovss   [rbp+var_30], xmm0                                             ; +0x1e6, 0x10035c856\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x1eb, 0x10035c85b\nmov     rdi, rax                                                       ; +0x1f0, 0x10035c860\ncall    sub_100479740                                                  ; +0x1f3, 0x10035c863\nmovaps  xmm1, xmm0                                                     ; +0x1f8, 0x10035c868\naddss   xmm1, cs:dword_100A03FD4                                       ; +0x1fb, 0x10035c86b\nlea     r14, [rbp+var_38]                                              ; +0x203, 0x10035c873\nmov     rdi, r14                                                       ; +0x207, 0x10035c877\nmovss   xmm0, [rbp+var_30]                                             ; +0x20a, 0x10035c87a\ncall    sub_100278250                                                  ; +0x20f, 0x10035c87f\nmov     rax, [r15]                                                     ; +0x214, 0x10035c884\nmov     rdi, r15                                                       ; +0x217, 0x10035c887\nmov     rsi, r14                                                       ; +0x21a, 0x10035c88a\ncall    qword ptr [rax+0B8h]                                           ; +0x21d, 0x10035c88d\nmov     r14, [rbx+270h]                                                ; +0x223, 0x10035c893\nlea     r15, [rbp+var_38]                                              ; +0x22a, 0x10035c89a\nmovss   xmm0, cs:alpha                                                 ; +0x22e, 0x10035c89e\nmov     rdi, r15                                                       ; +0x236, 0x10035c8a6\nmovaps  xmm1, xmm0                                                     ; +0x239, 0x10035c8a9\ncall    sub_100278250                                                  ; +0x23c, 0x10035c8ac\nmov     rax, [r14]                                                     ; +0x241, 0x10035c8b1\nmov     rdi, r14                                                       ; +0x244, 0x10035c8b4\nmov     rsi, r15                                                       ; +0x247, 0x10035c8b7\ncall    qword ptr [rax+128h]                                           ; +0x24a, 0x10035c8ba\nmov     rdi, [rbx+270h]                                                ; +0x250, 0x10035c8c0\nmov     rax, [rdi]                                                     ; +0x257, 0x10035c8c7\nmovss   xmm0, cs:dword_100A037D4                                       ; +0x25a, 0x10035c8ca\ncall    qword ptr [rax+0A0h]                                           ; +0x262, 0x10035c8d2\nmov     rdi, rbx                                                       ; +0x268, 0x10035c8d8\nxor     esi, esi                                                       ; +0x26b, 0x10035c8db\ncall    AchievementsLayer__loadPage                                    ; +0x26d, 0x10035c8dd\ncmp     [rbp+var_29], 0                                                ; +0x272, 0x10035c8e2\njz      short loc_10035C8F4                                            ; +0x276, 0x10035c8e6\nmov     rdi, [rbx+240h]                                                ; +0x278, 0x10035c8e8\ncall    GameToolbox__addRThumbScrollButton                             ; +0x27f, 0x10035c8ef\nadd     rsp, 28h                                                       ; +0x284, 0x10035c8f4\npop     rbx                                                            ; +0x288, 0x10035c8f8\npop     r12                                                            ; +0x289, 0x10035c8f9\npop     r13                                                            ; +0x28b, 0x10035c8fb\npop     r14                                                            ; +0x28d, 0x10035c8fd\npop     r15                                                            ; +0x28f, 0x10035c8ff\npop     rbp                                                            ; +0x291, 0x10035c901\nretn                                                                   ; +0x292, 0x10035c902", "xrefs": ["<???> @ 0x100b25780"], "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"}