{"type": "func", "start": 4302042752, "end": 4302042970, "name": "GJMGLayer::updateGroundWidth", "pseudocode": "// \n// GJMGLayer::updateGroundWidth from 0x1006bf680 to 0x1006bf75a (218 bytes)\n// \n// 1 xrefs:\n// > GJMGLayer::scaleGround @ 0x1006bf65a\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::updateGroundWidth(__int64 a1)\n{\n  __int64 v1; // rbx\n  __int64 result; // rax\n  __int64 v3; // rsi\n  __int64 v4; // rax\n  __int64 v5; // rcx\n  void (__fastcall **v6)(__int64); // rcx\n  float v7; // xmm0_4\n  __m128 v8; // xmm1\n  int v9; // r14d\n  float v10[6]; // [rsp+8h] [rbp-18h] BYREF\n\n  v1 = a1;\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);\n  if ( result )\n  {\n    v3 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::getWinSize(v10, v3);\n    v4 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);\n    v5 = *(_QWORD *)a1;\n    if ( v4 )\n    {\n      v6 = (void (__fastcall **)(__int64))(v5 + 136);\n    }\n    else\n    {\n      a1 = (*(__int64 (__fastcall **)(__int64))(v5 + 512))(a1);\n      v6 = (void (__fastcall **)(__int64))(*(_QWORD *)a1 + 168LL);\n    }\n    (*v6)(a1);\n    v7 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v1 + 136LL))(v1);\n    v8 = (__m128)LODWORD(v10[0]);\n    v8.f32[0] = (float)(v10[0] / v7) + 10.0;\n    *(_DWORD *)(v1 + 444) = v8.i32[0];\n    v8.f32[0] = v8.f32[0] / *(float *)(v1 + 424);\n    v9 = (int)(float)(_mm_round_ss((__m128)0LL, v8, 10).f32[0] + 1.0) + *(unsigned __int8 *)(v1 + 456);\n    GJMGLayer::loadGroundSprites(v1, v9, 1u);\n    return GJMGLayer::loadGroundSprites(v1, v9, 0);\n  }\n  return result;\n}", "assembly": "; \n; GJMGLayer::updateGroundWidth from 0x1006bf680 to 0x1006bf75a (218 bytes)\n; \n; 1 xrefs:\n; > GJMGLayer::scaleGround @ 0x1006bf65a\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, 0x1006bf680\nmov     rbp, rsp                                                       ; +0x1, 0x1006bf681\npush    r14                                                            ; +0x4, 0x1006bf684\npush    rbx                                                            ; +0x6, 0x1006bf686\nsub     rsp, 10h                                                       ; +0x7, 0x1006bf687\nmov     rbx, rdi                                                       ; +0xb, 0x1006bf68b\nmov     rax, [rdi]                                                     ; +0xe, 0x1006bf68e\ncall    qword ptr [rax+200h]                                           ; +0x11, 0x1006bf691\ntest    rax, rax                                                       ; +0x17, 0x1006bf697\njz      loc_1006BF751                                                  ; +0x1a, 0x1006bf69a\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x20, 0x1006bf6a0\nlea     rdi, [rbp+var_18]                                              ; +0x25, 0x1006bf6a5\nmov     rsi, rax                                                       ; +0x29, 0x1006bf6a9\ncall    cocos2d__CCDirector__getWinSize                                ; +0x2c, 0x1006bf6ac\nmov     rax, [rbx]                                                     ; +0x31, 0x1006bf6b1\nmov     rdi, rbx                                                       ; +0x34, 0x1006bf6b4\ncall    qword ptr [rax+200h]                                           ; +0x37, 0x1006bf6b7\nmov     rcx, [rbx]                                                     ; +0x3d, 0x1006bf6bd\ntest    rax, rax                                                       ; +0x40, 0x1006bf6c0\njz      short loc_1006BF6D1                                            ; +0x43, 0x1006bf6c3\nadd     rcx, 88h                                                       ; +0x45, 0x1006bf6c5\nmov     rdi, rbx                                                       ; +0x4c, 0x1006bf6cc\njmp     short loc_1006BF6E5                                            ; +0x4f, 0x1006bf6cf\nmov     rdi, rbx                                                       ; +0x51, 0x1006bf6d1\ncall    qword ptr [rcx+200h]                                           ; +0x54, 0x1006bf6d4\nmov     rdi, rax                                                       ; +0x5a, 0x1006bf6da\nmov     ecx, 0A8h                                                      ; +0x5d, 0x1006bf6dd\nadd     rcx, [rax]                                                     ; +0x62, 0x1006bf6e2\ncall    qword ptr [rcx]                                                ; +0x65, 0x1006bf6e5\nmov     rax, [rbx]                                                     ; +0x67, 0x1006bf6e7\nmov     rdi, rbx                                                       ; +0x6a, 0x1006bf6ea\ncall    qword ptr [rax+88h]                                            ; +0x6d, 0x1006bf6ed\nmovss   xmm1, [rbp+var_18]                                             ; +0x73, 0x1006bf6f3\ndivss   xmm1, xmm0                                                     ; +0x78, 0x1006bf6f8\naddss   xmm1, cs:dword_100A035BC                                       ; +0x7c, 0x1006bf6fc\nmovss   dword ptr [rbx+1BCh], xmm1                                     ; +0x84, 0x1006bf704\ndivss   xmm1, dword ptr [rbx+1A8h]                                     ; +0x8c, 0x1006bf70c\nxorps   xmm0, xmm0                                                     ; +0x94, 0x1006bf714\nroundss xmm0, xmm1, 0Ah                                                ; +0x97, 0x1006bf717\naddss   xmm0, cs:alpha                                                 ; +0x9d, 0x1006bf71d\ncvttss2si eax, xmm0                                                    ; +0xa5, 0x1006bf725\nmovzx   r14d, byte ptr [rbx+1C8h]                                      ; +0xa9, 0x1006bf729\nadd     r14d, eax                                                      ; +0xb1, 0x1006bf731\nmov     rdi, rbx                                                       ; +0xb4, 0x1006bf734\nmov     esi, r14d                                                      ; +0xb7, 0x1006bf737\nmov     edx, 1                                                         ; +0xba, 0x1006bf73a\ncall    GJMGLayer__loadGroundSprites                                   ; +0xbf, 0x1006bf73f\nmov     rdi, rbx                                                       ; +0xc4, 0x1006bf744\nmov     esi, r14d                                                      ; +0xc7, 0x1006bf747\nxor     edx, edx                                                       ; +0xca, 0x1006bf74a\ncall    GJMGLayer__loadGroundSprites                                   ; +0xcc, 0x1006bf74c\nadd     rsp, 10h                                                       ; +0xd1, 0x1006bf751\npop     rbx                                                            ; +0xd5, 0x1006bf755\npop     r14                                                            ; +0xd6, 0x1006bf756\npop     rbp                                                            ; +0xd8, 0x1006bf758\nretn                                                                   ; +0xd9, 0x1006bf759", "xrefs": ["GJMGLayer::scaleGround @ 0x1006bf65a"], "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"}