{"type": "func", "start": 5371325504, "end": 5371325924, "name": "GJGroundLayer::scaleGround", "pseudocode": "// \n// GJGroundLayer::scaleGround from 0x14027ec40 to 0x14027ede4 (420 bytes)\n// \n// 9 xrefs:\n// > GJBaseGameLayer::preUpdateVisibility @ 0x140236598\n// > GJBaseGameLayer::preUpdateVisibility @ 0x1402365b7\n// > GJBaseGameLayer::resetLevelVariables @ 0x14023b6e1\n// > GJBaseGameLayer::resetLevelVariables @ 0x14023b700\n// > GJBaseGameLayer::updateCameraBGArt @ 0x14023ea94\n// > GJBaseGameLayer::updateCameraBGArt @ 0x14023eaab\n// > <???> @ 0x1406879ac\n// > <???> @ 0x1406879bc\n// > <???> @ 0x1406d125c\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\nfloat GJGroundLayer::scaleGround(GJGroundLayer *a1, float a2)\n{\n  float m_groundWidth; // xmm8_4\n  __int64 v4; // rcx\n  cocos2d::CCDirector *v5; // rax\n  double v6; // xmm0_8\n  float v7; // xmm0_4\n  int v8; // ebx\n  cocos2d::CCSprite *m_lineSprite; // rcx\n  cocos2d::CCSprite_vtbl *v10; // rbx\n  const cocos2d::CCPoint *v11; // rax\n  float v12; // xmm6_4\n  float v14; // [rsp+60h] [rbp+8h]\n\n  ((void (__fastcall *)(GJGroundLayer *))a1->setScaleX)(a1);\n  a1->getScaleY(a1);\n  ((void (__fastcall *)(GJGroundLayer *))a1->setScaleY)(a1);\n  m_groundWidth = a1->m_groundWidth;\n  if ( a1->getParent(a1) )\n  {\n    v5 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v4);\n    cocos2d::CCDirector::getWinSize(v5);\n    v6 = ((double (__fastcall *)(GJGroundLayer *))a1->getScaleX)(a1);\n    *(float *)&v6 = (float)(v14 / *(float *)&v6) + 10.0;\n    a1->m_groundWidth = *(float *)&v6;\n    v7 = ceilf(*(float *)&v6 / a1->m_textureWidth) + 1.0;\n    v8 = (int)v7 + 1;\n    if ( !a1->m_cameraRotated )\n      v8 = (int)v7;\n    GJGroundLayer::loadGroundSprites(a1, v8, 1);\n    GJGroundLayer::loadGroundSprites(a1, v8, 0);\n    ((void (*)(void))a1->m_lineSprite->setScaleX)();\n    m_lineSprite = a1->m_lineSprite;\n    v10 = m_lineSprite->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    m_lineSprite->getPosition_0(m_lineSprite);\n    cocos2d::CCPoint::CCPoint(v7, (float)(a1->m_groundWidth * 0.5) - 5.0);\n    v10->setPosition_0(a1->m_lineSprite, v11);\n  }\n  v12 = a1->m_groundWidth - m_groundWidth;\n  GJGroundLayer::updateShadows(a1);\n  return v12;\n}", "assembly": "; \n; GJGroundLayer::scaleGround from 0x14027ec40 to 0x14027ede4 (420 bytes)\n; \n; 9 xrefs:\n; > GJBaseGameLayer::preUpdateVisibility @ 0x140236598\n; > GJBaseGameLayer::preUpdateVisibility @ 0x1402365b7\n; > GJBaseGameLayer::resetLevelVariables @ 0x14023b6e1\n; > GJBaseGameLayer::resetLevelVariables @ 0x14023b700\n; > GJBaseGameLayer::updateCameraBGArt @ 0x14023ea94\n; > GJBaseGameLayer::updateCameraBGArt @ 0x14023eaab\n; > <???> @ 0x1406879ac\n; > <???> @ 0x1406879bc\n; > <???> @ 0x1406d125c\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    rdi                                                            ; +0x0, 0x14027ec40\nsub     rsp, 50h                                                       ; +0x2, 0x14027ec42\nmov     rax, [rcx]                                                     ; +0x6, 0x14027ec46\nmov     rdi, rcx                                                       ; +0x9, 0x14027ec49\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0xc, 0x14027ec4c\nmovaps  xmm6, xmm1                                                     ; +0x11, 0x14027ec51\nmovaps  [rsp+58h+var_38], xmm8                                         ; +0x14, 0x14027ec54\ncall    qword ptr [rax+78h]                                            ; +0x1a, 0x14027ec5a\nmov     rax, [rdi]                                                     ; +0x1d, 0x14027ec5d\nmov     rcx, rdi                                                       ; +0x20, 0x14027ec60\ncall    qword ptr [rax+90h]                                            ; +0x23, 0x14027ec63\nxorps   xmm2, xmm2                                                     ; +0x29, 0x14027ec69\ncomiss  xmm2, xmm0                                                     ; +0x2c, 0x14027ec6c\njbe     short loc_14027EC78                                            ; +0x2f, 0x14027ec6f\nxorps   xmm6, cs:xmmword_1406243F0                                     ; +0x31, 0x14027ec71\nmov     rax, [rdi]                                                     ; +0x38, 0x14027ec78\nmovaps  xmm1, xmm6                                                     ; +0x3b, 0x14027ec7b\nmov     rcx, rdi                                                       ; +0x3e, 0x14027ec7e\ncall    qword ptr [rax+88h]                                            ; +0x41, 0x14027ec81\nmov     rax, [rdi]                                                     ; +0x47, 0x14027ec87\nmov     rcx, rdi                                                       ; +0x4a, 0x14027ec8a\nmovss   xmm8, dword ptr [rdi+1C4h]                                     ; +0x4d, 0x14027ec8d\ncall    qword ptr [rax+1E8h]                                           ; +0x56, 0x14027ec96\ntest    rax, rax                                                       ; +0x5c, 0x14027ec9c\njz      loc_14027EDBB                                                  ; +0x5f, 0x14027ec9f\nmov     [rsp+58h+arg_8], rbx                                           ; +0x65, 0x14027eca5\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x6a, 0x14027ecaa\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x6f, 0x14027ecaf\nmov     rcx, rax                                                       ; +0x75, 0x14027ecb5\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x78, 0x14027ecb8\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x7d, 0x14027ecbd\nmov     rax, [rdi]                                                     ; +0x83, 0x14027ecc3\nmov     rcx, rdi                                                       ; +0x86, 0x14027ecc6\ncall    qword ptr [rax+80h]                                            ; +0x89, 0x14027ecc9\nmovaps  xmm7, xmm0                                                     ; +0x8f, 0x14027eccf\nmovss   xmm0, [rsp+58h+arg_0]                                          ; +0x92, 0x14027ecd2\ndivss   xmm0, xmm7                                                     ; +0x98, 0x14027ecd8\naddss   xmm0, cs:flt_14062307C                                         ; +0x9c, 0x14027ecdc\nmovss   dword ptr [rdi+1C4h], xmm0                                     ; +0xa4, 0x14027ece4\ndivss   xmm0, dword ptr [rdi+1A8h]; X                                  ; +0xac, 0x14027ecec\ncall    ceilf                                                          ; +0xb4, 0x14027ecf4\ncmp     byte ptr [rdi+1D0h], 0                                         ; +0xb9, 0x14027ecf9\nmov     r8b, 1                                                         ; +0xc0, 0x14027ed00\nmovss   xmm6, cs:flt_140622C24                                         ; +0xc3, 0x14027ed03\nmov     rcx, rdi                                                       ; +0xcb, 0x14027ed0b\naddss   xmm0, xmm6                                                     ; +0xce, 0x14027ed0e\ncvttss2si eax, xmm0                                                    ; +0xd2, 0x14027ed12\nlea     ebx, [rax+1]                                                   ; +0xd6, 0x14027ed16\ncmovz   ebx, eax                                                       ; +0xd9, 0x14027ed19\nmov     edx, ebx                                                       ; +0xdc, 0x14027ed1c\ncall    GJGroundLayer__loadGroundSprites                               ; +0xde, 0x14027ed1e\nxor     r8d, r8d                                                       ; +0xe3, 0x14027ed23\nmov     edx, ebx                                                       ; +0xe6, 0x14027ed26\nmov     rcx, rdi                                                       ; +0xe8, 0x14027ed28\ncall    GJGroundLayer__loadGroundSprites                               ; +0xeb, 0x14027ed2b\ncmp     dword ptr [rdi+1C0h], 1                                        ; +0xf0, 0x14027ed30\nmov     rcx, [rdi+1B0h]                                                ; +0xf7, 0x14027ed37\nmov     rax, [rcx]                                                     ; +0xfe, 0x14027ed3e\njle     short loc_14027ED5F                                            ; +0x101, 0x14027ed41\nmovss   xmm1, [rsp+58h+arg_0]                                          ; +0x103, 0x14027ed43\naddss   xmm1, cs:flt_14062307C                                         ; +0x109, 0x14027ed49\ndivss   xmm1, xmm7                                                     ; +0x111, 0x14027ed51\ndivss   xmm1, dword ptr [rcx+1B0h]                                     ; +0x115, 0x14027ed55\njmp     short loc_14027ED66                                            ; +0x11d, 0x14027ed5d\ndivss   xmm6, xmm7                                                     ; +0x11f, 0x14027ed5f\nmovaps  xmm1, xmm6                                                     ; +0x123, 0x14027ed63\ncall    qword ptr [rax+78h]                                            ; +0x126, 0x14027ed66\nmov     rcx, [rdi+1B0h]                                                ; +0x129, 0x14027ed69\nmov     rbx, [rcx]                                                     ; +0x130, 0x14027ed70\ncall    qword ptr [rbx+0C8h]                                           ; +0x133, 0x14027ed73\nmovss   xmm1, dword ptr [rdi+1C4h]                                     ; +0x139, 0x14027ed79\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x141, 0x14027ed81\nmulss   xmm1, cs:dword_140622B08                                       ; +0x146, 0x14027ed86\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x14e, 0x14027ed8e\nsubss   xmm1, cs:flt_140623010                                         ; +0x153, 0x14027ed93\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x15b, 0x14027ed9b\nmov     rcx, [rdi+1B0h]                                                ; +0x161, 0x14027eda1\nmov     rdx, rax                                                       ; +0x168, 0x14027eda8\ncall    qword ptr [rbx+0B8h]                                           ; +0x16b, 0x14027edab\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x171, 0x14027edb1\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x176, 0x14027edb6\nmovss   xmm6, dword ptr [rdi+1C4h]                                     ; +0x17b, 0x14027edbb\nmov     rcx, rdi                                                       ; +0x183, 0x14027edc3\nsubss   xmm6, xmm8                                                     ; +0x186, 0x14027edc6\ncall    GJGroundLayer__updateShadows                                   ; +0x18b, 0x14027edcb\nmovaps  xmm8, [rsp+58h+var_38]                                         ; +0x190, 0x14027edd0\nmovaps  xmm0, xmm6                                                     ; +0x196, 0x14027edd6\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x199, 0x14027edd9\nadd     rsp, 50h                                                       ; +0x19e, 0x14027edde\npop     rdi                                                            ; +0x1a2, 0x14027ede2\nretn                                                                   ; +0x1a3, 0x14027ede3", "xrefs": ["GJBaseGameLayer::preUpdateVisibility @ 0x140236598", "GJBaseGameLayer::preUpdateVisibility @ 0x1402365b7", "GJBaseGameLayer::resetLevelVariables @ 0x14023b6e1", "GJBaseGameLayer::resetLevelVariables @ 0x14023b700", "GJBaseGameLayer::updateCameraBGArt @ 0x14023ea94", "GJBaseGameLayer::updateCameraBGArt @ 0x14023eaab", "<???> @ 0x1406879ac", "<???> @ 0x1406879bc", "<???> @ 0x1406d125c"], "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"}