{"type": "func", "start": 5372409792, "end": 5372410221, "name": "GJGroundLayer::scaleGround", "pseudocode": "// \n// GJGroundLayer::scaleGround from 0x1403877c0 to 0x14038796d (429 bytes)\n// \n// 10 xrefs:\n// > GJBaseGameLayer::preUpdateVisibility @ 0x14033f4c7\n// > GJBaseGameLayer::preUpdateVisibility @ 0x14033f4e5\n// > GJBaseGameLayer::resetLevelVariables @ 0x140345689\n// > GJBaseGameLayer::resetLevelVariables @ 0x1403456a7\n// > GJBaseGameLayer::updateCameraBGArt @ 0x1403489b5\n// > GJBaseGameLayer::updateCameraBGArt @ 0x1403489cc\n// > <???> @ 0x1408bd94c\n// > <???> @ 0x1408bd95c\n// > <???> @ 0x140922b68\n// > <???> @ 0x140922b74\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 11:31:08 +0000\n// \n\n__m128 __fastcall GJGroundLayer::scaleGround(__int64 a1)\n{\n  float v2; // xmm8_4\n  __int64 v3; // rcx\n  __int64 v4; // rax\n  double v5; // xmm0_8\n  int v6; // eax\n  int v7; // ebx\n  __int64 *v8; // rdi\n  __int64 v9; // rbx\n  __int64 v10; // rax\n  __int64 v11; // rax\n  __int128 v12; // xmm6\n  float v14; // [rsp+60h] [rbp+8h] BYREF\n  char v15; // [rsp+70h] [rbp+18h] BYREF\n\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 120LL))(a1);\n  (*(float (__fastcall **)(__int64))(*(_QWORD *)a1 + 144LL))(a1);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)a1 + 136LL))(a1);\n  v2 = *(float *)(a1 + 452);\n  if ( (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 504LL))(a1) )\n  {\n    v4 = cocos2d::CCDirector::sharedDirector(v3);\n    cocos2d::CCDirector::getWinSize(v4, &v14);\n    v5 = (*(double (__fastcall **)(__int64))(*(_QWORD *)a1 + 128LL))(a1);\n    *(float *)&v5 = (float)(v14 / *(float *)&v5) + 10.0;\n    *(_DWORD *)(a1 + 452) = LODWORD(v5);\n    v6 = (int)(float)(ceilf(*(float *)&v5 / *(float *)(a1 + 424)) + 1.0);\n    v7 = v6 + 1;\n    if ( !*(_BYTE *)(a1 + 464) )\n      v7 = v6;\n    GJGroundLayer::loadGroundSprites(a1, v7, 1u);\n    GJGroundLayer::loadGroundSprites(a1, v7, 0);\n    (*(void (**)(void))(**(_QWORD **)(a1 + 432) + 120LL))();\n    v8 = *(__int64 **)(a1 + 432);\n    v9 = *v8;\n    v10 = (*(__int64 (__fastcall **)(__int64 *))(*v8 + 200))(v8);\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v15, (float)(*(float *)(a1 + 452) * 0.5) - 5.0, *(float *)(v10 + 4));\n    (*(void (__fastcall **)(__int64 *, __int64))(v9 + 184))(v8, v11);\n  }\n  v12 = *(unsigned int *)(a1 + 452);\n  *(float *)&v12 = *(float *)&v12 - v2;\n  GJGroundLayer::updateShadows(a1);\n  return (__m128)v12;\n}", "assembly": "; \n; GJGroundLayer::scaleGround from 0x1403877c0 to 0x14038796d (429 bytes)\n; \n; 10 xrefs:\n; > GJBaseGameLayer::preUpdateVisibility @ 0x14033f4c7\n; > GJBaseGameLayer::preUpdateVisibility @ 0x14033f4e5\n; > GJBaseGameLayer::resetLevelVariables @ 0x140345689\n; > GJBaseGameLayer::resetLevelVariables @ 0x1403456a7\n; > GJBaseGameLayer::updateCameraBGArt @ 0x1403489b5\n; > GJBaseGameLayer::updateCameraBGArt @ 0x1403489cc\n; > <???> @ 0x1408bd94c\n; > <???> @ 0x1408bd95c\n; > <???> @ 0x140922b68\n; > <???> @ 0x140922b74\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 11:31:08 +0000\n; \npush    rsi                                                            ; +0x0, 0x1403877c0\nsub     rsp, 50h                                                       ; +0x2, 0x1403877c2\nmov     rax, [rcx]                                                     ; +0x6, 0x1403877c6\nmov     rsi, rcx                                                       ; +0x9, 0x1403877c9\nmovaps  [rsp+58h+var_18], xmm6                                         ; +0xc, 0x1403877cc\nmovaps  xmm6, xmm1                                                     ; +0x11, 0x1403877d1\nmovaps  [rsp+58h+var_38], xmm8                                         ; +0x14, 0x1403877d4\ncall    qword ptr [rax+78h]                                            ; +0x1a, 0x1403877da\nmov     rax, [rsi]                                                     ; +0x1d, 0x1403877dd\nmov     rcx, rsi                                                       ; +0x20, 0x1403877e0\ncall    qword ptr [rax+90h]                                            ; +0x23, 0x1403877e3\nxorps   xmm2, xmm2                                                     ; +0x29, 0x1403877e9\ncomiss  xmm2, xmm0                                                     ; +0x2c, 0x1403877ec\njbe     short loc_1403877F8                                            ; +0x2f, 0x1403877ef\nxorps   xmm6, cs:xmmword_140836CC0                                     ; +0x31, 0x1403877f1\nmov     rax, [rsi]                                                     ; +0x38, 0x1403877f8\nmovaps  xmm1, xmm6                                                     ; +0x3b, 0x1403877fb\nmov     rcx, rsi                                                       ; +0x3e, 0x1403877fe\ncall    qword ptr [rax+88h]                                            ; +0x41, 0x140387801\nmov     rax, [rsi]                                                     ; +0x47, 0x140387807\nmov     rcx, rsi                                                       ; +0x4a, 0x14038780a\nmovss   xmm8, dword ptr [rsi+1C4h]                                     ; +0x4d, 0x14038780d\ncall    qword ptr [rax+1F8h]                                           ; +0x56, 0x140387816\ntest    rax, rax                                                       ; +0x5c, 0x14038781c\njz      loc_140387944                                                  ; +0x5f, 0x14038781f\nmov     [rsp+58h+arg_8], rbx                                           ; +0x65, 0x140387825\nmov     [rsp+58h+arg_18], rdi                                          ; +0x6a, 0x14038782a\nmovaps  [rsp+58h+var_28], xmm7                                         ; +0x6f, 0x14038782f\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x74, 0x140387834\nmov     rcx, rax                                                       ; +0x7a, 0x14038783a\nlea     rdx, [rsp+58h+arg_0]                                           ; +0x7d, 0x14038783d\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x82, 0x140387842\nmov     rax, [rsi]                                                     ; +0x88, 0x140387848\nmov     rcx, rsi                                                       ; +0x8b, 0x14038784b\ncall    qword ptr [rax+80h]                                            ; +0x8e, 0x14038784e\nmovaps  xmm7, xmm0                                                     ; +0x94, 0x140387854\nmovss   xmm0, [rsp+58h+arg_0]                                          ; +0x97, 0x140387857\ndivss   xmm0, xmm7                                                     ; +0x9d, 0x14038785d\naddss   xmm0, cs:flt_1408354EC                                         ; +0xa1, 0x140387861\nmovss   dword ptr [rsi+1C4h], xmm0                                     ; +0xa9, 0x140387869\ndivss   xmm0, dword ptr [rsi+1A8h]; X                                  ; +0xb1, 0x140387871\ncall    ceilf                                                          ; +0xb9, 0x140387879\ncmp     byte ptr [rsi+1D0h], 0                                         ; +0xbe, 0x14038787e\nmov     r8b, 1                                                         ; +0xc5, 0x140387885\nmovss   xmm6, cs:flt_140835080                                         ; +0xc8, 0x140387888\nmov     rcx, rsi                                                       ; +0xd0, 0x140387890\naddss   xmm0, xmm6                                                     ; +0xd3, 0x140387893\ncvttss2si eax, xmm0                                                    ; +0xd7, 0x140387897\nlea     ebx, [rax+1]                                                   ; +0xdb, 0x14038789b\ncmovz   ebx, eax                                                       ; +0xde, 0x14038789e\nmov     edx, ebx                                                       ; +0xe1, 0x1403878a1\ncall    GJGroundLayer__loadGroundSprites                               ; +0xe3, 0x1403878a3\nxor     r8d, r8d                                                       ; +0xe8, 0x1403878a8\nmov     edx, ebx                                                       ; +0xeb, 0x1403878ab\nmov     rcx, rsi                                                       ; +0xed, 0x1403878ad\ncall    GJGroundLayer__loadGroundSprites                               ; +0xf0, 0x1403878b0\ncmp     dword ptr [rsi+1C0h], 1                                        ; +0xf5, 0x1403878b5\nmov     rcx, [rsi+1B0h]                                                ; +0xfc, 0x1403878bc\nmov     rax, [rcx]                                                     ; +0x103, 0x1403878c3\njle     short loc_1403878E4                                            ; +0x106, 0x1403878c6\nmovss   xmm1, [rsp+58h+arg_0]                                          ; +0x108, 0x1403878c8\naddss   xmm1, cs:flt_1408354EC                                         ; +0x10e, 0x1403878ce\ndivss   xmm1, xmm7                                                     ; +0x116, 0x1403878d6\ndivss   xmm1, dword ptr [rcx+1B0h]                                     ; +0x11a, 0x1403878da\njmp     short loc_1403878EB                                            ; +0x122, 0x1403878e2\ndivss   xmm6, xmm7                                                     ; +0x124, 0x1403878e4\nmovaps  xmm1, xmm6                                                     ; +0x128, 0x1403878e8\ncall    qword ptr [rax+78h]                                            ; +0x12b, 0x1403878eb\nmov     rdi, [rsi+1B0h]                                                ; +0x12e, 0x1403878ee\nmov     rcx, rdi                                                       ; +0x135, 0x1403878f5\nmov     rbx, [rdi]                                                     ; +0x138, 0x1403878f8\ncall    qword ptr [rbx+0C8h]                                           ; +0x13b, 0x1403878fb\nmovss   xmm1, dword ptr [rsi+1C4h]                                     ; +0x141, 0x140387901\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x149, 0x140387909\nmulss   xmm1, cs:dword_140834F20                                       ; +0x14e, 0x14038790e\nmovss   xmm2, dword ptr [rax+4]                                        ; +0x156, 0x140387916\nsubss   xmm1, cs:flt_140835470                                         ; +0x15b, 0x14038791b\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x163, 0x140387923\nmov     rdx, rax                                                       ; +0x169, 0x140387929\nmov     rcx, rdi                                                       ; +0x16c, 0x14038792c\ncall    qword ptr [rbx+0B8h]                                           ; +0x16f, 0x14038792f\nmovaps  xmm7, [rsp+58h+var_28]                                         ; +0x175, 0x140387935\nmov     rdi, [rsp+58h+arg_18]                                          ; +0x17a, 0x14038793a\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x17f, 0x14038793f\nmovss   xmm6, dword ptr [rsi+1C4h]                                     ; +0x184, 0x140387944\nmov     rcx, rsi                                                       ; +0x18c, 0x14038794c\nsubss   xmm6, xmm8                                                     ; +0x18f, 0x14038794f\ncall    GJGroundLayer__updateShadows                                   ; +0x194, 0x140387954\nmovaps  xmm8, [rsp+58h+var_38]                                         ; +0x199, 0x140387959\nmovaps  xmm0, xmm6                                                     ; +0x19f, 0x14038795f\nmovaps  xmm6, [rsp+58h+var_18]                                         ; +0x1a2, 0x140387962\nadd     rsp, 50h                                                       ; +0x1a7, 0x140387967\npop     rsi                                                            ; +0x1ab, 0x14038796b\nretn                                                                   ; +0x1ac, 0x14038796c", "xrefs": ["GJBaseGameLayer::preUpdateVisibility @ 0x14033f4c7", "GJBaseGameLayer::preUpdateVisibility @ 0x14033f4e5", "GJBaseGameLayer::resetLevelVariables @ 0x140345689", "GJBaseGameLayer::resetLevelVariables @ 0x1403456a7", "GJBaseGameLayer::updateCameraBGArt @ 0x1403489b5", "GJBaseGameLayer::updateCameraBGArt @ 0x1403489cc", "<???> @ 0x1408bd94c", "<???> @ 0x1408bd95c", "<???> @ 0x140922b68", "<???> @ 0x140922b74"], "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"}