{"type": "func", "start": 5369329344, "end": 5369330034, "name": "AchievementsLayer::customSetup", "pseudocode": "// \n// AchievementsLayer::customSetup from 0x1400976c0 to 0x140097972 (690 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x140719da8\n// > <???> @ 0x140912cc8\n// > <???> @ 0x140912cd4\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 11:26:03 +0000\n// \n\n__int64 __fastcall AchievementsLayer::customSetup(__int64 *a1)\n{\n  __int64 v2; // rax\n  char v3; // r15\n  __int64 v4; // rax\n  const char *v5; // rsi\n  float v6; // xmm6_4\n  __int64 v7; // r14\n  const char *v8; // rcx\n  int v9; // eax\n  cocos2d::CCObject *v10; // rax\n  __int64 *v11; // rdi\n  __int64 v12; // rbx\n  __int64 v13; // rcx\n  cocos2d::CCDirector *v14; // rax\n  float v15; // xmm0_4\n  __int64 v16; // rax\n  __int64 v17; // rax\n  cocos2d::CCSprite *v18; // rax\n  int v19; // ebx\n  cocos2d::CCObject *v20; // rax\n  __int64 *v21; // rdi\n  __int64 v22; // rbx\n  __int64 v23; // rcx\n  cocos2d::CCDirector *v24; // rax\n  float v25; // xmm0_4\n  __int64 v26; // rax\n  __int64 v27; // rax\n  struct cocos2d::CCLabelBMFont *v28; // rax\n  __int64 v29; // rcx\n  __int64 *v30; // rdi\n  __int64 v31; // rbx\n  __int64 v32; // rcx\n  cocos2d::CCDirector *v33; // rax\n  float v34; // xmm6_4\n  __int64 v35; // rcx\n  cocos2d::CCDirector *v36; // rax\n  float ScreenRight; // xmm1_4\n  __int64 v38; // rax\n  __int64 *v39; // rdi\n  __int64 v40; // rbx\n  __int64 v41; // rax\n  __int64 result; // rax\n  char v43; // [rsp+60h] [rbp+8h] BYREF\n  float v44; // [rsp+64h] [rbp+Ch]\n  char v45; // [rsp+68h] [rbp+10h] BYREF\n  char v46; // [rsp+70h] [rbp+18h] BYREF\n\n  v2 = cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v2, &v43);\n  v3 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication() + 209);\n  v4 = cocos2d::CCMenu::create();\n  v5 = \"GJ_arrow_01_001.png\";\n  v6 = v44 * 0.5;\n  v7 = v4;\n  v8 = \"GJ_arrow_01_001.png\";\n  if ( v3 )\n    v8 = \"controllerBtn_DPad_Left_001.png\";\n  v9 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName(v8);\n  v10 = CCMenuItemSpriteExtra::create(v9, 0, (int)a1, (__int64)AchievementsLayer::onPrevPage);\n  a1[78] = (__int64)v10;\n  (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v7 + 464LL))(v7, v10);\n  v11 = (__int64 *)a1[78];\n  v12 = *v11;\n  v14 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v13);\n  v15 = cocos2d::CCDirector::getScreenLeft(v14) + 24.0;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v45, v15, v6);\n  cocos2d::CCNode::convertToNodeSpace(v7, &v46, v16);\n  (*(void (__fastcall **)(__int64 *, __int64))(v12 + 184))(v11, v17);\n  if ( v3 )\n    v5 = \"controllerBtn_DPad_Right_001.png\";\n  v18 = cocos2d::CCSprite::createWithSpriteFrameName(v5);\n  v19 = (int)v18;\n  if ( !v3 )\n    cocos2d::CCSprite::setFlipX(v18, 1);\n  v20 = CCMenuItemSpriteExtra::create(v19, 0, (int)a1, (__int64)AchievementsLayer::onNextPage);\n  a1[77] = (__int64)v20;\n  (*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)v7 + 464LL))(v7, v20);\n  v21 = (__int64 *)a1[77];\n  v22 = *v21;\n  v24 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v23);\n  v25 = cocos2d::CCDirector::getScreenRight(v24) - 24.0;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v45, v25, v6);\n  cocos2d::CCNode::convertToNodeSpace(v7, &v46, v26);\n  (*(void (__fastcall **)(__int64 *, __int64))(v22 + 184))(v21, v27);\n  (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1[72] + 456LL))(a1[72], v7, 10);\n  v28 = cocos2d::CCLabelBMFont::create(\" \", \"goldFont.fnt\");\n  v29 = a1[72];\n  a1[79] = (__int64)v28;\n  (*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v29 + 464LL))(v29, v28);\n  v30 = (__int64 *)a1[79];\n  v31 = *v30;\n  v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);\n  v34 = cocos2d::CCDirector::getScreenTop(v33) - 4.0;\n  v36 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v35);\n  ScreenRight = cocos2d::CCDirector::getScreenRight(v36);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v45, (float)(ScreenRight - 7.0) - 0.0, v34);\n  (*(void (__fastcall **)(__int64 *, __int64))(v31 + 184))(v30, v38);\n  v39 = (__int64 *)a1[79];\n  v40 = *v39;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v45, 1.0, 1.0);\n  (*(void (__fastcall **)(__int64 *, __int64))(v40 + 288))(v39, v41);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)a1[79] + 160LL))(a1[79]);\n  result = AchievementsLayer::loadPage(a1, 0);\n  if ( v3 )\n    return GameToolbox::addRThumbScrollButton(a1[72]);\n  return result;\n}", "assembly": "; \n; AchievementsLayer::customSetup from 0x1400976c0 to 0x140097972 (690 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x140719da8\n; > <???> @ 0x140912cc8\n; > <???> @ 0x140912cd4\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 11:26:03 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x1400976c0\npush    rbp                                                            ; +0x5, 0x1400976c5\npush    rsi                                                            ; +0x6, 0x1400976c6\npush    rdi                                                            ; +0x7, 0x1400976c7\npush    r14                                                            ; +0x8, 0x1400976c8\npush    r15                                                            ; +0xa, 0x1400976ca\nsub     rsp, 30h                                                       ; +0xc, 0x1400976cc\nmovaps  [rsp+58h+var_38], xmm6                                         ; +0x10, 0x1400976d0\nmov     rbp, rcx                                                       ; +0x15, 0x1400976d5\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x18, 0x1400976d8\nmov     rcx, rax                                                       ; +0x1e, 0x1400976de\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x21, 0x1400976e1\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x26, 0x1400976e6\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x2c, 0x1400976ec\nmovzx   r15d, byte ptr [rax+0D1h]                                      ; +0x32, 0x1400976f2\ncall    cs:?create@CCMenu@cocos2d@@SAPEAV12@XZ; cocos2d::CCMenu::create(void) ; +0x3a, 0x1400976fa\nmovss   xmm6, [rsp+58h+arg_4]                                          ; +0x40, 0x140097700\nlea     rsi, aGjArrow01001Pn; \"GJ_arrow_01_001.png\"                    ; +0x46, 0x140097706\nmulss   xmm6, cs:dword_140834F20                                       ; +0x4d, 0x14009770d\nmov     r14, rax                                                       ; +0x55, 0x140097715\nlea     rax, aControllerbtnD; \"controllerBtn_DPad_Left_001.png\"        ; +0x58, 0x140097718\ntest    r15b, r15b                                                     ; +0x5f, 0x14009771f\nmov     rcx, rsi                                                       ; +0x62, 0x140097722\ncmovnz  rcx, rax                                                       ; +0x65, 0x140097725\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x69, 0x140097729\nlea     r9, AchievementsLayer__onPrevPage                              ; +0x6f, 0x14009772f\nmov     r8, rbp                                                        ; +0x76, 0x140097736\nmov     rcx, rax                                                       ; +0x79, 0x140097739\nxor     edx, edx                                                       ; +0x7c, 0x14009773c\ncall    CCMenuItemSpriteExtra__create                                  ; +0x7e, 0x14009773e\nmov     [rbp+270h], rax                                                ; +0x83, 0x140097743\nmov     rdx, rax                                                       ; +0x8a, 0x14009774a\nmov     rcx, [r14]                                                     ; +0x8d, 0x14009774d\nmov     r8, [rcx+1D0h]                                                 ; +0x90, 0x140097750\nmov     rcx, r14                                                       ; +0x97, 0x140097757\ncall    r8                                                             ; +0x9a, 0x14009775a\nmov     rdi, [rbp+270h]                                                ; +0x9d, 0x14009775d\nmov     rbx, [rdi]                                                     ; +0xa4, 0x140097764\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0xa7, 0x140097767\nmov     rcx, rax                                                       ; +0xad, 0x14009776d\ncall    cs:?getScreenLeft@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenLeft(void) ; +0xb0, 0x140097770\nmovaps  xmm2, xmm6                                                     ; +0xb6, 0x140097776\nlea     rcx, [rsp+58h+arg_8]                                           ; +0xb9, 0x140097779\naddss   xmm0, cs:dword_1408355E4                                       ; +0xbe, 0x14009777e\nmovaps  xmm1, xmm0                                                     ; +0xc6, 0x140097786\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xc9, 0x140097789\nlea     rdx, [rsp+58h+arg_10]                                          ; +0xcf, 0x14009778f\nmov     rcx, r14                                                       ; +0xd4, 0x140097794\nmov     r8, rax                                                        ; +0xd7, 0x140097797\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xda, 0x14009779a\nmov     rdx, rax                                                       ; +0xe0, 0x1400977a0\nmov     rcx, rdi                                                       ; +0xe3, 0x1400977a3\ncall    qword ptr [rbx+0B8h]                                           ; +0xe6, 0x1400977a6\nlea     rax, aControllerbtnD_0; \"controllerBtn_DPad_Right_001.png\"     ; +0xec, 0x1400977ac\ntest    r15b, r15b                                                     ; +0xf3, 0x1400977b3\ncmovnz  rsi, rax                                                       ; +0xf6, 0x1400977b6\nmov     rcx, rsi                                                       ; +0xfa, 0x1400977ba\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xfd, 0x1400977bd\nmov     rbx, rax                                                       ; +0x103, 0x1400977c3\ntest    r15b, r15b                                                     ; +0x106, 0x1400977c6\njnz     short loc_1400977D6                                            ; +0x109, 0x1400977c9\nmov     dl, 1                                                          ; +0x10b, 0x1400977cb\nmov     rcx, rax                                                       ; +0x10d, 0x1400977cd\ncall    cs:?setFlipX@CCSprite@cocos2d@@QEAAX_N@Z; cocos2d::CCSprite::setFlipX(bool) ; +0x110, 0x1400977d0\nlea     r9, AchievementsLayer__onNextPage                              ; +0x116, 0x1400977d6\nmov     r8, rbp                                                        ; +0x11d, 0x1400977dd\nxor     edx, edx                                                       ; +0x120, 0x1400977e0\nmov     rcx, rbx                                                       ; +0x122, 0x1400977e2\ncall    CCMenuItemSpriteExtra__create                                  ; +0x125, 0x1400977e5\nmov     [rbp+268h], rax                                                ; +0x12a, 0x1400977ea\nmov     rdx, rax                                                       ; +0x131, 0x1400977f1\nmov     rcx, [r14]                                                     ; +0x134, 0x1400977f4\nmov     r8, [rcx+1D0h]                                                 ; +0x137, 0x1400977f7\nmov     rcx, r14                                                       ; +0x13e, 0x1400977fe\ncall    r8                                                             ; +0x141, 0x140097801\nmov     rdi, [rbp+268h]                                                ; +0x144, 0x140097804\nmov     rbx, [rdi]                                                     ; +0x14b, 0x14009780b\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x14e, 0x14009780e\nmov     rcx, rax                                                       ; +0x154, 0x140097814\ncall    cs:?getScreenRight@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenRight(void) ; +0x157, 0x140097817\nmovaps  xmm2, xmm6                                                     ; +0x15d, 0x14009781d\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x160, 0x140097820\nsubss   xmm0, cs:dword_1408355E4                                       ; +0x165, 0x140097825\nmovaps  xmm1, xmm0                                                     ; +0x16d, 0x14009782d\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x170, 0x140097830\nlea     rdx, [rsp+58h+arg_10]                                          ; +0x176, 0x140097836\nmov     rcx, r14                                                       ; +0x17b, 0x14009783b\nmov     r8, rax                                                        ; +0x17e, 0x14009783e\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x181, 0x140097841\nmov     rdx, rax                                                       ; +0x187, 0x140097847\nmov     rcx, rdi                                                       ; +0x18a, 0x14009784a\ncall    qword ptr [rbx+0B8h]                                           ; +0x18d, 0x14009784d\nmov     rcx, [rbp+240h]                                                ; +0x193, 0x140097853\nmov     r8d, 0Ah                                                       ; +0x19a, 0x14009785a\nmov     rdx, r14                                                       ; +0x1a0, 0x140097860\nmov     rax, [rcx]                                                     ; +0x1a3, 0x140097863\ncall    qword ptr [rax+1C8h]                                           ; +0x1a6, 0x140097866\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0x1ac, 0x14009786c\nlea     rcx, asc_1406ED6E4; \" \"                                        ; +0x1b3, 0x140097873\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x1ba, 0x14009787a\nmov     rcx, [rbp+240h]                                                ; +0x1c0, 0x140097880\nmov     [rbp+278h], rax                                                ; +0x1c7, 0x140097887\nmov     rdx, [rcx]                                                     ; +0x1ce, 0x14009788e\nmov     r8, [rdx+1D0h]                                                 ; +0x1d1, 0x140097891\nmov     rdx, rax                                                       ; +0x1d8, 0x140097898\ncall    r8                                                             ; +0x1db, 0x14009789b\nmov     rdi, [rbp+278h]                                                ; +0x1de, 0x14009789e\nmov     rbx, [rdi]                                                     ; +0x1e5, 0x1400978a5\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1e8, 0x1400978a8\nmov     rcx, rax                                                       ; +0x1ee, 0x1400978ae\ncall    cs:?getScreenTop@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenTop(void) ; +0x1f1, 0x1400978b1\nmovaps  xmm6, xmm0                                                     ; +0x1f7, 0x1400978b7\nsubss   xmm6, cs:dword_140835450                                       ; +0x1fa, 0x1400978ba\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x202, 0x1400978c2\nmov     rcx, rax                                                       ; +0x208, 0x1400978c8\ncall    cs:?getScreenRight@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenRight(void) ; +0x20b, 0x1400978cb\nmovaps  xmm2, xmm6                                                     ; +0x211, 0x1400978d1\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x214, 0x1400978d4\nmovaps  xmm1, xmm0                                                     ; +0x219, 0x1400978d9\nxorps   xmm0, xmm0                                                     ; +0x21c, 0x1400978dc\nsubss   xmm1, cs:dword_1408354A4                                       ; +0x21f, 0x1400978df\nsubss   xmm1, xmm0                                                     ; +0x227, 0x1400978e7\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x22b, 0x1400978eb\nmov     rdx, rax                                                       ; +0x231, 0x1400978f1\nmov     rcx, rdi                                                       ; +0x234, 0x1400978f4\ncall    qword ptr [rbx+0B8h]                                           ; +0x237, 0x1400978f7\nmov     rdi, [rbp+278h]                                                ; +0x23d, 0x1400978fd\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x244, 0x140097904\nmovss   xmm1, cs:flt_140835080                                         ; +0x249, 0x140097909\nmovaps  xmm2, xmm1                                                     ; +0x251, 0x140097911\nmov     rbx, [rdi]                                                     ; +0x254, 0x140097914\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x257, 0x140097917\nmov     rdx, rax                                                       ; +0x25d, 0x14009791d\nmov     rcx, rdi                                                       ; +0x260, 0x140097920\ncall    qword ptr [rbx+120h]                                           ; +0x263, 0x140097923\nmov     rcx, [rbp+278h]                                                ; +0x269, 0x140097929\nmovss   xmm1, cs:dword_140834F64                                       ; +0x270, 0x140097930\nmov     rax, [rcx]                                                     ; +0x278, 0x140097938\ncall    qword ptr [rax+0A0h]                                           ; +0x27b, 0x14009793b\nxor     edx, edx                                                       ; +0x281, 0x140097941\nmov     rcx, rbp                                                       ; +0x283, 0x140097943\ncall    AchievementsLayer__loadPage                                    ; +0x286, 0x140097946\ntest    r15b, r15b                                                     ; +0x28b, 0x14009794b\njz      short loc_14009795C                                            ; +0x28e, 0x14009794e\nmov     rcx, [rbp+240h]                                                ; +0x290, 0x140097950\ncall    GameToolbox__addRThumbScrollButton                             ; +0x297, 0x140097957\nmov     rbx, [rsp+58h+arg_18]                                          ; +0x29c, 0x14009795c\nmovaps  xmm6, [rsp+58h+var_38]                                         ; +0x2a1, 0x140097961\nadd     rsp, 30h                                                       ; +0x2a6, 0x140097966\npop     r15                                                            ; +0x2aa, 0x14009796a\npop     r14                                                            ; +0x2ac, 0x14009796c\npop     rdi                                                            ; +0x2ae, 0x14009796e\npop     rsi                                                            ; +0x2af, 0x14009796f\npop     rbp                                                            ; +0x2b0, 0x140097970\nretn                                                                   ; +0x2b1, 0x140097971", "xrefs": ["<???> @ 0x140719da8", "<???> @ 0x140912cc8", "<???> @ 0x140912cd4"], "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"}