{"type": "func", "start": 4295150648, "end": 4295151092, "name": "GJMGLayer::loadGroundSprites", "pseudocode": "// \n// GJMGLayer::loadGroundSprites from 0x10002cc38 to 0x10002cdf4 (444 bytes)\n// \n// 4 xrefs:\n// > GJMGLayer::init @ 0x10002ca68\n// > GJMGLayer::init @ 0x10002cbb0\n// > GJMGLayer::updateGroundWidth @ 0x10002d0c0\n// > GJMGLayer::updateGroundWidth @ 0x10002d0d0\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 __fastcall GJMGLayer::loadGroundSprites(GJMGLayer *a1, int a2, bool a3)\n{\n  __int64 v3; // x8\n  __int64 v4; // x19\n  __int64 v6; // x21\n  __int64 v7; // x0\n  unsigned int v8; // w23\n  int v9; // w0\n  int v10; // w22\n  cocos2d::CCTexture2D *v11; // x0\n  cocos2d::CCSprite *v12; // x23\n  __n128 v13; // q0\n  __n128 v14; // q1\n  __n128 v15; // q0\n  __n128 v16; // q1\n  int v17; // w20\n  __int64 v18; // x0\n  int v19; // [xsp+8h] [xbp-38h] BYREF\n\n  v3 = 416;\n  if ( a3 )\n    v3 = 408;\n  v4 = *(__int64 *)((char *)&a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable + v3);\n  if ( v4 )\n  {\n    v6 = sub_10024A15C(a1);\n    if ( (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 472LL))(v4) )\n    {\n      v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 472LL))(v4);\n      sub_10024A360(v6, v7);\n    }\n    if ( (unsigned int)sub_10024A36C(v6) != a2 )\n    {\n      v8 = sub_10024A36C(v6);\n      v9 = sub_10024A36C(v6);\n      v10 = v9;\n      if ( v8 >= a2 )\n      {\n        if ( v9 - a2 >= 1 )\n        {\n          v17 = v9 - a2 + 1;\n          do\n          {\n            if ( !(unsigned int)sub_10024A36C(v6) )\n              break;\n            v18 = sub_10024A398(v6);\n            (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v4 + 536LL))(v4, v18, 1);\n            sub_10024A430(v6, 1);\n            --v17;\n          }\n          while ( v17 > 1 );\n        }\n      }\n      else if ( v9 < a2 )\n      {\n        do\n        {\n          v11 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1056LL))(v4);\n          v12 = cocos2d::CCSprite::createWithTexture_1(v11);\n          v13 = ((__n128 (__fastcall *)(__int64, cocos2d::CCSprite *))*(_QWORD *)(*(_QWORD *)v4 + 440LL))(v4, v12);\n          v13.n128_f32[0] = v12->m_obRect.size.width * (float)v10;\n          v14.n128_u32[0] = 0;\n          sub_100022980(v13, v14, &v19);\n          v15 = ((__n128 (__fastcall *)(cocos2d::CCSprite *, int *))v12->setPosition)(v12, &v19);\n          v15.n128_u32[0] = 0;\n          v16.n128_u32[0] = 0;\n          sub_100022980(v15, v16, &v19);\n          ((void (__fastcall *)(cocos2d::CCSprite *, int *))v12->setAnchorPoint)(v12, &v19);\n          ((void (__fastcall *)(cocos2d::CCSprite *, void *))v12->setColor)(v12, &unk_100635654);\n          ++v10;\n        }\n        while ( a2 != v10 );\n      }\n    }\n  }\n}", "assembly": "; \n; GJMGLayer::loadGroundSprites from 0x10002cc38 to 0x10002cdf4 (444 bytes)\n; \n; 4 xrefs:\n; > GJMGLayer::init @ 0x10002ca68\n; > GJMGLayer::init @ 0x10002cbb0\n; > GJMGLayer::updateGroundWidth @ 0x10002d0c0\n; > GJMGLayer::updateGroundWidth @ 0x10002d0d0\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, #0x50                                          ; +0x0, 0x10002cc38\nSTP             X24, X23, [SP,#0x40+var_30]                            ; +0x4, 0x10002cc3c\nSTP             X22, X21, [SP,#0x40+var_20]                            ; +0x8, 0x10002cc40\nSTP             X20, X19, [SP,#0x40+var_10]                            ; +0xc, 0x10002cc44\nSTP             X29, X30, [SP,#0x40+var_s0]                            ; +0x10, 0x10002cc48\nADD             X29, SP, #0x40                                         ; +0x14, 0x10002cc4c\nCMP             W2, #0                                                 ; +0x18, 0x10002cc50\nMOV             W8, #0x1A0                                             ; +0x1c, 0x10002cc54\nMOV             W9, #0x198                                             ; +0x20, 0x10002cc58\nCSEL            X8, X9, X8, NE                                         ; +0x24, 0x10002cc5c\nLDR             X19, [X0,X8]                                           ; +0x28, 0x10002cc60\nCBZ             X19, loc_10002CCB4                                     ; +0x2c, 0x10002cc64\nMOV             X20, X1                                                ; +0x30, 0x10002cc68\nBL              sub_10024A15C                                          ; +0x34, 0x10002cc6c\nMOV             X21, X0                                                ; +0x38, 0x10002cc70\nLDR             X8, [X19]                                              ; +0x3c, 0x10002cc74\nLDR             X8, [X8,#0x1D8]                                        ; +0x40, 0x10002cc78\nMOV             X0, X19                                                ; +0x44, 0x10002cc7c\nBLR             X8                                                     ; +0x48, 0x10002cc80\nCBZ             X0, loc_10002CCA4                                      ; +0x4c, 0x10002cc84\nLDR             X8, [X19]                                              ; +0x50, 0x10002cc88\nLDR             X8, [X8,#0x1D8]                                        ; +0x54, 0x10002cc8c\nMOV             X0, X19                                                ; +0x58, 0x10002cc90\nBLR             X8                                                     ; +0x5c, 0x10002cc94\nMOV             X1, X0                                                 ; +0x60, 0x10002cc98\nMOV             X0, X21                                                ; +0x64, 0x10002cc9c\nBL              sub_10024A360                                          ; +0x68, 0x10002cca0\nMOV             X0, X21                                                ; +0x6c, 0x10002cca4\nBL              sub_10024A36C                                          ; +0x70, 0x10002cca8\nCMP             W0, W20                                                ; +0x74, 0x10002ccac\nB.NE            loc_10002CCCC                                          ; +0x78, 0x10002ccb0\nLDP             X29, X30, [SP,#0x40+var_s0]                            ; +0x7c, 0x10002ccb4\nLDP             X20, X19, [SP,#0x40+var_10]                            ; +0x80, 0x10002ccb8\nLDP             X22, X21, [SP,#0x40+var_20]                            ; +0x84, 0x10002ccbc\nLDP             X24, X23, [SP,#0x40+var_30]                            ; +0x88, 0x10002ccc0\nADD             SP, SP, #0x50 ; 'P'                                    ; +0x8c, 0x10002ccc4\nRET                                                                    ; +0x90, 0x10002ccc8\nMOV             X0, X21                                                ; +0x94, 0x10002cccc\nBL              sub_10024A36C                                          ; +0x98, 0x10002ccd0\nMOV             X23, X0                                                ; +0x9c, 0x10002ccd4\nMOV             X0, X21                                                ; +0xa0, 0x10002ccd8\nBL              sub_10024A36C                                          ; +0xa4, 0x10002ccdc\nMOV             X22, X0                                                ; +0xa8, 0x10002cce0\nCMP             W23, W20                                               ; +0xac, 0x10002cce4\nB.CS            loc_10002CD9C                                          ; +0xb0, 0x10002cce8\nCMP             W22, W20                                               ; +0xb4, 0x10002ccec\nB.GE            loc_10002CCB4                                          ; +0xb8, 0x10002ccf0\nADRL            X21, unk_100635654                                     ; +0xbc, 0x10002ccf4\nLDR             X8, [X19]                                              ; +0xc4, 0x10002ccfc\nLDR             X8, [X8,#0x420]                                        ; +0xc8, 0x10002cd00\nMOV             X0, X19                                                ; +0xcc, 0x10002cd04\nBLR             X8                                                     ; +0xd0, 0x10002cd08\nBL              cocos2d__CCSprite__createWithTexture_1                 ; +0xd4, 0x10002cd0c\nMOV             X23, X0                                                ; +0xd8, 0x10002cd10\nLDR             X8, [X19]                                              ; +0xdc, 0x10002cd14\nLDR             X8, [X8,#0x1B8]                                        ; +0xe0, 0x10002cd18\nMOV             X0, X19                                                ; +0xe4, 0x10002cd1c\nMOV             X1, X23                                                ; +0xe8, 0x10002cd20\nBLR             X8                                                     ; +0xec, 0x10002cd24\nLDR             S0, [X23,#0x1B0]                                       ; +0xf0, 0x10002cd28\nSCVTF           S1, W22                                                ; +0xf4, 0x10002cd2c\nFMUL            S0, S0, S1                                             ; +0xf8, 0x10002cd30\nADD             X0, SP, #0x40+var_38                                   ; +0xfc, 0x10002cd34\nFMOV            S1, WZR                                                ; +0x100, 0x10002cd38\nBL              sub_100022980                                          ; +0x104, 0x10002cd3c\nLDR             X8, [X23]                                              ; +0x108, 0x10002cd40\nLDR             X8, [X8,#0xB8]                                         ; +0x10c, 0x10002cd44\nADD             X1, SP, #0x40+var_38                                   ; +0x110, 0x10002cd48\nMOV             X0, X23                                                ; +0x114, 0x10002cd4c\nBLR             X8                                                     ; +0x118, 0x10002cd50\nADD             X0, SP, #0x40+var_38                                   ; +0x11c, 0x10002cd54\nFMOV            S0, WZR                                                ; +0x120, 0x10002cd58\nFMOV            S1, WZR                                                ; +0x124, 0x10002cd5c\nBL              sub_100022980                                          ; +0x128, 0x10002cd60\nLDR             X8, [X23]                                              ; +0x12c, 0x10002cd64\nLDR             X8, [X8,#0x118]                                        ; +0x130, 0x10002cd68\nADD             X1, SP, #0x40+var_38                                   ; +0x134, 0x10002cd6c\nMOV             X0, X23                                                ; +0x138, 0x10002cd70\nBLR             X8                                                     ; +0x13c, 0x10002cd74\nLDR             X8, [X23]                                              ; +0x140, 0x10002cd78\nLDR             X8, [X8,#0x3B0]                                        ; +0x144, 0x10002cd7c\nMOV             X0, X23                                                ; +0x148, 0x10002cd80\nMOV             X1, X21                                                ; +0x14c, 0x10002cd84\nBLR             X8                                                     ; +0x150, 0x10002cd88\nADD             W22, W22, #1                                           ; +0x154, 0x10002cd8c\nCMP             W20, W22                                               ; +0x158, 0x10002cd90\nB.NE            loc_10002CCFC                                          ; +0x15c, 0x10002cd94\nB               loc_10002CCB4                                          ; +0x160, 0x10002cd98\nSUB             W8, W22, W20                                           ; +0x164, 0x10002cd9c\nCMP             W8, #1                                                 ; +0x168, 0x10002cda0\nB.LT            loc_10002CCB4                                          ; +0x16c, 0x10002cda4\nADD             W20, W8, #1                                            ; +0x170, 0x10002cda8\nMOV             X0, X21                                                ; +0x174, 0x10002cdac\nBL              sub_10024A36C                                          ; +0x178, 0x10002cdb0\nCBZ             W0, loc_10002CCB4                                      ; +0x17c, 0x10002cdb4\nMOV             X0, X21                                                ; +0x180, 0x10002cdb8\nBL              sub_10024A398                                          ; +0x184, 0x10002cdbc\nMOV             X1, X0                                                 ; +0x188, 0x10002cdc0\nLDR             X8, [X19]                                              ; +0x18c, 0x10002cdc4\nLDR             X8, [X8,#0x218]                                        ; +0x190, 0x10002cdc8\nMOV             X0, X19                                                ; +0x194, 0x10002cdcc\nMOV             W2, #1                                                 ; +0x198, 0x10002cdd0\nBLR             X8                                                     ; +0x19c, 0x10002cdd4\nMOV             X0, X21                                                ; +0x1a0, 0x10002cdd8\nMOV             W1, #1                                                 ; +0x1a4, 0x10002cddc\nBL              sub_10024A430                                          ; +0x1a8, 0x10002cde0\nSUB             W20, W20, #1                                           ; +0x1ac, 0x10002cde4\nCMP             W20, #1                                                ; +0x1b0, 0x10002cde8\nB.GT            loc_10002CDAC                                          ; +0x1b4, 0x10002cdec\nB               loc_10002CCB4                                          ; +0x1b8, 0x10002cdf0", "xrefs": ["GJMGLayer::init @ 0x10002ca68", "GJMGLayer::init @ 0x10002cbb0", "GJMGLayer::updateGroundWidth @ 0x10002d0c0", "GJMGLayer::updateGroundWidth @ 0x10002d0d0"], "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"}