{"type": "func", "start": 4299298128, "end": 4299298488, "name": "ButtonPage::init", "pseudocode": "// \n// ButtonPage::init from 0x100421550 to 0x1004216b8 (360 bytes)\n// \n// 1 xrefs:\n// > ButtonPage::create @ 0x100421490\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\n// local variable allocation has failed, the output may be wrong!\nbool __fastcall ButtonPage::init(ButtonPage *a1, cocos2d::CCArray *a2, cocos2d::CCPoint a3, int a4, float a5)\n{\n  int v5; // w3\n  float x; // s8\n  int v7; // w19\n  float *v8; // x23\n  _BOOL4 v11; // w21\n  cocos2d::CCMenu *v12; // x22\n  float v13; // s9\n  float v14; // s11\n  unsigned int v15; // w23\n  float v16; // s9\n  float v17; // s11\n  float v18; // s8\n  __int64 v19; // x24\n  __n128 v20; // q0\n  __n128 v21; // q1\n  __int64 v23; // [xsp+0h] [xbp-80h] BYREF\n  cocos2d::CCPoint v24; // [xsp+8h] [xbp-78h] BYREF\n  cocos2d::CCPoint v25; // 0:kr00_8.8\n\n  x = a3.x;\n  v7 = v5;\n  v8 = *(float **)&a4;\n  v11 = cocos2d::CCLayer::init(a1);\n  if ( v11 )\n  {\n    v12 = cocos2d::CCMenu::create();\n    ((void (__fastcall *)(ButtonPage *, cocos2d::CCMenu *))a1->addChild)(a1, v12);\n    v14 = *v8;\n    v13 = v8[1];\n    if ( (unsigned int)sub_10024A36C((__int64)a2) )\n    {\n      v15 = 0;\n      v16 = v13 - (float)(x * 0.5);\n      v17 = (float)(x * 0.5)\n          + (float)((float)(v14 + (float)((float)((float)v7 * -0.5) * x))\n                  + (float)((float)((float)(v7 - 1) * -0.5) * 4.0));\n      v18 = x + 4.0;\n      do\n      {\n        v19 = sub_10024A388((__int64)a2, v15);\n        v20 = ((__n128 (__fastcall *)(cocos2d::CCMenu *, __int64))v12->addChild)(v12, v19);\n        v20.n128_f32[0] = v17 + (float)((float)(unsigned int)((int)v15 % v7) * v18);\n        v21.n128_f32[0] = v16 - (float)((float)(int)floorf((float)v15 / (float)v7) * v18);\n        sub_100022980(v20, v21, &v24);\n        v25 = cocos2d::CCNode::convertToNodeSpace(v12, &v24);\n        (*(void (__fastcall **)(__int64, __int64 *, float, float))(*(_QWORD *)v19 + 184LL))(v19, &v23, v25.x, v25.y);\n        ++v15;\n      }\n      while ( v15 < (unsigned int)sub_10024A36C((__int64)a2) );\n    }\n  }\n  return v11;\n}", "assembly": "; \n; ButtonPage::init from 0x100421550 to 0x1004216b8 (360 bytes)\n; \n; 1 xrefs:\n; > ButtonPage::create @ 0x100421490\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\nSUB             SP, SP, #0x90                                          ; +0x0, 0x100421550\nSTP             D13, D12, [SP,#0x80+var_70]                            ; +0x4, 0x100421554\nSTP             D11, D10, [SP,#0x80+var_60]                            ; +0x8, 0x100421558\nSTP             D9, D8, [SP,#0x80+var_50]                              ; +0xc, 0x10042155c\nSTP             X26, X25, [SP,#0x80+var_40]                            ; +0x10, 0x100421560\nSTP             X24, X23, [SP,#0x80+var_30]                            ; +0x14, 0x100421564\nSTP             X22, X21, [SP,#0x80+var_20]                            ; +0x18, 0x100421568\nSTP             X20, X19, [SP,#0x80+var_10]                            ; +0x1c, 0x10042156c\nSTP             X29, X30, [SP,#0x80+var_s0]                            ; +0x20, 0x100421570\nADD             X29, SP, #0x80                                         ; +0x24, 0x100421574\nFMOV            S8, S0                                                 ; +0x28, 0x100421578\nMOV             X19, X3                                                ; +0x2c, 0x10042157c\nMOV             X23, X2                                                ; +0x30, 0x100421580\nMOV             X20, X1                                                ; +0x34, 0x100421584\nMOV             X24, X0                                                ; +0x38, 0x100421588\nBL              cocos2d__CCLayer__init                                 ; +0x3c, 0x10042158c\nMOV             X21, X0                                                ; +0x40, 0x100421590\nCBZ             W0, loc_10042168C                                      ; +0x44, 0x100421594\nBL              cocos2d__CCMenu__create                                ; +0x48, 0x100421598\nMOV             X22, X0                                                ; +0x4c, 0x10042159c\nLDR             X8, [X24]                                              ; +0x50, 0x1004215a0\nLDR             X8, [X8,#0x1B8]                                        ; +0x54, 0x1004215a4\nMOV             X0, X24                                                ; +0x58, 0x1004215a8\nMOV             X1, X22                                                ; +0x5c, 0x1004215ac\nBLR             X8                                                     ; +0x60, 0x1004215b0\nLDP             S11, S9, [X23]                                         ; +0x64, 0x1004215b4\nMOV             X0, X20                                                ; +0x68, 0x1004215b8\nBL              sub_10024A36C                                          ; +0x6c, 0x1004215bc\nCBZ             W0, loc_10042168C                                      ; +0x70, 0x1004215c0\nMOV             W23, #0                                                ; +0x74, 0x1004215c4\nSUB             W8, W19, #1                                            ; +0x78, 0x1004215c8\nSCVTF           S0, W8                                                 ; +0x7c, 0x1004215cc\nFMOV            S1, #0.5                                               ; +0x80, 0x1004215d0\nFMUL            S1, S8, S1                                             ; +0x84, 0x1004215d4\nFSUB            S9, S9, S1                                             ; +0x88, 0x1004215d8\nSCVTF           S10, W19                                               ; +0x8c, 0x1004215dc\nFMOV            S2, #-0.5                                              ; +0x90, 0x1004215e0\nFMUL            S0, S0, S2                                             ; +0x94, 0x1004215e4\nFMUL            S2, S10, S2                                            ; +0x98, 0x1004215e8\nFMADD           S2, S2, S8, S11                                        ; +0x9c, 0x1004215ec\nFMOV            S3, #4.0                                               ; +0xa0, 0x1004215f0\nFMADD           S0, S0, S3, S2                                         ; +0xa4, 0x1004215f4\nFADD            S11, S1, S0                                            ; +0xa8, 0x1004215f8\nFADD            S8, S8, S3                                             ; +0xac, 0x1004215fc\nSDIV            W8, W23, W19                                           ; +0xb0, 0x100421600\nMSUB            W25, W8, W19, W23                                      ; +0xb4, 0x100421604\nUCVTF           S0, W23                                                ; +0xb8, 0x100421608\nFDIV            S0, S0, S10                                            ; +0xbc, 0x10042160c\nFRINTM          S12, S0                                                ; +0xc0, 0x100421610\nMOV             X0, X20                                                ; +0xc4, 0x100421614\nMOV             X1, X23                                                ; +0xc8, 0x100421618\nBL              sub_10024A388                                          ; +0xcc, 0x10042161c\nMOV             X24, X0                                                ; +0xd0, 0x100421620\nLDR             X8, [X22]                                              ; +0xd4, 0x100421624\nLDR             X8, [X8,#0x1B8]                                        ; +0xd8, 0x100421628\nMOV             X0, X22                                                ; +0xdc, 0x10042162c\nMOV             X1, X24                                                ; +0xe0, 0x100421630\nBLR             X8                                                     ; +0xe4, 0x100421634\nUCVTF           S0, W25                                                ; +0xe8, 0x100421638\nFMADD           S0, S0, S8, S11                                        ; +0xec, 0x10042163c\nFCVTZS          S1, S12                                                ; +0xf0, 0x100421640\nSCVTF           S1, S1                                                 ; +0xf4, 0x100421644\nFMSUB           S1, S1, S8, S9                                         ; +0xf8, 0x100421648\nADD             X0, SP, #0x80+var_78                                   ; +0xfc, 0x10042164c\nBL              sub_100022980                                          ; +0x100, 0x100421650\nMOV             X8, SP                                                 ; +0x104, 0x100421654\nADD             X1, SP, #0x80+var_78                                   ; +0x108, 0x100421658\nMOV             X0, X22                                                ; +0x10c, 0x10042165c\nBL              cocos2d__CCNode__convertToNodeSpace                    ; +0x110, 0x100421660\nLDR             X8, [X24]                                              ; +0x114, 0x100421664\nLDR             X8, [X8,#0xB8]                                         ; +0x118, 0x100421668\nMOV             X1, SP                                                 ; +0x11c, 0x10042166c\nMOV             X0, X24                                                ; +0x120, 0x100421670\nBLR             X8                                                     ; +0x124, 0x100421674\nADD             W23, W23, #1                                           ; +0x128, 0x100421678\nMOV             X0, X20                                                ; +0x12c, 0x10042167c\nBL              sub_10024A36C                                          ; +0x130, 0x100421680\nCMP             W23, W0                                                ; +0x134, 0x100421684\nB.CC            loc_100421600                                          ; +0x138, 0x100421688\nMOV             X0, X21                                                ; +0x13c, 0x10042168c\nLDP             X29, X30, [SP,#0x80+var_s0]                            ; +0x140, 0x100421690\nLDP             X20, X19, [SP,#0x80+var_10]                            ; +0x144, 0x100421694\nLDP             X22, X21, [SP,#0x80+var_20]                            ; +0x148, 0x100421698\nLDP             X24, X23, [SP,#0x80+var_30]                            ; +0x14c, 0x10042169c\nLDP             X26, X25, [SP,#0x80+var_40]                            ; +0x150, 0x1004216a0\nLDP             D9, D8, [SP,#0x80+var_50]                              ; +0x154, 0x1004216a4\nLDP             D11, D10, [SP,#0x80+var_60]                            ; +0x158, 0x1004216a8\nLDP             D13, D12, [SP,#0x80+var_70]                            ; +0x15c, 0x1004216ac\nADD             SP, SP, #0x90                                          ; +0x160, 0x1004216b0\nRET                                                                    ; +0x164, 0x1004216b4", "xrefs": ["ButtonPage::create @ 0x100421490"], "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"}