{"type": "func", "start": 4614024, "end": 4614430, "name": "AccountLayer::createToggleButton", "pseudocode": "// \n// AccountLayer::createToggleButton from 0x466788 to 0x46691e (406 bytes)\n// \n// 0 xrefs:\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\nint __fastcall AccountLayer::createToggleButton(\n        int a1,\n        int a2,\n        cocos2d::SEL_MenuHandler a3,\n        bool a4,\n        cocos2d::CCNode *a5,\n        const cocos2d::CCPoint *a6)\n{\n  cocos2d::CCSprite *v7; // r7\n  cocos2d::CCSprite *v8; // r4\n  CCMenuItemToggler *v9; // r4\n  cocos2d::CCLabelBMFont *v10; // r4\n  void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8\n  void (__fastcall *v12)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8\n  float *v13; // r0\n  void (__fastcall *setScale)(cocos2d::CCLabelBMFont *__hidden, float); // r6\n  float *v15; // r0\n  void (__fastcall *v16)(cocos2d::CCLabelBMFont *__hidden, float); // r6\n  int v17; // r1\n  void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+Ch] [bp-28h]\n  cocos2d::CCPoint v21; // [sp+1Ch] [bp-18h] BYREF\n  cocos2d::CCPoint v22; // [sp+24h] [bp-10h] BYREF\n\n  v7 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOn_001.png\");\n  v8 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_checkOff_001.png\");\n  ((void (__fastcall *)(cocos2d::CCSprite *, int))v7->setScale)(v7, 1061997773);\n  ((void (__fastcall *)(cocos2d::CCSprite *, int))v8->setScale)(v8, 1061997773);\n  v9 = CCMenuItemToggler::create(v7, v8, (cocos2d::CCObject *)a1, a3);\n  CCMenuItemToggler::toggle(v9, a4);\n  a5->addChild(a5, v9);\n  setPosition = v9->setPosition;\n  cocos2d::CCNode::convertToNodeSpace(&v22, a5, a6);\n  setPosition(v9, &v22);\n  CCMenuItemToggler::setSizeMult(v9, 1.5);\n  v10 = cocos2d::CCLabelBMFont::create();\n  (*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**(_DWORD **)(a1 + 464) + 220))(*(_DWORD *)(a1 + 464), v10);\n  setAnchorPoint = v10->setAnchorPoint;\n  cocos2d::CCPoint::CCPoint(&v22, 0.0, 0.5);\n  setAnchorPoint(v10, &v22);\n  v12 = v10->setPosition;\n  v13 = (float *)v7->getContentSize(v7);\n  cocos2d::CCPoint::CCPoint(&v21, (float)((float)(*v13 * 0.5) * 0.8) + 8.0, 0.0);\n  cocos2d::CCPoint::operator+(&v22, a6, &v21);\n  v12(v10, &v22);\n  if ( v10->getContentSize(v10)->width > 120.0 )\n  {\n    setScale = v10->setScale;\n    v15 = (float *)v10->getContentSize(v10);\n    ((void (__fastcall *)(cocos2d::CCLabelBMFont *, _DWORD))setScale)(v10, 120.0 / *v15);\n  }\n  v16 = v10->setScale;\n  if ( v10->getScale(v10) > 0.35 )\n    v17 = 1051931443;\n  else\n    v17 = ((int (__fastcall *)(cocos2d::CCLabelBMFont *))v10->getScale)(v10);\n  return ((int (__fastcall *)(cocos2d::CCLabelBMFont *, int))v16)(v10, v17);\n}", "assembly": "; \n; AccountLayer::createToggleButton from 0x466788 to 0x46691e (406 bytes)\n; \n; 0 xrefs:\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.W          {R4-R11,LR}                                            ; +0x0, 0x466788\nMOV             R11, R1                                                ; +0x4, 0x46678c\nVPUSH           {D8}                                                   ; +0x6, 0x46678e\nMOV             R10, R0                                                ; +0xa, 0x466792\nLDR             R5, =(__stack_chk_guard_ptr - 0x46679C)                ; +0xc, 0x466794\nLDR             R0, =(aGjCheckon001Pn - 0x4667A6); \"GJ_checkOn_001.png\" ; +0xe, 0x466796\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x10, 0x466798\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x12, 0x46679a\nVLDR            S16, =0.8                                              ; +0x14, 0x46679c\nSUB             SP, SP, #0x34                                          ; +0x18, 0x4667a0\nADD             R0, PC; \"GJ_checkOn_001.png\"                           ; +0x1a, 0x4667a2\nADD             R1, SP, #0x34+var_24; char *                           ; +0x1c, 0x4667a4\nADD             R6, SP, #0x34+var_10                                   ; +0x1e, 0x4667a6\nLDR.W           R8, [SP,#0x34+arg_4]                                   ; +0x20, 0x4667a8\nSTM.W           R1, {R2,R3}                                            ; +0x24, 0x4667ac\nLDR             R3, [R5]                                               ; +0x28, 0x4667b0\nLDR.W           R9, [SP,#0x34+arg_8]                                   ; +0x2a, 0x4667b2\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x2e, 0x4667b6\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x30, 0x4667b8\nMOV             R7, R0                                                 ; +0x34, 0x4667bc\nLDR             R0, =(aGjCheckoff001P - 0x4667C4); \"GJ_checkOff_001.png\" ; +0x36, 0x4667be\nADD             R0, PC; \"GJ_checkOff_001.png\"                          ; +0x38, 0x4667c0\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x3a, 0x4667c2\nLDR             R3, [R7]                                               ; +0x3e, 0x4667c6\nVMOV            R1, S16                                                ; +0x40, 0x4667c8\nLDR             R3, [R3,#0x50]                                         ; +0x44, 0x4667cc\nMOV             R4, R0                                                 ; +0x46, 0x4667ce\nMOV             R0, R7                                                 ; +0x48, 0x4667d0\nBLX             R3                                                     ; +0x4a, 0x4667d2\nLDR             R3, [R4]                                               ; +0x4c, 0x4667d4\nMOV             R0, R4                                                 ; +0x4e, 0x4667d6\nVMOV            R1, S16                                                ; +0x50, 0x4667d8\nLDR             R3, [R3,#0x50]                                         ; +0x54, 0x4667dc\nBLX             R3                                                     ; +0x56, 0x4667de\nLDR             R3, [SP,#0x34+var_20]                                  ; +0x58, 0x4667e0\nMOV             R2, R10                                                ; +0x5a, 0x4667e2\nMOV             R1, R4                                                 ; +0x5c, 0x4667e4\nMOV             R0, R7                                                 ; +0x5e, 0x4667e6\nSTR             R3, [SP,#0x34+var_34]                                  ; +0x60, 0x4667e8\nLDR             R3, [SP,#0x34+var_24]                                  ; +0x62, 0x4667ea\nBL              _ZN17CCMenuItemToggler6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x64, 0x4667ec\nLDRB.W          R1, [SP,#0x34+arg_0]; bool                             ; +0x68, 0x4667f0\nMOV             R4, R0                                                 ; +0x6c, 0x4667f4\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0x6e, 0x4667f6\nLDR.W           R3, [R8]                                               ; +0x72, 0x4667fa\nMOV             R0, R8                                                 ; +0x76, 0x4667fe\nMOV             R1, R4                                                 ; +0x78, 0x466800\nLDR.W           R3, [R3,#0xDC]                                         ; +0x7a, 0x466802\nBLX             R3                                                     ; +0x7e, 0x466806\nLDR             R3, [R4]                                               ; +0x80, 0x466808\nMOV             R2, R9                                                 ; +0x82, 0x46680a\nMOV             R1, R8; cocos2d::CCPoint *                             ; +0x84, 0x46680c\nMOV             R0, R6; this                                           ; +0x86, 0x46680e\nLDR             R3, [R3,#0x5C]                                         ; +0x88, 0x466810\nSTR             R3, [SP,#0x34+var_28]                                  ; +0x8a, 0x466812\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x8c, 0x466814\nLDR             R3, [SP,#0x34+var_28]                                  ; +0x90, 0x466818\nMOV             R0, R4                                                 ; +0x92, 0x46681a\nMOV             R1, R6                                                 ; +0x94, 0x46681c\nBLX             R3                                                     ; +0x96, 0x46681e\nMOV             R0, R4; this                                           ; +0x98, 0x466820\nMOV.W           R1, #0x3FC00000; float                                 ; +0x9a, 0x466822\nBL              _ZN17CCMenuItemToggler11setSizeMultEf; CCMenuItemToggler::setSizeMult(float) ; +0x9e, 0x466826\nLDR             R1, =(aBigfontFnt - 0x466834); \"bigFont.fnt\"           ; +0xa2, 0x46682a\nLDR.W           R0, [R11]; this                                        ; +0xa4, 0x46682c\nADD             R1, PC; \"bigFont.fnt\"                                  ; +0xa8, 0x466830\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0xaa, 0x466832\nMOV             R4, R0                                                 ; +0xae, 0x466836\nLDR.W           R0, [R10,#0x1D0]                                       ; +0xb0, 0x466838\nMOV             R1, R4                                                 ; +0xb4, 0x46683c\nLDR             R3, [R0]                                               ; +0xb6, 0x46683e\nLDR.W           R3, [R3,#0xDC]                                         ; +0xb8, 0x466840\nBLX             R3                                                     ; +0xbc, 0x466844\nLDR             R3, [R4]                                               ; +0xbe, 0x466846\nMOV.W           R2, #0x3F000000; float                                 ; +0xc0, 0x466848\nMOVS            R1, #0; float                                          ; +0xc4, 0x46684c\nMOV             R0, R6; this                                           ; +0xc6, 0x46684e\nLDR.W           R8, [R3,#0x8C]                                         ; +0xc8, 0x466850\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xcc, 0x466854\nMOV             R1, R6                                                 ; +0xd0, 0x466858\nMOV             R0, R4                                                 ; +0xd2, 0x46685a\nBLX             R8                                                     ; +0xd4, 0x46685c\nLDR             R3, [R4]                                               ; +0xd6, 0x46685e\nMOV             R0, R7                                                 ; +0xd8, 0x466860\nLDR.W           R8, [R3,#0x5C]                                         ; +0xda, 0x466862\nLDR             R3, [R7]                                               ; +0xde, 0x466866\nADD             R7, SP, #0x34+var_18                                   ; +0xe0, 0x466868\nLDR.W           R3, [R3,#0x9C]                                         ; +0xe2, 0x46686a\nBLX             R3                                                     ; +0xe6, 0x46686e\nVMOV.F32        S14, #0.5                                              ; +0xe8, 0x466870\nMOVS            R2, #0; float                                          ; +0xec, 0x466874\nVLDR            S15, [R0]                                              ; +0xee, 0x466876\nMOV             R0, R7; this                                           ; +0xf2, 0x46687a\nVMUL.F32        S15, S15, S14                                          ; +0xf4, 0x46687c\nVMOV.F32        S14, #8.0                                              ; +0xf8, 0x466880\nVMLA.F32        S14, S15, S16                                          ; +0xfc, 0x466884\nVLDR            S16, =120.0                                            ; +0x100, 0x466888\nVMOV            R1, S14; float                                         ; +0x104, 0x46688c\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x108, 0x466890\nMOV             R2, R7                                                 ; +0x10c, 0x466894\nMOV             R0, R6                                                 ; +0x10e, 0x466896\nMOV             R1, R9                                                 ; +0x110, 0x466898\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x112, 0x46689a\nMOV             R0, R4                                                 ; +0x116, 0x46689e\nMOV             R1, R6                                                 ; +0x118, 0x4668a0\nBLX             R8                                                     ; +0x11a, 0x4668a2\nLDR             R3, [R4]                                               ; +0x11c, 0x4668a4\nMOV             R0, R4                                                 ; +0x11e, 0x4668a6\nLDR.W           R3, [R3,#0x9C]                                         ; +0x120, 0x4668a8\nBLX             R3                                                     ; +0x124, 0x4668ac\nVLDR            S15, [R0]                                              ; +0x126, 0x4668ae\nVCMPE.F32       S15, S16                                               ; +0x12a, 0x4668b2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x12e, 0x4668b6\nBLE             loc_4668D8                                             ; +0x132, 0x4668ba\nLDR             R3, [R4]                                               ; +0x134, 0x4668bc\nMOV             R0, R4                                                 ; +0x136, 0x4668be\nLDR             R6, [R3,#0x50]                                         ; +0x138, 0x4668c0\nLDR.W           R3, [R3,#0x9C]                                         ; +0x13a, 0x4668c2\nBLX             R3                                                     ; +0x13e, 0x4668c6\nVLDR            S15, [R0]                                              ; +0x140, 0x4668c8\nMOV             R0, R4                                                 ; +0x144, 0x4668cc\nVDIV.F32        S15, S16, S15                                          ; +0x146, 0x4668ce\nVMOV            R1, S15                                                ; +0x14a, 0x4668d2\nBLX             R6                                                     ; +0x14e, 0x4668d6\nLDR             R3, [R4]                                               ; +0x150, 0x4668d8\nMOV             R0, R4                                                 ; +0x152, 0x4668da\nLDR             R6, [R3,#0x50]                                         ; +0x154, 0x4668dc\nLDR             R3, [R3,#0x54]                                         ; +0x156, 0x4668de\nBLX             R3                                                     ; +0x158, 0x4668e0\nVLDR            S15, =0.35                                             ; +0x15a, 0x4668e2\nVMOV            S14, R0                                                ; +0x15e, 0x4668e6\nVCMPE.F32       S14, S15                                               ; +0x162, 0x4668ea\nVMRS            APSR_nzcv, FPSCR                                       ; +0x166, 0x4668ee\nBGT             loc_466900                                             ; +0x16a, 0x4668f2\nLDR             R3, [R4]                                               ; +0x16c, 0x4668f4\nMOV             R0, R4                                                 ; +0x16e, 0x4668f6\nLDR             R3, [R3,#0x54]                                         ; +0x170, 0x4668f8\nBLX             R3                                                     ; +0x172, 0x4668fa\nMOV             R1, R0                                                 ; +0x174, 0x4668fc\nB               loc_466904                                             ; +0x176, 0x4668fe\nVMOV            R1, S15                                                ; +0x178, 0x466900\nMOV             R0, R4                                                 ; +0x17c, 0x466904\nBLX             R6                                                     ; +0x17e, 0x466906\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x180, 0x466908\nLDR             R3, [R5]                                               ; +0x182, 0x46690a\nCMP             R2, R3                                                 ; +0x184, 0x46690c\nBEQ             loc_466914                                             ; +0x186, 0x46690e\nBLX             __stack_chk_fail                                       ; +0x188, 0x466910\nADD             SP, SP, #0x34 ; '4'                                    ; +0x18c, 0x466914\nVPOP            {D8}                                                   ; +0x18e, 0x466916\nPOP.W           {R4-R11,PC}                                            ; +0x192, 0x46691a", "xrefs": [], "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"}