{"type": "func", "start": 5369241600, "end": 5369242285, "name": "AchievementsLayer::customSetup", "pseudocode": "// \n// AchievementsLayer::customSetup from 0x140082000 to 0x1400822ad (685 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x14053c390\n// > <???> @ 0x1406c69fc\n// > <???> @ 0x1406c6a08\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 AchievementsLayer::customSetup(AchievementsLayer *a1)\n{\n  cocos2d::CCDirector *v2; // rax\n  __int64 v3; // rdx\n  __int64 v4; // rcx\n  char v5; // bp\n  __int64 v6; // rcx\n  const char *v7; // rdi\n  float v8; // xmm6_4\n  cocos2d::CCNode *v9; // r14\n  const char *v10; // rcx\n  struct cocos2d::CCSprite *v11; // rax\n  CCMenuItemSpriteExtra *v12; // rax\n  CCMenuItemSpriteExtra_vtbl *v13; // rbx\n  __int64 v14; // rcx\n  cocos2d::CCDirector *v15; // rax\n  float v16; // xmm0_4\n  struct cocos2d::CCPoint v17; // rax\n  cocos2d::CCSprite *v18; // rax\n  cocos2d::CCNode *v19; // rbx\n  CCMenuItemSpriteExtra *v20; // rax\n  CCMenuItemSpriteExtra_vtbl *v21; // rbx\n  __int64 v22; // rcx\n  cocos2d::CCDirector *v23; // rax\n  float v24; // xmm0_4\n  struct cocos2d::CCPoint v25; // rax\n  cocos2d::CCLabelBMFont *v26; // rax\n  cocos2d::CCLayer *m_mainLayer; // rcx\n  cocos2d::CCLabelBMFont_vtbl *v28; // rbx\n  __int64 v29; // rcx\n  cocos2d::CCDirector *v30; // rax\n  float v31; // xmm6_4\n  __int64 v32; // rcx\n  cocos2d::CCDirector *v33; // rax\n  float v34; // xmm0_4\n  const cocos2d::CCPoint *v35; // rax\n  cocos2d::CCLabelBMFont_vtbl *v36; // rbx\n  const cocos2d::CCPoint *v37; // rax\n  float v38; // [rsp+64h] [rbp+Ch]\n  cocos2d::CCPoint v39; // [rsp+68h] [rbp+10h] BYREF\n  struct cocos2d::CCPoint v40; // [rsp+70h] [rbp+18h] BYREF\n\n  v2 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(a1);\n  cocos2d::CCDirector::getWinSize(v2);\n  v5 = *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v4, v3) + 197);\n  v7 = \"GJ_arrow_01_001.png\";\n  v8 = v38 * 0.5;\n  v9 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v6);\n  v10 = \"GJ_arrow_01_001.png\";\n  if ( v5 )\n    v10 = \"controllerBtn_DPad_Left_001.png\";\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName(v10);\n  v12 = CCMenuItemSpriteExtra::create(v11, nullptr, a1, (cocos2d::SEL_MenuHandler *)AchievementsLayer::onPrevPage);\n  a1->m_prevPageButton = v12;\n  v9->addChild_1(v9, v12);\n  v13 = a1->m_prevPageButton->__vftable;\n  v15 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);\n  v16 = cocos2d::CCDirector::getScreenLeft(v15) + 24.0;\n  cocos2d::CCPoint::CCPoint(&v39, v16, v8);\n  v17 = cocos2d::CCNode::convertToNodeSpace(v9, &v40);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v13->setPosition_0)(a1->m_prevPageButton, v17);\n  if ( v5 )\n    v7 = \"controllerBtn_DPad_Right_001.png\";\n  v18 = cocos2d::CCSprite::createWithSpriteFrameName(v7);\n  v19 = v18;\n  if ( !v5 )\n    cocos2d::CCSprite::setFlipX(v18, 1);\n  v20 = CCMenuItemSpriteExtra::create(v19, nullptr, a1, (cocos2d::SEL_MenuHandler *)AchievementsLayer::onNextPage);\n  a1->m_nextPageButton = v20;\n  v9->addChild_1(v9, v20);\n  v21 = a1->m_nextPageButton->__vftable;\n  v23 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v22);\n  v24 = cocos2d::CCDirector::getScreenRight(v23) - 24.0;\n  cocos2d::CCPoint::CCPoint(&v39, v24, v8);\n  v25 = cocos2d::CCNode::convertToNodeSpace(v9, &v40);\n  ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v21->setPosition_0)(a1->m_nextPageButton, v25);\n  a1->m_mainLayer->addChild_0(a1->m_mainLayer, v9, 10);\n  v26 = cocos2d::CCLabelBMFont::create(\" \", \"goldFont.fnt\");\n  m_mainLayer = a1->m_mainLayer;\n  a1->m_pageLabel = v26;\n  m_mainLayer->addChild_1(m_mainLayer, v26);\n  v28 = a1->m_pageLabel->__vftable;\n  v30 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v29);\n  v31 = cocos2d::CCDirector::getScreenTop(v30) - 4.0;\n  v33 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v32);\n  v34 = (float)(cocos2d::CCDirector::getScreenRight(v33) - 7.0) - 0.0;\n  cocos2d::CCPoint::CCPoint(&v39, v34, v31);\n  v28->setPosition_0(a1->m_pageLabel, v35);\n  v36 = a1->m_pageLabel->__vftable;\n  cocos2d::CCPoint::CCPoint(&v39, 1.0, 1.0);\n  v36->setAnchorPoint(a1->m_pageLabel, v37);\n  ((void (__fastcall *)(cocos2d::CCLabelBMFont *))a1->m_pageLabel->setScale_0)(a1->m_pageLabel);\n  AchievementsLayer::loadPage(a1, 0);\n  if ( v5 )\n    GameToolbox::addRThumbScrollButton(a1->m_mainLayer);\n}", "assembly": "; \n; AchievementsLayer::customSetup from 0x140082000 to 0x1400822ad (685 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x14053c390\n; > <???> @ 0x1406c69fc\n; > <???> @ 0x1406c6a08\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    rbx                                                            ; +0x0, 0x140082000\npush    rbp                                                            ; +0x2, 0x140082002\npush    rsi                                                            ; +0x3, 0x140082003\npush    rdi                                                            ; +0x4, 0x140082004\npush    r14                                                            ; +0x5, 0x140082005\nsub     rsp, 30h                                                       ; +0x7, 0x140082007\nmovaps  [rsp+58h+var_38], xmm6                                         ; +0xb, 0x14008200b\nmov     rsi, rcx                                                       ; +0x10, 0x140082010\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x13, 0x140082013\nmov     rcx, rax                                                       ; +0x19, 0x140082019\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x1c, 0x14008201c\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x21, 0x140082021\ncall    cs:?sharedApplication@CCApplication@cocos2d@@SAPEAV12@XZ; cocos2d::CCApplication::sharedApplication(void) ; +0x27, 0x140082027\nmovzx   ebp, byte ptr [rax+0C5h]                                       ; +0x2d, 0x14008202d\ncall    cs:?create@CCMenu@cocos2d@@SAPEAV12@XZ; cocos2d::CCMenu::create(void) ; +0x34, 0x140082034\nmovss   xmm6, [rsp+58h+arg_4]                                          ; +0x3a, 0x14008203a\nlea     rdi, aGjArrow01001Pn; \"GJ_arrow_01_001.png\"                    ; +0x40, 0x140082040\nmulss   xmm6, cs:dword_140622B08                                       ; +0x47, 0x140082047\nmov     r14, rax                                                       ; +0x4f, 0x14008204f\nlea     rax, aControllerbtnD; \"controllerBtn_DPad_Left_001.png\"        ; +0x52, 0x140082052\ntest    bpl, bpl                                                       ; +0x59, 0x140082059\nmov     rcx, rdi                                                       ; +0x5c, 0x14008205c\ncmovnz  rcx, rax                                                       ; +0x5f, 0x14008205f\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x63, 0x140082063\nlea     r9, AchievementsLayer__onPrevPage                              ; +0x69, 0x140082069\nmov     r8, rsi                                                        ; +0x70, 0x140082070\nmov     rcx, rax                                                       ; +0x73, 0x140082073\nxor     edx, edx                                                       ; +0x76, 0x140082076\ncall    CCMenuItemSpriteExtra__create                                  ; +0x78, 0x140082078\nmov     [rsi+270h], rax                                                ; +0x7d, 0x14008207d\nmov     rdx, rax                                                       ; +0x84, 0x140082084\nmov     r8, [r14]                                                      ; +0x87, 0x140082087\nmov     rcx, r14                                                       ; +0x8a, 0x14008208a\ncall    qword ptr [r8+1C0h]                                            ; +0x8d, 0x14008208d\nmov     rax, [rsi+270h]                                                ; +0x94, 0x140082094\nmov     rbx, [rax]                                                     ; +0x9b, 0x14008209b\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x9e, 0x14008209e\nmov     rcx, rax                                                       ; +0xa4, 0x1400820a4\ncall    cs:?getScreenLeft@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenLeft(void) ; +0xa7, 0x1400820a7\nmovaps  xmm2, xmm6                                                     ; +0xad, 0x1400820ad\nlea     rcx, [rsp+58h+arg_8]                                           ; +0xb0, 0x1400820b0\naddss   xmm0, cs:dword_140623140                                       ; +0xb5, 0x1400820b5\nmovaps  xmm1, xmm0                                                     ; +0xbd, 0x1400820bd\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xc0, 0x1400820c0\nlea     rdx, [rsp+58h+arg_10]                                          ; +0xc6, 0x1400820c6\nmov     rcx, r14                                                       ; +0xcb, 0x1400820cb\nmov     r8, rax                                                        ; +0xce, 0x1400820ce\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0xd1, 0x1400820d1\nmov     rcx, [rsi+270h]                                                ; +0xd7, 0x1400820d7\nmov     rdx, rax                                                       ; +0xde, 0x1400820de\ncall    qword ptr [rbx+0B8h]                                           ; +0xe1, 0x1400820e1\nlea     rax, aControllerbtnD_0; \"controllerBtn_DPad_Right_001.png\"     ; +0xe7, 0x1400820e7\ntest    bpl, bpl                                                       ; +0xee, 0x1400820ee\ncmovnz  rdi, rax                                                       ; +0xf1, 0x1400820f1\nmov     rcx, rdi                                                       ; +0xf5, 0x1400820f5\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xf8, 0x1400820f8\nmov     rbx, rax                                                       ; +0xfe, 0x1400820fe\ntest    bpl, bpl                                                       ; +0x101, 0x140082101\njnz     short loc_140082111                                            ; +0x104, 0x140082104\nmov     dl, 1                                                          ; +0x106, 0x140082106\nmov     rcx, rax                                                       ; +0x108, 0x140082108\ncall    cs:?setFlipX@CCSprite@cocos2d@@QEAAX_N@Z; cocos2d::CCSprite::setFlipX(bool) ; +0x10b, 0x14008210b\nlea     r9, AchievementsLayer__onNextPage                              ; +0x111, 0x140082111\nmov     r8, rsi                                                        ; +0x118, 0x140082118\nxor     edx, edx                                                       ; +0x11b, 0x14008211b\nmov     rcx, rbx                                                       ; +0x11d, 0x14008211d\ncall    CCMenuItemSpriteExtra__create                                  ; +0x120, 0x140082120\nmov     [rsi+268h], rax                                                ; +0x125, 0x140082125\nmov     rdx, rax                                                       ; +0x12c, 0x14008212c\nmov     r8, [r14]                                                      ; +0x12f, 0x14008212f\nmov     rcx, r14                                                       ; +0x132, 0x140082132\ncall    qword ptr [r8+1C0h]                                            ; +0x135, 0x140082135\nmov     rax, [rsi+268h]                                                ; +0x13c, 0x14008213c\nmov     rbx, [rax]                                                     ; +0x143, 0x140082143\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x146, 0x140082146\nmov     rcx, rax                                                       ; +0x14c, 0x14008214c\ncall    cs:?getScreenRight@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenRight(void) ; +0x14f, 0x14008214f\nmovaps  xmm2, xmm6                                                     ; +0x155, 0x140082155\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x158, 0x140082158\nsubss   xmm0, cs:dword_140623140                                       ; +0x15d, 0x14008215d\nmovaps  xmm1, xmm0                                                     ; +0x165, 0x140082165\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x168, 0x140082168\nlea     rdx, [rsp+58h+arg_10]                                          ; +0x16e, 0x14008216e\nmov     rcx, r14                                                       ; +0x173, 0x140082173\nmov     r8, rax                                                        ; +0x176, 0x140082176\ncall    cs:?convertToNodeSpace@CCNode@cocos2d@@QEAA?AVCCPoint@2@AEBV32@@Z; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const &) ; +0x179, 0x140082179\nmov     rcx, [rsi+268h]                                                ; +0x17f, 0x14008217f\nmov     rdx, rax                                                       ; +0x186, 0x140082186\ncall    qword ptr [rbx+0B8h]                                           ; +0x189, 0x140082189\nmov     rcx, [rsi+240h]                                                ; +0x18f, 0x14008218f\nmov     r8d, 0Ah                                                       ; +0x196, 0x140082196\nmov     rdx, r14                                                       ; +0x19c, 0x14008219c\nmov     rax, [rcx]                                                     ; +0x19f, 0x14008219f\ncall    qword ptr [rax+1B8h]                                           ; +0x1a2, 0x1400821a2\nlea     rdx, aGoldfontFnt; \"goldFont.fnt\"                              ; +0x1a8, 0x1400821a8\nlea     rcx, asc_140518984; \" \"                                        ; +0x1af, 0x1400821af\ncall    cs:?create@CCLabelBMFont@cocos2d@@SAPEAV12@PEBD0@Z; cocos2d::CCLabelBMFont::create(char const *,char const *) ; +0x1b6, 0x1400821b6\nmov     rcx, [rsi+240h]                                                ; +0x1bc, 0x1400821bc\nmov     rdx, rax                                                       ; +0x1c3, 0x1400821c3\nmov     [rsi+278h], rax                                                ; +0x1c6, 0x1400821c6\nmov     r8, [rcx]                                                      ; +0x1cd, 0x1400821cd\ncall    qword ptr [r8+1C0h]                                            ; +0x1d0, 0x1400821d0\nmov     rax, [rsi+278h]                                                ; +0x1d7, 0x1400821d7\nmov     rbx, [rax]                                                     ; +0x1de, 0x1400821de\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1e1, 0x1400821e1\nmov     rcx, rax                                                       ; +0x1e7, 0x1400821e7\ncall    cs:?getScreenTop@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenTop(void) ; +0x1ea, 0x1400821ea\nmovaps  xmm6, xmm0                                                     ; +0x1f0, 0x1400821f0\nsubss   xmm6, cs:dword_140622FF0                                       ; +0x1f3, 0x1400821f3\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x1fb, 0x1400821fb\nmov     rcx, rax                                                       ; +0x201, 0x140082201\ncall    cs:?getScreenRight@CCDirector@cocos2d@@QEAAMXZ; cocos2d::CCDirector::getScreenRight(void) ; +0x204, 0x140082204\nxorps   xmm2, xmm2                                                     ; +0x20a, 0x14008220a\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x20d, 0x14008220d\nsubss   xmm0, cs:dword_140623038                                       ; +0x212, 0x140082212\nsubss   xmm0, xmm2                                                     ; +0x21a, 0x14008221a\nmovaps  xmm2, xmm6                                                     ; +0x21e, 0x14008221e\nmovaps  xmm1, xmm0                                                     ; +0x221, 0x140082221\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x224, 0x140082224\nmov     rcx, [rsi+278h]                                                ; +0x22a, 0x14008222a\nmov     rdx, rax                                                       ; +0x231, 0x140082231\ncall    qword ptr [rbx+0B8h]                                           ; +0x234, 0x140082234\nmov     rax, [rsi+278h]                                                ; +0x23a, 0x14008223a\nlea     rcx, [rsp+58h+arg_8]                                           ; +0x241, 0x140082241\nmovss   xmm1, cs:flt_140622C24                                         ; +0x246, 0x140082246\nmovaps  xmm2, xmm1                                                     ; +0x24e, 0x14008224e\nmov     rbx, [rax]                                                     ; +0x251, 0x140082251\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x254, 0x140082254\nmov     rcx, [rsi+278h]                                                ; +0x25a, 0x14008225a\nmov     rdx, rax                                                       ; +0x261, 0x140082261\ncall    qword ptr [rbx+110h]                                           ; +0x264, 0x140082264\nmov     rcx, [rsi+278h]                                                ; +0x26a, 0x14008226a\nmovss   xmm1, cs:dword_140622B38                                       ; +0x271, 0x140082271\nmov     rax, [rcx]                                                     ; +0x279, 0x140082279\ncall    qword ptr [rax+0A0h]                                           ; +0x27c, 0x14008227c\nxor     edx, edx                                                       ; +0x282, 0x140082282\nmov     rcx, rsi                                                       ; +0x284, 0x140082284\ncall    AchievementsLayer__loadPage                                    ; +0x287, 0x140082287\ntest    bpl, bpl                                                       ; +0x28c, 0x14008228c\njz      short loc_14008229D                                            ; +0x28f, 0x14008228f\nmov     rcx, [rsi+240h]                                                ; +0x291, 0x140082291\ncall    GameToolbox__addRThumbScrollButton                             ; +0x298, 0x140082298\nmovaps  xmm6, [rsp+58h+var_38]                                         ; +0x29d, 0x14008229d\nadd     rsp, 30h                                                       ; +0x2a2, 0x1400822a2\npop     r14                                                            ; +0x2a6, 0x1400822a6\npop     rdi                                                            ; +0x2a8, 0x1400822a8\npop     rsi                                                            ; +0x2a9, 0x1400822a9\npop     rbp                                                            ; +0x2aa, 0x1400822aa\npop     rbx                                                            ; +0x2ab, 0x1400822ab\nretn                                                                   ; +0x2ac, 0x1400822ac", "xrefs": ["<???> @ 0x14053c390", "<???> @ 0x1406c69fc", "<???> @ 0x1406c6a08"], "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"}