{"type": "func", "start": 4301173040, "end": 4301173642, "name": "GJGroundLayer::loadGroundSprites", "pseudocode": "// \n// GJGroundLayer::loadGroundSprites from 0x1005eb130 to 0x1005eb38a (602 bytes)\n// \n// 4 xrefs:\n// > GJGroundLayer::init @ 0x1005eadc0\n// > GJGroundLayer::init @ 0x1005eaef0\n// > GJGroundLayer::updateGroundWidth @ 0x1005eb720\n// > GJGroundLayer::updateGroundWidth @ 0x1005eb72d\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!\nvoid __fastcall GJGroundLayer::loadGroundSprites(GJGroundLayer *a1, int a2, bool a3)\n{\n  __int64 v4; // rbx\n  __int64 v6; // r13\n  __int64 v7; // rsi\n  int v8; // r15d\n  cocos2d::CCTexture2D *v9; // rax\n  cocos2d::CCSprite *v10; // r13\n  int v11; // r15d\n  int v12; // r15d\n  __int64 v13; // rax\n  cocos2d::CCTexture2D *v14; // rax\n  cocos2d::CCSprite *v15; // r13\n  float v16; // [rsp+0h] [rbp-40h] BYREF\n  GJGroundLayer *v17; // [rsp+8h] [rbp-38h]\n  unsigned int v18; // [rsp+14h] [rbp-2Ch]\n\n  v17 = a1;\n  v4 = *((_QWORD *)&a1->m_ground1Sprite + !a3);\n  if ( v4 )\n  {\n    v6 = sub_10071F9E0(a1, *(_QWORD *)&a2);\n    if ( (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 472LL))(v4) )\n    {\n      v7 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 472LL))(v4);\n      sub_100720050(v6, v7);\n    }\n    if ( (unsigned int)sub_100720070(v6) != a2 )\n    {\n      v18 = sub_100720070(v6);\n      v8 = sub_100720070(v6);\n      if ( v18 >= a2 )\n      {\n        v11 = v8 - a2;\n        if ( v11 > 0 )\n        {\n          v12 = v11 + 1;\n          do\n          {\n            if ( !(unsigned int)sub_100720070(v6) )\n              break;\n            v13 = sub_1007200E0(v6);\n            (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v4 + 536LL))(v4, v13, 1);\n            sub_100720200(v6, 1);\n            --v12;\n          }\n          while ( v12 > 1 );\n        }\n      }\n      else if ( v8 < a2 )\n      {\n        if ( a3 )\n        {\n          do\n          {\n            v9 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1056LL))(v4);\n            v10 = cocos2d::CCSprite::createWithTexture_1(v9);\n            (*(void (__fastcall **)(__int64, cocos2d::CCSprite *))(*(_QWORD *)v4 + 440LL))(v4, v10);\n            sub_10028CBE0(&v16, (float)v8 * v10->m_obRect.size.width, -v17->m_ground1Offset);\n            ((void (__fastcall *)(cocos2d::CCSprite *, float *))v10->setPosition)(v10, &v16);\n            sub_10028CBE0(&v16, 0.0, 1.0);\n            ((void (__fastcall *)(cocos2d::CCSprite *, float *))v10->setAnchorPoint)(v10, &v16);\n            ((void (__fastcall *)(cocos2d::CCSprite *, void *))v10->setColor)(v10, &unk_1008219C8);\n            ++v8;\n          }\n          while ( a2 != v8 );\n        }\n        else\n        {\n          do\n          {\n            v14 = (cocos2d::CCTexture2D *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 1056LL))(v4);\n            v15 = cocos2d::CCSprite::createWithTexture_1(v14);\n            (*(void (__fastcall **)(__int64, cocos2d::CCSprite *))(*(_QWORD *)v4 + 440LL))(v4, v15);\n            sub_10028CBE0(&v16, (float)v8 * v15->m_obRect.size.width, 0.0);\n            ((void (__fastcall *)(cocos2d::CCSprite *, float *))v15->setPosition)(v15, &v16);\n            sub_10028CBE0(&v16, 0.0, 1.0);\n            ((void (__fastcall *)(cocos2d::CCSprite *, float *))v15->setAnchorPoint)(v15, &v16);\n            ((void (__fastcall *)(cocos2d::CCSprite *, void *))v15->setColor)(v15, &unk_1008219C8);\n            ++v8;\n          }\n          while ( a2 != v8 );\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJGroundLayer::loadGroundSprites from 0x1005eb130 to 0x1005eb38a (602 bytes)\n; \n; 4 xrefs:\n; > GJGroundLayer::init @ 0x1005eadc0\n; > GJGroundLayer::init @ 0x1005eaef0\n; > GJGroundLayer::updateGroundWidth @ 0x1005eb720\n; > GJGroundLayer::updateGroundWidth @ 0x1005eb72d\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    rbp                                                            ; +0x0, 0x1005eb130\nmov     rbp, rsp                                                       ; +0x1, 0x1005eb131\npush    r15                                                            ; +0x4, 0x1005eb134\npush    r14                                                            ; +0x6, 0x1005eb136\npush    r13                                                            ; +0x8, 0x1005eb138\npush    r12                                                            ; +0xa, 0x1005eb13a\npush    rbx                                                            ; +0xc, 0x1005eb13c\nsub     rsp, 18h                                                       ; +0xd, 0x1005eb13d\nmov     r12d, edx                                                      ; +0x11, 0x1005eb141\nmov     eax, r12d                                                      ; +0x14, 0x1005eb144\nxor     al, 1                                                          ; +0x17, 0x1005eb147\nmovzx   eax, al                                                        ; +0x19, 0x1005eb149\nmov     [rbp+var_38], rdi                                              ; +0x1c, 0x1005eb14c\nmov     rbx, [rdi+rax*8+198h]                                          ; +0x20, 0x1005eb150\ntest    rbx, rbx                                                       ; +0x28, 0x1005eb158\njz      short loc_1005EB19D                                            ; +0x2b, 0x1005eb15b\nmov     r14d, esi                                                      ; +0x2d, 0x1005eb15d\ncall    sub_10071F9E0                                                  ; +0x30, 0x1005eb160\nmov     r13, rax                                                       ; +0x35, 0x1005eb165\nmov     rax, [rbx]                                                     ; +0x38, 0x1005eb168\nmov     rdi, rbx                                                       ; +0x3b, 0x1005eb16b\ncall    qword ptr [rax+1D8h]                                           ; +0x3e, 0x1005eb16e\ntest    rax, rax                                                       ; +0x44, 0x1005eb174\njz      short loc_1005EB190                                            ; +0x47, 0x1005eb177\nmov     rax, [rbx]                                                     ; +0x49, 0x1005eb179\nmov     rdi, rbx                                                       ; +0x4c, 0x1005eb17c\ncall    qword ptr [rax+1D8h]                                           ; +0x4f, 0x1005eb17f\nmov     rdi, r13                                                       ; +0x55, 0x1005eb185\nmov     rsi, rax                                                       ; +0x58, 0x1005eb188\ncall    sub_100720050                                                  ; +0x5b, 0x1005eb18b\nmov     rdi, r13                                                       ; +0x60, 0x1005eb190\ncall    sub_100720070                                                  ; +0x63, 0x1005eb193\ncmp     eax, r14d                                                      ; +0x68, 0x1005eb198\njnz     short loc_1005EB1AC                                            ; +0x6b, 0x1005eb19b\nadd     rsp, 18h                                                       ; +0x6d, 0x1005eb19d\npop     rbx                                                            ; +0x71, 0x1005eb1a1\npop     r12                                                            ; +0x72, 0x1005eb1a2\npop     r13                                                            ; +0x74, 0x1005eb1a4\npop     r14                                                            ; +0x76, 0x1005eb1a6\npop     r15                                                            ; +0x78, 0x1005eb1a8\npop     rbp                                                            ; +0x7a, 0x1005eb1aa\nretn                                                                   ; +0x7b, 0x1005eb1ab\nmov     rdi, r13                                                       ; +0x7c, 0x1005eb1ac\ncall    sub_100720070                                                  ; +0x7f, 0x1005eb1af\nmov     [rbp+var_2C], eax                                              ; +0x84, 0x1005eb1b4\nmov     rdi, r13                                                       ; +0x87, 0x1005eb1b7\ncall    sub_100720070                                                  ; +0x8a, 0x1005eb1ba\nmov     r15d, eax                                                      ; +0x8f, 0x1005eb1bf\ncmp     [rbp+var_2C], r14d                                             ; +0x92, 0x1005eb1c2\njnb     loc_1005EB28A                                                  ; +0x96, 0x1005eb1c6\ncmp     r15d, r14d                                                     ; +0x9c, 0x1005eb1cc\njge     short loc_1005EB19D                                            ; +0x9f, 0x1005eb1cf\ntest    r12b, r12b                                                     ; +0xa1, 0x1005eb1d1\njz      loc_1005EB2E7                                                  ; +0xa4, 0x1005eb1d4\nlea     r12, [rbp+var_40]                                              ; +0xaa, 0x1005eb1da\nxchg    ax, ax                                                         ; +0xae, 0x1005eb1de\nmov     rax, [rbx]                                                     ; +0xb0, 0x1005eb1e0\nmov     rdi, rbx                                                       ; +0xb3, 0x1005eb1e3\ncall    qword ptr [rax+420h]                                           ; +0xb6, 0x1005eb1e6\nmov     rdi, rax                                                       ; +0xbc, 0x1005eb1ec\ncall    cocos2d__CCSprite__createWithTexture_1                         ; +0xbf, 0x1005eb1ef\nmov     r13, rax                                                       ; +0xc4, 0x1005eb1f4\nmov     rax, [rbx]                                                     ; +0xc7, 0x1005eb1f7\nmov     rdi, rbx                                                       ; +0xca, 0x1005eb1fa\nmov     rsi, r13                                                       ; +0xcd, 0x1005eb1fd\ncall    qword ptr [rax+1B8h]                                           ; +0xd0, 0x1005eb200\nxorps   xmm0, xmm0                                                     ; +0xd6, 0x1005eb206\ncvtsi2ss xmm0, r15d                                                    ; +0xd9, 0x1005eb209\nmulss   xmm0, dword ptr [r13+1B0h]                                     ; +0xde, 0x1005eb20e\nmov     rax, [rbp+var_38]                                              ; +0xe7, 0x1005eb217\nmovss   xmm1, dword ptr [rax+1BCh]                                     ; +0xeb, 0x1005eb21b\nxorps   xmm1, cs:xmmword_1008150B0                                     ; +0xf3, 0x1005eb223\nmov     rdi, r12                                                       ; +0xfa, 0x1005eb22a\ncall    sub_10028CBE0                                                  ; +0xfd, 0x1005eb22d\nmov     rax, [r13+0]                                                   ; +0x102, 0x1005eb232\nmov     rdi, r13                                                       ; +0x106, 0x1005eb236\nmov     rsi, r12                                                       ; +0x109, 0x1005eb239\ncall    qword ptr [rax+0B8h]                                           ; +0x10c, 0x1005eb23c\nxorps   xmm0, xmm0                                                     ; +0x112, 0x1005eb242\nmov     rdi, r12                                                       ; +0x115, 0x1005eb245\nmovss   xmm1, cs:alpha                                                 ; +0x118, 0x1005eb248\ncall    sub_10028CBE0                                                  ; +0x120, 0x1005eb250\nmov     rax, [r13+0]                                                   ; +0x125, 0x1005eb255\nmov     rdi, r13                                                       ; +0x129, 0x1005eb259\nmov     rsi, r12                                                       ; +0x12c, 0x1005eb25c\ncall    qword ptr [rax+118h]                                           ; +0x12f, 0x1005eb25f\nmov     rax, [r13+0]                                                   ; +0x135, 0x1005eb265\nmov     rdi, r13                                                       ; +0x139, 0x1005eb269\nlea     rsi, unk_1008219C8                                             ; +0x13c, 0x1005eb26c\ncall    qword ptr [rax+3B0h]                                           ; +0x143, 0x1005eb273\ninc     r15d                                                           ; +0x149, 0x1005eb279\ncmp     r14d, r15d                                                     ; +0x14c, 0x1005eb27c\njnz     loc_1005EB1E0                                                  ; +0x14f, 0x1005eb27f\njmp     loc_1005EB19D                                                  ; +0x155, 0x1005eb285\nsub     r15d, r14d                                                     ; +0x15a, 0x1005eb28a\ntest    r15d, r15d                                                     ; +0x15d, 0x1005eb28d\njle     loc_1005EB19D                                                  ; +0x160, 0x1005eb290\ninc     r15d                                                           ; +0x166, 0x1005eb296\nnop     dword ptr [rax+00000000h]                                      ; +0x169, 0x1005eb299\nmov     rdi, r13                                                       ; +0x170, 0x1005eb2a0\ncall    sub_100720070                                                  ; +0x173, 0x1005eb2a3\ntest    eax, eax                                                       ; +0x178, 0x1005eb2a8\njz      loc_1005EB19D                                                  ; +0x17a, 0x1005eb2aa\nmov     rdi, r13                                                       ; +0x180, 0x1005eb2b0\ncall    sub_1007200E0                                                  ; +0x183, 0x1005eb2b3\nmov     rcx, [rbx]                                                     ; +0x188, 0x1005eb2b8\nmov     rdi, rbx                                                       ; +0x18b, 0x1005eb2bb\nmov     rsi, rax                                                       ; +0x18e, 0x1005eb2be\nmov     edx, 1                                                         ; +0x191, 0x1005eb2c1\ncall    qword ptr [rcx+218h]                                           ; +0x196, 0x1005eb2c6\nmov     rdi, r13                                                       ; +0x19c, 0x1005eb2cc\nmov     esi, 1                                                         ; +0x19f, 0x1005eb2cf\ncall    sub_100720200                                                  ; +0x1a4, 0x1005eb2d4\ndec     r15d                                                           ; +0x1a9, 0x1005eb2d9\ncmp     r15d, 1                                                        ; +0x1ac, 0x1005eb2dc\njg      short loc_1005EB2A0                                            ; +0x1b0, 0x1005eb2e0\njmp     loc_1005EB19D                                                  ; +0x1b2, 0x1005eb2e2\nlea     r12, [rbp+var_40]                                              ; +0x1b7, 0x1005eb2e7\nnop     dword ptr [rax+rax+00h]                                        ; +0x1bb, 0x1005eb2eb\nmov     rax, [rbx]                                                     ; +0x1c0, 0x1005eb2f0\nmov     rdi, rbx                                                       ; +0x1c3, 0x1005eb2f3\ncall    qword ptr [rax+420h]                                           ; +0x1c6, 0x1005eb2f6\nmov     rdi, rax                                                       ; +0x1cc, 0x1005eb2fc\ncall    cocos2d__CCSprite__createWithTexture_1                         ; +0x1cf, 0x1005eb2ff\nmov     r13, rax                                                       ; +0x1d4, 0x1005eb304\nmov     rax, [rbx]                                                     ; +0x1d7, 0x1005eb307\nmov     rdi, rbx                                                       ; +0x1da, 0x1005eb30a\nmov     rsi, r13                                                       ; +0x1dd, 0x1005eb30d\ncall    qword ptr [rax+1B8h]                                           ; +0x1e0, 0x1005eb310\nxorps   xmm0, xmm0                                                     ; +0x1e6, 0x1005eb316\ncvtsi2ss xmm0, r15d                                                    ; +0x1e9, 0x1005eb319\nmulss   xmm0, dword ptr [r13+1B0h]                                     ; +0x1ee, 0x1005eb31e\nxorps   xmm1, xmm1                                                     ; +0x1f7, 0x1005eb327\nmov     rdi, r12                                                       ; +0x1fa, 0x1005eb32a\ncall    sub_10028CBE0                                                  ; +0x1fd, 0x1005eb32d\nmov     rax, [r13+0]                                                   ; +0x202, 0x1005eb332\nmov     rdi, r13                                                       ; +0x206, 0x1005eb336\nmov     rsi, r12                                                       ; +0x209, 0x1005eb339\ncall    qword ptr [rax+0B8h]                                           ; +0x20c, 0x1005eb33c\nxorps   xmm0, xmm0                                                     ; +0x212, 0x1005eb342\nmov     rdi, r12                                                       ; +0x215, 0x1005eb345\nmovss   xmm1, cs:alpha                                                 ; +0x218, 0x1005eb348\ncall    sub_10028CBE0                                                  ; +0x220, 0x1005eb350\nmov     rax, [r13+0]                                                   ; +0x225, 0x1005eb355\nmov     rdi, r13                                                       ; +0x229, 0x1005eb359\nmov     rsi, r12                                                       ; +0x22c, 0x1005eb35c\ncall    qword ptr [rax+118h]                                           ; +0x22f, 0x1005eb35f\nmov     rax, [r13+0]                                                   ; +0x235, 0x1005eb365\nmov     rdi, r13                                                       ; +0x239, 0x1005eb369\nlea     rsi, unk_1008219C8                                             ; +0x23c, 0x1005eb36c\ncall    qword ptr [rax+3B0h]                                           ; +0x243, 0x1005eb373\ninc     r15d                                                           ; +0x249, 0x1005eb379\ncmp     r14d, r15d                                                     ; +0x24c, 0x1005eb37c\njnz     loc_1005EB2F0                                                  ; +0x24f, 0x1005eb37f\njmp     loc_1005EB19D                                                  ; +0x255, 0x1005eb385", "xrefs": ["GJGroundLayer::init @ 0x1005eadc0", "GJGroundLayer::init @ 0x1005eaef0", "GJGroundLayer::updateGroundWidth @ 0x1005eb720", "GJGroundLayer::updateGroundWidth @ 0x1005eb72d"], "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"}