{"type": "func", "start": 4302038784, "end": 4302039156, "name": "GJGroundLayer::updateGroundWidth", "pseudocode": "// \n// GJGroundLayer::updateGroundWidth from 0x1006be700 to 0x1006be874 (372 bytes)\n// \n// 1 xrefs:\n// > GJGroundLayer::scaleGround @ 0x1006be657\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 GJGroundLayer::updateGroundWidth(__int64 a1, char a2)\n{\n  __int64 v3; // rbx\n  __int64 result; // rax\n  __int64 v5; // rsi\n  __int64 v6; // rax\n  float (__fastcall **v7)(__int64); // rax\n  float v8; // xmm0_4\n  __m128 v9; // xmm1\n  int v10; // r15d\n  float *v11; // rdi\n  double v12; // xmm0_8\n  float v13; // xmm0_4\n  __int64 v14; // rbx\n  __int64 v15; // rax\n  float v16[2]; // [rsp+4h] [rbp-2Ch] BYREF\n  __int64 v17; // [rsp+Ch] [rbp-24h] BYREF\n  float v18; // [rsp+14h] [rbp-1Ch]\n\n  v3 = a1;\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 512LL))(a1);\n  if ( result )\n  {\n    v5 = cocos2d::CCDirector::sharedDirector();\n    cocos2d::CCDirector::getWinSize(&v17, v5);\n    v6 = *(_QWORD *)a1;\n    if ( a2 )\n    {\n      v7 = (float (__fastcall **)(__int64))(v6 + 136);\n    }\n    else\n    {\n      a1 = (*(__int64 (__fastcall **)(__int64))(v6 + 512))(a1);\n      v7 = (float (__fastcall **)(__int64))(*(_QWORD *)a1 + 168LL);\n    }\n    v8 = (*v7)(a1);\n    v9 = (__m128)(unsigned int)v17;\n    v18 = v8;\n    v9.f32[0] = (float)(*(float *)&v17 / v8) + 10.0;\n    *(_DWORD *)(v3 + 452) = v9.i32[0];\n    v9.f32[0] = v9.f32[0] / *(float *)(v3 + 424);\n    v10 = (int)(float)(_mm_round_ss((__m128)0LL, v9, 10).f32[0] + 1.0) + *(unsigned __int8 *)(v3 + 464);\n    GJGroundLayer::loadGroundSprites(v3, v10, 1u);\n    GJGroundLayer::loadGroundSprites(v3, v10, 0);\n    if ( *(int *)(v3 + 448) < 2 )\n    {\n      v9.i64[0] = LODWORD(v18);\n      if ( !a2 )\n      {\nLABEL_10:\n        v13 = *(float *)(v3 + 452);\n        v14 = *(_QWORD *)(v3 + 432);\n        v18 = (float)(v13 * 0.5) + -5.0;\n        v15 = (*(__int64 (__fastcall **)(__int64, float, double))(*(_QWORD *)v14 + 192LL))(v14, v18, *(double *)v9.i64);\n        sub_100278250(v16, v18, *(float *)(v15 + 4));\n        return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v14 + 184LL))(v14, v16);\n      }\n      v11 = *(float **)(v3 + 432);\n      HIDWORD(v12) = 0;\n      *(float *)&v12 = 1.0 / v18;\n    }\n    else\n    {\n      v11 = *(float **)(v3 + 432);\n      *(_QWORD *)&v12 = (unsigned int)v17;\n      *(float *)&v12 = (float)((float)(*(float *)&v17 + 10.0) / v18) / v11[108];\n    }\n    (*(void (__fastcall **)(float *, double))(*(_QWORD *)v11 + 128LL))(v11, v12);\n    goto LABEL_10;\n  }\n  return result;\n}", "assembly": "; \n; GJGroundLayer::updateGroundWidth from 0x1006be700 to 0x1006be874 (372 bytes)\n; \n; 1 xrefs:\n; > GJGroundLayer::scaleGround @ 0x1006be657\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, 0x1006be700\nmov     rbp, rsp                                                       ; +0x1, 0x1006be701\npush    r15                                                            ; +0x4, 0x1006be704\npush    r14                                                            ; +0x6, 0x1006be706\npush    rbx                                                            ; +0x8, 0x1006be708\nsub     rsp, 18h                                                       ; +0x9, 0x1006be709\nmov     r14d, esi                                                      ; +0xd, 0x1006be70d\nmov     rbx, rdi                                                       ; +0x10, 0x1006be710\nmov     rax, [rdi]                                                     ; +0x13, 0x1006be713\ncall    qword ptr [rax+200h]                                           ; +0x16, 0x1006be716\ntest    rax, rax                                                       ; +0x1c, 0x1006be71c\njz      loc_1006BE869                                                  ; +0x1f, 0x1006be71f\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x25, 0x1006be725\nlea     rdi, [rbp+var_24]                                              ; +0x2a, 0x1006be72a\nmov     rsi, rax                                                       ; +0x2e, 0x1006be72e\ncall    cocos2d__CCDirector__getWinSize                                ; +0x31, 0x1006be731\nmov     rax, [rbx]                                                     ; +0x36, 0x1006be736\ntest    r14b, r14b                                                     ; +0x39, 0x1006be739\njz      short loc_1006BE749                                            ; +0x3c, 0x1006be73c\nadd     rax, 88h                                                       ; +0x3e, 0x1006be73e\nmov     rdi, rbx                                                       ; +0x44, 0x1006be744\njmp     short loc_1006BE75D                                            ; +0x47, 0x1006be747\nmov     rdi, rbx                                                       ; +0x49, 0x1006be749\ncall    qword ptr [rax+200h]                                           ; +0x4c, 0x1006be74c\nmov     rdi, rax                                                       ; +0x52, 0x1006be752\nmov     eax, 0A8h                                                      ; +0x55, 0x1006be755\nadd     rax, [rdi]                                                     ; +0x5a, 0x1006be75a\ncall    qword ptr [rax]                                                ; +0x5d, 0x1006be75d\nmovss   xmm1, dword ptr [rbp+var_24]                                   ; +0x5f, 0x1006be75f\nmovss   [rbp+var_1C], xmm0                                             ; +0x64, 0x1006be764\ndivss   xmm1, xmm0                                                     ; +0x69, 0x1006be769\naddss   xmm1, cs:dword_100A035BC                                       ; +0x6d, 0x1006be76d\nmovss   dword ptr [rbx+1C4h], xmm1                                     ; +0x75, 0x1006be775\ndivss   xmm1, dword ptr [rbx+1A8h]                                     ; +0x7d, 0x1006be77d\nxorps   xmm0, xmm0                                                     ; +0x85, 0x1006be785\nroundss xmm0, xmm1, 0Ah                                                ; +0x88, 0x1006be788\naddss   xmm0, cs:alpha                                                 ; +0x8e, 0x1006be78e\ncvttss2si eax, xmm0                                                    ; +0x96, 0x1006be796\nmovzx   r15d, byte ptr [rbx+1D0h]                                      ; +0x9a, 0x1006be79a\nadd     r15d, eax                                                      ; +0xa2, 0x1006be7a2\nmov     rdi, rbx                                                       ; +0xa5, 0x1006be7a5\nmov     esi, r15d                                                      ; +0xa8, 0x1006be7a8\nmov     edx, 1                                                         ; +0xab, 0x1006be7ab\ncall    GJGroundLayer__loadGroundSprites                               ; +0xb0, 0x1006be7b0\nmov     rdi, rbx                                                       ; +0xb5, 0x1006be7b5\nmov     esi, r15d                                                      ; +0xb8, 0x1006be7b8\nxor     edx, edx                                                       ; +0xbb, 0x1006be7bb\ncall    GJGroundLayer__loadGroundSprites                               ; +0xbd, 0x1006be7bd\ncmp     dword ptr [rbx+1C0h], 2                                        ; +0xc2, 0x1006be7c2\njl      short loc_1006BE7EE                                            ; +0xc9, 0x1006be7c9\nmov     rdi, [rbx+1B0h]                                                ; +0xcb, 0x1006be7cb\nmovss   xmm0, dword ptr [rbp+var_24]                                   ; +0xd2, 0x1006be7d2\naddss   xmm0, cs:dword_100A035BC                                       ; +0xd7, 0x1006be7d7\ndivss   xmm0, [rbp+var_1C]                                             ; +0xdf, 0x1006be7df\ndivss   xmm0, dword ptr [rdi+1B0h]                                     ; +0xe4, 0x1006be7e4\njmp     short loc_1006BE80B                                            ; +0xec, 0x1006be7ec\nmovss   xmm1, [rbp+var_1C]                                             ; +0xee, 0x1006be7ee\ntest    r14b, r14b                                                     ; +0xf3, 0x1006be7f3\njz      short loc_1006BE814                                            ; +0xf6, 0x1006be7f6\nmov     rdi, [rbx+1B0h]                                                ; +0xf8, 0x1006be7f8\nmovss   xmm0, cs:alpha                                                 ; +0xff, 0x1006be7ff\ndivss   xmm0, xmm1                                                     ; +0x107, 0x1006be807\nmov     rax, [rdi]                                                     ; +0x10b, 0x1006be80b\ncall    qword ptr [rax+80h]                                            ; +0x10e, 0x1006be80e\nmovss   xmm0, dword ptr [rbx+1C4h]                                     ; +0x114, 0x1006be814\nmulss   xmm0, cs:dword_100A03578                                       ; +0x11c, 0x1006be81c\nmov     rbx, [rbx+1B0h]                                                ; +0x124, 0x1006be824\naddss   xmm0, cs:dword_100A040BC                                       ; +0x12b, 0x1006be82b\nmovss   [rbp+var_1C], xmm0                                             ; +0x133, 0x1006be833\nmov     rax, [rbx]                                                     ; +0x138, 0x1006be838\nmov     rdi, rbx                                                       ; +0x13b, 0x1006be83b\ncall    qword ptr [rax+0C0h]                                           ; +0x13e, 0x1006be83e\nmovss   xmm1, dword ptr [rax+4]                                        ; +0x144, 0x1006be844\nlea     r14, [rbp+var_2C]                                              ; +0x149, 0x1006be849\nmov     rdi, r14                                                       ; +0x14d, 0x1006be84d\nmovss   xmm0, [rbp+var_1C]                                             ; +0x150, 0x1006be850\ncall    sub_100278250                                                  ; +0x155, 0x1006be855\nmov     rax, [rbx]                                                     ; +0x15a, 0x1006be85a\nmov     rdi, rbx                                                       ; +0x15d, 0x1006be85d\nmov     rsi, r14                                                       ; +0x160, 0x1006be860\ncall    qword ptr [rax+0B8h]                                           ; +0x163, 0x1006be863\nadd     rsp, 18h                                                       ; +0x169, 0x1006be869\npop     rbx                                                            ; +0x16d, 0x1006be86d\npop     r14                                                            ; +0x16e, 0x1006be86e\npop     r15                                                            ; +0x170, 0x1006be870\npop     rbp                                                            ; +0x172, 0x1006be872\nretn                                                                   ; +0x173, 0x1006be873", "xrefs": ["GJGroundLayer::scaleGround @ 0x1006be657"], "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"}