{"type": "func", "start": 4302041728, "end": 4302042135, "name": "GJMGLayer::loadGroundSprites", "pseudocode": "// \n// GJMGLayer::loadGroundSprites from 0x1006bf280 to 0x1006bf417 (407 bytes)\n// \n// 4 xrefs:\n// > GJMGLayer::init @ 0x1006bf011\n// > GJMGLayer::init @ 0x1006bf1bb\n// > GJMGLayer::updateGroundWidth @ 0x1006bf73f\n// > GJMGLayer::updateGroundWidth @ 0x1006bf74c\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:35:31 +0000\n// \n\n__int64 __fastcall GJMGLayer::loadGroundSprites(__int64 a1, int a2, unsigned __int8 a3)\n{\n  __int64 v3; // rax\n  __int64 result; // rax\n  __int64 v5; // rbx\n  __int64 v7; // r12\n  __int64 v8; // rsi\n  unsigned int v9; // r13d\n  int v10; // r15d\n  __int64 v11; // rax\n  float *v12; // r13\n  int v13; // r15d\n  __int64 v14; // rax\n  float v15[12]; // [rsp+0h] [rbp-30h] BYREF\n\n  *(_QWORD *)v15 = v3;\n  result = a3 ^ 1u;\n  v5 = *(_QWORD *)(a1 + 8 * result + 408);\n  if ( v5 )\n  {\n    v7 = sub_1007FE900(a1);\n    if ( (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 488LL))(v5) )\n    {\n      v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 488LL))(v5);\n      sub_1007FEF70(v7, v8);\n    }\n    result = sub_1007FEF90(v7);\n    if ( (_DWORD)result != a2 )\n    {\n      v9 = sub_1007FEF90(v7);\n      result = sub_1007FEF90(v7);\n      v10 = result;\n      if ( v9 >= a2 )\n      {\n        if ( (int)result - a2 > 0 )\n        {\n          v13 = result - a2 + 1;\n          do\n          {\n            result = sub_1007FEF90(v7);\n            if ( !(_DWORD)result )\n              break;\n            v14 = sub_1007FF000(v7);\n            (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v5 + 552LL))(v5, v14, 1);\n            result = sub_1007FF120(v7, 1);\n            --v13;\n          }\n          while ( v13 > 1 );\n        }\n      }\n      else if ( (int)result < a2 )\n      {\n        do\n        {\n          v11 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 1072LL))(v5);\n          v12 = (float *)cocos2d::CCSprite::createWithTexture_1(v11);\n          (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v5 + 456LL))(v5, v12);\n          sub_100278250(v15, (float)v10 * v12[108], 0.0);\n          (*(void (__fastcall **)(float *, float *))(*(_QWORD *)v12 + 184LL))(v12, v15);\n          sub_100278250(v15, 0.0, 0.0);\n          (*(void (__fastcall **)(float *, float *))(*(_QWORD *)v12 + 296LL))(v12, v15);\n          result = (*(__int64 (__fastcall **)(float *, void *))(*(_QWORD *)v12 + 960LL))(v12, &unk_100A108C8);\n          ++v10;\n        }\n        while ( a2 != v10 );\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJMGLayer::loadGroundSprites from 0x1006bf280 to 0x1006bf417 (407 bytes)\n; \n; 4 xrefs:\n; > GJMGLayer::init @ 0x1006bf011\n; > GJMGLayer::init @ 0x1006bf1bb\n; > GJMGLayer::updateGroundWidth @ 0x1006bf73f\n; > GJMGLayer::updateGroundWidth @ 0x1006bf74c\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\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 12:35:31 +0000\n; \npush    rbp                                                            ; +0x0, 0x1006bf280\nmov     rbp, rsp                                                       ; +0x1, 0x1006bf281\npush    r15                                                            ; +0x4, 0x1006bf284\npush    r14                                                            ; +0x6, 0x1006bf286\npush    r13                                                            ; +0x8, 0x1006bf288\npush    r12                                                            ; +0xa, 0x1006bf28a\npush    rbx                                                            ; +0xc, 0x1006bf28c\npush    rax                                                            ; +0xd, 0x1006bf28d\nxor     dl, 1                                                          ; +0xe, 0x1006bf28e\nmovzx   eax, dl                                                        ; +0x11, 0x1006bf291\nmov     rbx, [rdi+rax*8+198h]                                          ; +0x14, 0x1006bf294\ntest    rbx, rbx                                                       ; +0x1c, 0x1006bf29c\njz      short loc_1006BF2E1                                            ; +0x1f, 0x1006bf29f\nmov     r14d, esi                                                      ; +0x21, 0x1006bf2a1\ncall    sub_1007FE900                                                  ; +0x24, 0x1006bf2a4\nmov     r12, rax                                                       ; +0x29, 0x1006bf2a9\nmov     rax, [rbx]                                                     ; +0x2c, 0x1006bf2ac\nmov     rdi, rbx                                                       ; +0x2f, 0x1006bf2af\ncall    qword ptr [rax+1E8h]                                           ; +0x32, 0x1006bf2b2\ntest    rax, rax                                                       ; +0x38, 0x1006bf2b8\njz      short loc_1006BF2D4                                            ; +0x3b, 0x1006bf2bb\nmov     rax, [rbx]                                                     ; +0x3d, 0x1006bf2bd\nmov     rdi, rbx                                                       ; +0x40, 0x1006bf2c0\ncall    qword ptr [rax+1E8h]                                           ; +0x43, 0x1006bf2c3\nmov     rdi, r12                                                       ; +0x49, 0x1006bf2c9\nmov     rsi, rax                                                       ; +0x4c, 0x1006bf2cc\ncall    sub_1007FEF70                                                  ; +0x4f, 0x1006bf2cf\nmov     rdi, r12                                                       ; +0x54, 0x1006bf2d4\ncall    sub_1007FEF90                                                  ; +0x57, 0x1006bf2d7\ncmp     eax, r14d                                                      ; +0x5c, 0x1006bf2dc\njnz     short loc_1006BF2F0                                            ; +0x5f, 0x1006bf2df\nadd     rsp, 8                                                         ; +0x61, 0x1006bf2e1\npop     rbx                                                            ; +0x65, 0x1006bf2e5\npop     r12                                                            ; +0x66, 0x1006bf2e6\npop     r13                                                            ; +0x68, 0x1006bf2e8\npop     r14                                                            ; +0x6a, 0x1006bf2ea\npop     r15                                                            ; +0x6c, 0x1006bf2ec\npop     rbp                                                            ; +0x6e, 0x1006bf2ee\nretn                                                                   ; +0x6f, 0x1006bf2ef\nmov     rdi, r12                                                       ; +0x70, 0x1006bf2f0\ncall    sub_1007FEF90                                                  ; +0x73, 0x1006bf2f3\nmov     r13d, eax                                                      ; +0x78, 0x1006bf2f8\nmov     rdi, r12                                                       ; +0x7b, 0x1006bf2fb\ncall    sub_1007FEF90                                                  ; +0x7e, 0x1006bf2fe\nmov     r15d, eax                                                      ; +0x83, 0x1006bf303\ncmp     r13d, r14d                                                     ; +0x86, 0x1006bf306\njnb     loc_1006BF3B5                                                  ; +0x89, 0x1006bf309\ncmp     r15d, r14d                                                     ; +0x8f, 0x1006bf30f\njge     short loc_1006BF2E1                                            ; +0x92, 0x1006bf312\nlea     r12, [rbp+var_30]                                              ; +0x94, 0x1006bf314\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x98, 0x1006bf318\nmov     rax, [rbx]                                                     ; +0xa0, 0x1006bf320\nmov     rdi, rbx                                                       ; +0xa3, 0x1006bf323\ncall    qword ptr [rax+430h]                                           ; +0xa6, 0x1006bf326\nmov     rdi, rax                                                       ; +0xac, 0x1006bf32c\ncall    cocos2d__CCSprite__createWithTexture_1                         ; +0xaf, 0x1006bf32f\nmov     r13, rax                                                       ; +0xb4, 0x1006bf334\nmov     rax, [rbx]                                                     ; +0xb7, 0x1006bf337\nmov     rdi, rbx                                                       ; +0xba, 0x1006bf33a\nmov     rsi, r13                                                       ; +0xbd, 0x1006bf33d\ncall    qword ptr [rax+1C8h]                                           ; +0xc0, 0x1006bf340\nxorps   xmm0, xmm0                                                     ; +0xc6, 0x1006bf346\ncvtsi2ss xmm0, r15d                                                    ; +0xc9, 0x1006bf349\nmulss   xmm0, dword ptr [r13+1B0h]                                     ; +0xce, 0x1006bf34e\nxorps   xmm1, xmm1                                                     ; +0xd7, 0x1006bf357\nmov     rdi, r12                                                       ; +0xda, 0x1006bf35a\ncall    sub_100278250                                                  ; +0xdd, 0x1006bf35d\nmov     rax, [r13+0]                                                   ; +0xe2, 0x1006bf362\nmov     rdi, r13                                                       ; +0xe6, 0x1006bf366\nmov     rsi, r12                                                       ; +0xe9, 0x1006bf369\ncall    qword ptr [rax+0B8h]                                           ; +0xec, 0x1006bf36c\nxorps   xmm0, xmm0                                                     ; +0xf2, 0x1006bf372\nxorps   xmm1, xmm1                                                     ; +0xf5, 0x1006bf375\nmov     rdi, r12                                                       ; +0xf8, 0x1006bf378\ncall    sub_100278250                                                  ; +0xfb, 0x1006bf37b\nmov     rax, [r13+0]                                                   ; +0x100, 0x1006bf380\nmov     rdi, r13                                                       ; +0x104, 0x1006bf384\nmov     rsi, r12                                                       ; +0x107, 0x1006bf387\ncall    qword ptr [rax+128h]                                           ; +0x10a, 0x1006bf38a\nmov     rax, [r13+0]                                                   ; +0x110, 0x1006bf390\nmov     rdi, r13                                                       ; +0x114, 0x1006bf394\nlea     rsi, unk_100A108C8                                             ; +0x117, 0x1006bf397\ncall    qword ptr [rax+3C0h]                                           ; +0x11e, 0x1006bf39e\ninc     r15d                                                           ; +0x124, 0x1006bf3a4\ncmp     r14d, r15d                                                     ; +0x127, 0x1006bf3a7\njnz     loc_1006BF320                                                  ; +0x12a, 0x1006bf3aa\njmp     loc_1006BF2E1                                                  ; +0x130, 0x1006bf3b0\nsub     r15d, r14d                                                     ; +0x135, 0x1006bf3b5\ntest    r15d, r15d                                                     ; +0x138, 0x1006bf3b8\njle     loc_1006BF2E1                                                  ; +0x13b, 0x1006bf3bb\ninc     r15d                                                           ; +0x141, 0x1006bf3c1\nnop     word ptr [rax+rax+00000000h]                                   ; +0x144, 0x1006bf3c4\nmov     rdi, r12                                                       ; +0x150, 0x1006bf3d0\ncall    sub_1007FEF90                                                  ; +0x153, 0x1006bf3d3\ntest    eax, eax                                                       ; +0x158, 0x1006bf3d8\njz      loc_1006BF2E1                                                  ; +0x15a, 0x1006bf3da\nmov     rdi, r12                                                       ; +0x160, 0x1006bf3e0\ncall    sub_1007FF000                                                  ; +0x163, 0x1006bf3e3\nmov     rcx, [rbx]                                                     ; +0x168, 0x1006bf3e8\nmov     rdi, rbx                                                       ; +0x16b, 0x1006bf3eb\nmov     rsi, rax                                                       ; +0x16e, 0x1006bf3ee\nmov     edx, 1                                                         ; +0x171, 0x1006bf3f1\ncall    qword ptr [rcx+228h]                                           ; +0x176, 0x1006bf3f6\nmov     rdi, r12                                                       ; +0x17c, 0x1006bf3fc\nmov     esi, 1                                                         ; +0x17f, 0x1006bf3ff\ncall    sub_1007FF120                                                  ; +0x184, 0x1006bf404\ndec     r15d                                                           ; +0x189, 0x1006bf409\ncmp     r15d, 1                                                        ; +0x18c, 0x1006bf40c\njg      short loc_1006BF3D0                                            ; +0x190, 0x1006bf410\njmp     loc_1006BF2E1                                                  ; +0x192, 0x1006bf412", "xrefs": ["GJMGLayer::init @ 0x1006bf011", "GJMGLayer::init @ 0x1006bf1bb", "GJMGLayer::updateGroundWidth @ 0x1006bf73f", "GJMGLayer::updateGroundWidth @ 0x1006bf74c"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}