{"type": "func", "start": 4301174112, "end": 4301174369, "name": "GJGroundLayer::scaleGround", "pseudocode": "// \n// GJGroundLayer::scaleGround from 0x1005eb560 to 0x1005eb661 (257 bytes)\n// \n// 6 xrefs:\n// > GJBaseGameLayer::preUpdateVisibility @ 0x10014f78b\n// > GJBaseGameLayer::preUpdateVisibility @ 0x10014f7a6\n// > GJBaseGameLayer::resetLevelVariables @ 0x100159805\n// > GJBaseGameLayer::resetLevelVariables @ 0x100159820\n// > GJBaseGameLayer::updateCameraBGArt @ 0x10015b802\n// > GJBaseGameLayer::updateCameraBGArt @ 0x10015b81b\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!\nfloat __fastcall GJGroundLayer::scaleGround(GJGroundLayer *a1, float a2)\n{\n  __m128 v3; // xmm0\n  __m128 v4; // xmm0\n  __int64 v5; // rax\n  __int64 v6; // rbx\n  __m128 v8; // [rsp+0h] [rbp-40h]\n  float m_groundWidth; // [rsp+0h] [rbp-40h]\n  float v10; // [rsp+1Ch] [rbp-24h] BYREF\n  float v11; // [rsp+24h] [rbp-1Ch]\n  float v12; // [rsp+28h] [rbp-18h]\n  float v13; // [rsp+2Ch] [rbp-14h]\n\n  v8 = *(__m128 *)&a2;\n  ((void (__fastcall *)(GJGroundLayer *))a1->setScaleX)(a1);\n  *(double *)v3.i64 = ((double (__fastcall *)(GJGroundLayer *))a1->getScaleY)(a1);\n  v4 = _mm_cmplt_ss(v3, (__m128)0LL);\n  ((void (__fastcall *)(GJGroundLayer *, double))a1->setScaleY)(\n    a1,\n    COERCE_DOUBLE(_mm_andnot_ps(v4, v8).u64[0] | (v8.i64[0] ^ 0x8000000080000000LL) & v4.i64[0]));\n  m_groundWidth = a1->m_groundWidth;\n  GJGroundLayer::updateGroundWidth(a1, 1);\n  v11 = a1->m_groundWidth;\n  v12 = ((float (__fastcall *)(GJGroundLayer *))a1->getScaleX)(a1);\n  cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v10);\n  v13 = v10;\n  v5 = ((__int64 (__fastcall *)(GJGroundLayer *, __int64))a1->getChildByTag)(a1, 1);\n  if ( v5 )\n  {\n    v6 = v5;\n    sub_10028CBE0(&v10, (float)(v13 / v12) + 1.0, 0.0);\n    (*(void (__fastcall **)(__int64, float *))(*(_QWORD *)v6 + 184LL))(v6, &v10);\n  }\n  return v11 - m_groundWidth;\n}", "assembly": "; \n; GJGroundLayer::scaleGround from 0x1005eb560 to 0x1005eb661 (257 bytes)\n; \n; 6 xrefs:\n; > GJBaseGameLayer::preUpdateVisibility @ 0x10014f78b\n; > GJBaseGameLayer::preUpdateVisibility @ 0x10014f7a6\n; > GJBaseGameLayer::resetLevelVariables @ 0x100159805\n; > GJBaseGameLayer::resetLevelVariables @ 0x100159820\n; > GJBaseGameLayer::updateCameraBGArt @ 0x10015b802\n; > GJBaseGameLayer::updateCameraBGArt @ 0x10015b81b\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, 0x1005eb560\nmov     rbp, rsp                                                       ; +0x1, 0x1005eb561\npush    r14                                                            ; +0x4, 0x1005eb564\npush    rbx                                                            ; +0x6, 0x1005eb566\nsub     rsp, 30h                                                       ; +0x7, 0x1005eb567\nmovaps  [rbp+var_40], xmm0                                             ; +0xb, 0x1005eb56b\nmov     rbx, rdi                                                       ; +0xf, 0x1005eb56f\nmov     rax, [rdi]                                                     ; +0x12, 0x1005eb572\ncall    qword ptr [rax+80h]                                            ; +0x15, 0x1005eb575\nmov     rax, [rbx]                                                     ; +0x1b, 0x1005eb57b\nmov     rdi, rbx                                                       ; +0x1e, 0x1005eb57e\ncall    qword ptr [rax+98h]                                            ; +0x21, 0x1005eb581\nmovaps  xmm1, cs:xmmword_1008150B0                                     ; +0x27, 0x1005eb587\nmovaps  xmm3, [rbp+var_40]                                             ; +0x2e, 0x1005eb58e\nxorps   xmm1, xmm3                                                     ; +0x32, 0x1005eb592\nxorps   xmm2, xmm2                                                     ; +0x35, 0x1005eb595\ncmpltss xmm0, xmm2                                                     ; +0x38, 0x1005eb598\nandps   xmm1, xmm0                                                     ; +0x3d, 0x1005eb59d\nandnps  xmm0, xmm3                                                     ; +0x40, 0x1005eb5a0\norps    xmm0, xmm1                                                     ; +0x43, 0x1005eb5a3\nmov     rax, [rbx]                                                     ; +0x46, 0x1005eb5a6\nmov     rdi, rbx                                                       ; +0x49, 0x1005eb5a9\ncall    qword ptr [rax+90h]                                            ; +0x4c, 0x1005eb5ac\nmovss   xmm0, dword ptr [rbx+1C4h]                                     ; +0x52, 0x1005eb5b2\nmovss   dword ptr [rbp+var_40], xmm0                                   ; +0x5a, 0x1005eb5ba\nmov     rdi, rbx                                                       ; +0x5f, 0x1005eb5bf\nmov     esi, 1                                                         ; +0x62, 0x1005eb5c2\ncall    GJGroundLayer__updateGroundWidth                               ; +0x67, 0x1005eb5c7\nmovss   xmm0, dword ptr [rbx+1C4h]                                     ; +0x6c, 0x1005eb5cc\nmovss   [rbp+var_1C], xmm0                                             ; +0x74, 0x1005eb5d4\nmov     rax, [rbx]                                                     ; +0x79, 0x1005eb5d9\nmov     rdi, rbx                                                       ; +0x7c, 0x1005eb5dc\ncall    qword ptr [rax+88h]                                            ; +0x7f, 0x1005eb5df\nmovss   [rbp+var_18], xmm0                                             ; +0x85, 0x1005eb5e5\ncall    cocos2d__CCDirector__sharedDirector                            ; +0x8a, 0x1005eb5ea\nlea     rdi, [rbp+var_24]                                              ; +0x8f, 0x1005eb5ef\nmov     rsi, rax                                                       ; +0x93, 0x1005eb5f3\ncall    cocos2d__CCDirector__getWinSize                                ; +0x96, 0x1005eb5f6\nmovss   xmm0, [rbp+var_24]                                             ; +0x9b, 0x1005eb5fb\nmovss   [rbp+var_14], xmm0                                             ; +0xa0, 0x1005eb600\nmov     rax, [rbx]                                                     ; +0xa5, 0x1005eb605\nmov     rdi, rbx                                                       ; +0xa8, 0x1005eb608\nmov     esi, 1                                                         ; +0xab, 0x1005eb60b\ncall    qword ptr [rax+1D0h]                                           ; +0xb0, 0x1005eb610\ntest    rax, rax                                                       ; +0xb6, 0x1005eb616\njz      short loc_1005EB64E                                            ; +0xb9, 0x1005eb619\nmov     rbx, rax                                                       ; +0xbb, 0x1005eb61b\nmovss   xmm0, [rbp+var_14]                                             ; +0xbe, 0x1005eb61e\ndivss   xmm0, [rbp+var_18]                                             ; +0xc3, 0x1005eb623\naddss   xmm0, cs:alpha                                                 ; +0xc8, 0x1005eb628\nlea     r14, [rbp+var_24]                                              ; +0xd0, 0x1005eb630\nxorps   xmm1, xmm1                                                     ; +0xd4, 0x1005eb634\nmov     rdi, r14                                                       ; +0xd7, 0x1005eb637\ncall    sub_10028CBE0                                                  ; +0xda, 0x1005eb63a\nmov     rax, [rbx]                                                     ; +0xdf, 0x1005eb63f\nmov     rdi, rbx                                                       ; +0xe2, 0x1005eb642\nmov     rsi, r14                                                       ; +0xe5, 0x1005eb645\ncall    qword ptr [rax+0B8h]                                           ; +0xe8, 0x1005eb648\nmovss   xmm0, [rbp+var_1C]                                             ; +0xee, 0x1005eb64e\nsubss   xmm0, dword ptr [rbp+var_40]                                   ; +0xf3, 0x1005eb653\nadd     rsp, 30h                                                       ; +0xf8, 0x1005eb658\npop     rbx                                                            ; +0xfc, 0x1005eb65c\npop     r14                                                            ; +0xfd, 0x1005eb65d\npop     rbp                                                            ; +0xff, 0x1005eb65f\nretn                                                                   ; +0x100, 0x1005eb660", "xrefs": ["GJBaseGameLayer::preUpdateVisibility @ 0x10014f78b", "GJBaseGameLayer::preUpdateVisibility @ 0x10014f7a6", "GJBaseGameLayer::resetLevelVariables @ 0x100159805", "GJBaseGameLayer::resetLevelVariables @ 0x100159820", "GJBaseGameLayer::updateCameraBGArt @ 0x10015b802", "GJBaseGameLayer::updateCameraBGArt @ 0x10015b81b"], "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"}