{"type": "func", "start": 5782716, "end": 5783128, "name": "AccountLayer::createToggleButton", "pseudocode": "// \n// AccountLayer::createToggleButton from 0x583cbc to 0x583e58 (412 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:56 +0000\n// \n\nint __fastcall AccountLayer::createToggleButton(\n        int a1,\n        int a2,\n        int a3,\n        int a4,\n        bool a5,\n        const cocos2d::CCPoint *a6,\n        int a7)\n{\n  int v9; // r7\n  const char *v10; // r1\n  int v11; // r6\n  cocos2d::CCNodeRGBA *v12; // r10\n  const char *v13; // r2\n  cocos2d::CCLabelBMFont *v14; // r0\n  int v15; // r4\n  void (__fastcall *v16)(int, _BYTE *); // r9\n  void (__fastcall *v17)(int, _BYTE *); // r9\n  float *v18; // r0\n  void (__fastcall *v19)(int, _DWORD); // r6\n  float *v20; // r0\n  int (__fastcall *v21)(int, int); // r6\n  int v22; // r1\n  void (__fastcall *v24)(cocos2d::CCNodeRGBA *, _BYTE *); // [sp+Ch] [bp-28h]\n  char v25[4]; // [sp+10h] [bp-24h] BYREF\n  int v26; // [sp+14h] [bp-20h]\n  _BYTE v27[8]; // [sp+1Ch] [bp-18h] BYREF\n  _BYTE v28[8]; // [sp+24h] [bp-10h] BYREF\n\n  *(_DWORD *)v25 = a3;\n  v26 = a4;\n  v9 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"GJ_checkOn_001.png\", v25);\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)\"GJ_checkOff_001.png\", v10);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v9 + 80))(v9, 1061997773);\n  (*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1061997773);\n  v12 = CCMenuItemToggler::create(v9, v11, a1, *(int *)v25, v26);\n  CCMenuItemToggler::toggle(v12, a5);\n  (*(void (__fastcall **)(const cocos2d::CCPoint *, cocos2d::CCNodeRGBA *))(*(_DWORD *)a6 + 228))(a6, v12);\n  v24 = *(void (__fastcall **)(cocos2d::CCNodeRGBA *, _BYTE *))(*(_DWORD *)v12 + 92);\n  cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v28, a6);\n  v24(v12, v28);\n  CCMenuItemToggler::setSizeMult(v12, 1.5);\n  if ( (*(_BYTE *)a2 & 1) != 0 )\n    v14 = *(cocos2d::CCLabelBMFont **)(a2 + 8);\n  else\n    v14 = (cocos2d::CCLabelBMFont *)(a2 + 1);\n  v15 = cocos2d::CCLabelBMFont::create(v14, \"bigFont.fnt\", v13);\n  (*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(a1 + 464) + 228))(*(_DWORD *)(a1 + 464), v15);\n  v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 148);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, 0.0, 0.5);\n  v16(v15, v28);\n  v17 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 92);\n  v18 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v9 + 164))(v9);\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v27, (float)((float)(*v18 * 0.5) * 0.8) + 8.0, 0.0);\n  cocos2d::CCPoint::operator+(v28, a7, v27);\n  v17(v15, v28);\n  if ( *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v15 + 164))(v15) > 120.0 )\n  {\n    v19 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v15 + 80);\n    v20 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v15 + 164))(v15);\n    v19(v15, 120.0 / *v20);\n  }\n  v21 = *(int (__fastcall **)(int, int))(*(_DWORD *)v15 + 80);\n  if ( (*(float (__fastcall **)(int))(*(_DWORD *)v15 + 84))(v15) > 0.35 )\n    v22 = 1051931443;\n  else\n    v22 = (*(int (__fastcall **)(int))(*(_DWORD *)v15 + 84))(v15);\n  return v21(v15, v22);\n}", "assembly": "; \n; AccountLayer::createToggleButton from 0x583cbc to 0x583e58 (412 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:52:56 +0000\n; \nPUSH.W          {R4-R11,LR}                                            ; +0x0, 0x583cbc\nMOV             R4, R1                                                 ; +0x4, 0x583cc0\nVPUSH           {D8}                                                   ; +0x6, 0x583cc2\nMOV             R9, R0                                                 ; +0xa, 0x583cc6\nLDR             R5, =(__stack_chk_guard_ptr - 0x583CD0)                ; +0xc, 0x583cc8\nLDR             R0, =(aGjCheckon001Pn - 0x583CDA); \"GJ_checkOn_001.png\" ; +0xe, 0x583cca\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x10, 0x583ccc\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x12, 0x583cce\nVLDR            S16, =120.0                                            ; +0x14, 0x583cd0\nSUB             SP, SP, #0x34                                          ; +0x18, 0x583cd4\nADD             R0, PC; \"GJ_checkOn_001.png\"                           ; +0x1a, 0x583cd6\nADD             R1, SP, #0x34+var_24; char *                           ; +0x1c, 0x583cd8\nLDR.W           R11, [SP,#0x34+arg_4]                                  ; +0x1e, 0x583cda\nSTM.W           R1, {R2,R3}                                            ; +0x22, 0x583cde\nLDR             R3, [R5]                                               ; +0x26, 0x583ce2\nLDR.W           R8, [SP,#0x34+arg_8]                                   ; +0x28, 0x583ce4\nSTR             R3, [SP,#0x34+var_8]                                   ; +0x2c, 0x583ce8\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x2e, 0x583cea\nMOV             R7, R0                                                 ; +0x32, 0x583cee\nLDR             R0, =(aGjCheckoff001P - 0x583CF6); \"GJ_checkOff_001.png\" ; +0x34, 0x583cf0\nADD             R0, PC; \"GJ_checkOff_001.png\"                          ; +0x36, 0x583cf2\nBL              _ZN7cocos2d8CCSprite25createWithSpriteFrameNameEPKc; cocos2d::CCSprite::createWithSpriteFrameName(char const*) ; +0x38, 0x583cf4\nLDR             R3, [R7]                                               ; +0x3c, 0x583cf8\nLDR             R1, =0x3F4CCCCD                                        ; +0x3e, 0x583cfa\nLDR             R3, [R3,#0x50]                                         ; +0x40, 0x583cfc\nMOV             R6, R0                                                 ; +0x42, 0x583cfe\nMOV             R0, R7                                                 ; +0x44, 0x583d00\nBLX             R3                                                     ; +0x46, 0x583d02\nLDR             R3, [R6]                                               ; +0x48, 0x583d04\nMOV             R0, R6                                                 ; +0x4a, 0x583d06\nLDR             R1, =0x3F4CCCCD                                        ; +0x4c, 0x583d08\nLDR             R3, [R3,#0x50]                                         ; +0x4e, 0x583d0a\nBLX             R3                                                     ; +0x50, 0x583d0c\nLDR             R3, [SP,#0x34+var_20]                                  ; +0x52, 0x583d0e\nMOV             R2, R9                                                 ; +0x54, 0x583d10\nMOV             R1, R6                                                 ; +0x56, 0x583d12\nMOV             R0, R7                                                 ; +0x58, 0x583d14\nADD             R6, SP, #0x34+var_10                                   ; +0x5a, 0x583d16\nSTR             R3, [SP,#0x34+var_34]                                  ; +0x5c, 0x583d18\nLDR             R3, [SP,#0x34+var_24]                                  ; +0x5e, 0x583d1a\nBL              _ZN17CCMenuItemToggler6createEPN7cocos2d6CCNodeES2_PNS0_8CCObjectEMS3_FvS4_E; CCMenuItemToggler::create(cocos2d::CCNode *,cocos2d::CCNode *,cocos2d::CCObject *,void (cocos2d::CCObject::*)(cocos2d::CCObject *)) ; +0x60, 0x583d1c\nLDRB.W          R1, [SP,#0x34+arg_0]; bool                             ; +0x64, 0x583d20\nMOV             R10, R0                                                ; +0x68, 0x583d24\nBL              _ZN17CCMenuItemToggler6toggleEb; CCMenuItemToggler::toggle(bool) ; +0x6a, 0x583d26\nLDR.W           R3, [R11]                                              ; +0x6e, 0x583d2a\nMOV             R0, R11                                                ; +0x72, 0x583d2e\nMOV             R1, R10                                                ; +0x74, 0x583d30\nLDR.W           R3, [R3,#0xE4]                                         ; +0x76, 0x583d32\nBLX             R3                                                     ; +0x7a, 0x583d36\nLDR.W           R3, [R10]                                              ; +0x7c, 0x583d38\nMOV             R2, R8                                                 ; +0x80, 0x583d3c\nMOV             R0, R6; this                                           ; +0x82, 0x583d3e\nMOV             R1, R11; cocos2d::CCPoint *                            ; +0x84, 0x583d40\nLDR             R3, [R3,#0x5C]                                         ; +0x86, 0x583d42\nSTR             R3, [SP,#0x34+var_28]                                  ; +0x88, 0x583d44\nBL              _ZN7cocos2d6CCNode18convertToNodeSpaceERKNS_7CCPointE; cocos2d::CCNode::convertToNodeSpace(cocos2d::CCPoint const&) ; +0x8a, 0x583d46\nLDR             R3, [SP,#0x34+var_28]                                  ; +0x8e, 0x583d4a\nMOV             R0, R10                                                ; +0x90, 0x583d4c\nMOV             R1, R6                                                 ; +0x92, 0x583d4e\nBLX             R3                                                     ; +0x94, 0x583d50\nMOV             R0, R10; this                                          ; +0x96, 0x583d52\nMOV.W           R1, #0x3FC00000; float                                 ; +0x98, 0x583d54\nBL              _ZN17CCMenuItemToggler11setSizeMultEf; CCMenuItemToggler::setSizeMult(float) ; +0x9c, 0x583d58\nLDRB            R3, [R4]                                               ; +0xa0, 0x583d5c\nLDR             R1, =(aBigfontFnt - 0x583D6A); \"bigFont.fnt\"           ; +0xa2, 0x583d5e\nLSLS            R3, R3, #0x1F                                          ; +0xa4, 0x583d60\nIT PL                                                                  ; +0xa6, 0x583d62\nADDPL           R0, R4, #1                                             ; +0xa8, 0x583d64\nADD             R1, PC; \"bigFont.fnt\"                                  ; +0xaa, 0x583d66\nIT MI                                                                  ; +0xac, 0x583d68\nLDRMI           R0, [R4,#8]; this                                      ; +0xae, 0x583d6a\nBL              _ZN7cocos2d13CCLabelBMFont6createEPKcS2_; cocos2d::CCLabelBMFont::create(char const*,char const*) ; +0xb0, 0x583d6c\nMOV             R4, R0                                                 ; +0xb4, 0x583d70\nLDR.W           R0, [R9,#0x1D0]                                        ; +0xb6, 0x583d72\nMOV             R1, R4                                                 ; +0xba, 0x583d76\nLDR             R3, [R0]                                               ; +0xbc, 0x583d78\nLDR.W           R3, [R3,#0xE4]                                         ; +0xbe, 0x583d7a\nBLX             R3                                                     ; +0xc2, 0x583d7e\nLDR             R3, [R4]                                               ; +0xc4, 0x583d80\nMOV.W           R2, #0x3F000000; float                                 ; +0xc6, 0x583d82\nMOVS            R1, #0; float                                          ; +0xca, 0x583d86\nMOV             R0, R6; this                                           ; +0xcc, 0x583d88\nLDR.W           R9, [R3,#0x94]                                         ; +0xce, 0x583d8a\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0xd2, 0x583d8e\nMOV             R1, R6                                                 ; +0xd6, 0x583d92\nMOV             R0, R4                                                 ; +0xd8, 0x583d94\nBLX             R9                                                     ; +0xda, 0x583d96\nLDR             R3, [R4]                                               ; +0xdc, 0x583d98\nMOV             R0, R7                                                 ; +0xde, 0x583d9a\nLDR.W           R9, [R3,#0x5C]                                         ; +0xe0, 0x583d9c\nLDR             R3, [R7]                                               ; +0xe4, 0x583da0\nADD             R7, SP, #0x34+var_18                                   ; +0xe6, 0x583da2\nLDR.W           R3, [R3,#0xA4]                                         ; +0xe8, 0x583da4\nBLX             R3                                                     ; +0xec, 0x583da8\nVMOV.F32        S14, #0.5                                              ; +0xee, 0x583daa\nVLDR            S13, =0.8                                              ; +0xf2, 0x583dae\nMOVS            R2, #0; float                                          ; +0xf6, 0x583db2\nVLDR            S15, [R0]                                              ; +0xf8, 0x583db4\nMOV             R0, R7; this                                           ; +0xfc, 0x583db8\nVMUL.F32        S15, S15, S14                                          ; +0xfe, 0x583dba\nVMOV.F32        S14, #8.0                                              ; +0x102, 0x583dbe\nVMLA.F32        S14, S15, S13                                          ; +0x106, 0x583dc2\nVMOV            R1, S14; float                                         ; +0x10a, 0x583dc6\nBL              _ZN7cocos2d7CCPointC1Eff; cocos2d::CCPoint::CCPoint(float,float) ; +0x10e, 0x583dca\nMOV             R2, R7                                                 ; +0x112, 0x583dce\nMOV             R0, R6                                                 ; +0x114, 0x583dd0\nMOV             R1, R8                                                 ; +0x116, 0x583dd2\nBL              _ZNK7cocos2d7CCPointplERKS0_; cocos2d::CCPoint::operator+(cocos2d::CCPoint const&) ; +0x118, 0x583dd4\nMOV             R0, R4                                                 ; +0x11c, 0x583dd8\nMOV             R1, R6                                                 ; +0x11e, 0x583dda\nBLX             R9                                                     ; +0x120, 0x583ddc\nLDR             R3, [R4]                                               ; +0x122, 0x583dde\nMOV             R0, R4                                                 ; +0x124, 0x583de0\nLDR.W           R3, [R3,#0xA4]                                         ; +0x126, 0x583de2\nBLX             R3                                                     ; +0x12a, 0x583de6\nVLDR            S15, [R0]                                              ; +0x12c, 0x583de8\nVCMPE.F32       S15, S16                                               ; +0x130, 0x583dec\nVMRS            APSR_nzcv, FPSCR                                       ; +0x134, 0x583df0\nBLE             loc_583E12                                             ; +0x138, 0x583df4\nLDR             R3, [R4]                                               ; +0x13a, 0x583df6\nMOV             R0, R4                                                 ; +0x13c, 0x583df8\nLDR             R6, [R3,#0x50]                                         ; +0x13e, 0x583dfa\nLDR.W           R3, [R3,#0xA4]                                         ; +0x140, 0x583dfc\nBLX             R3                                                     ; +0x144, 0x583e00\nVLDR            S15, [R0]                                              ; +0x146, 0x583e02\nMOV             R0, R4                                                 ; +0x14a, 0x583e06\nVDIV.F32        S15, S16, S15                                          ; +0x14c, 0x583e08\nVMOV            R1, S15                                                ; +0x150, 0x583e0c\nBLX             R6                                                     ; +0x154, 0x583e10\nLDR             R3, [R4]                                               ; +0x156, 0x583e12\nMOV             R0, R4                                                 ; +0x158, 0x583e14\nLDR             R6, [R3,#0x50]                                         ; +0x15a, 0x583e16\nLDR             R3, [R3,#0x54]                                         ; +0x15c, 0x583e18\nBLX             R3                                                     ; +0x15e, 0x583e1a\nVLDR            S15, =0.35                                             ; +0x160, 0x583e1c\nVMOV            S14, R0                                                ; +0x164, 0x583e20\nVCMPE.F32       S14, S15                                               ; +0x168, 0x583e24\nVMRS            APSR_nzcv, FPSCR                                       ; +0x16c, 0x583e28\nBGT             loc_583E3A                                             ; +0x170, 0x583e2c\nLDR             R3, [R4]                                               ; +0x172, 0x583e2e\nMOV             R0, R4                                                 ; +0x174, 0x583e30\nLDR             R3, [R3,#0x54]                                         ; +0x176, 0x583e32\nBLX             R3                                                     ; +0x178, 0x583e34\nMOV             R1, R0                                                 ; +0x17a, 0x583e36\nB               loc_583E3E                                             ; +0x17c, 0x583e38\nVMOV            R1, S15                                                ; +0x17e, 0x583e3a\nMOV             R0, R4                                                 ; +0x182, 0x583e3e\nBLX             R6                                                     ; +0x184, 0x583e40\nLDR             R2, [SP,#0x34+var_8]                                   ; +0x186, 0x583e42\nLDR             R3, [R5]                                               ; +0x188, 0x583e44\nCMP             R2, R3                                                 ; +0x18a, 0x583e46\nBEQ             loc_583E4E                                             ; +0x18c, 0x583e48\nBLX             __stack_chk_fail                                       ; +0x18e, 0x583e4a\nADD             SP, SP, #0x34 ; '4'                                    ; +0x192, 0x583e4e\nVPOP            {D8}                                                   ; +0x194, 0x583e50\nPOP.W           {R4-R11,PC}                                            ; +0x198, 0x583e54", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "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"}