{"type": "func", "start": 5372409312, "end": 5372409792, "name": "GJGroundLayer::createLine", "pseudocode": "// \n// GJGroundLayer::createLine from 0x1403875e0 to 0x1403877c0 (480 bytes)\n// \n// 2 xrefs:\n// > GJGroundLayer::init @ 0x140386e65\n// > <???> @ 0x140922b68\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__int64 __fastcall GJGroundLayer::createLine(__int64 *a1, int a2)\n{\n  __int64 v3; // rcx\n  int v4; // edi\n  int v6; // eax\n  float v7; // xmm6_4\n  __int64 v8; // rax\n  cocos2d::CCString *v9; // rax\n  const char *CString; // rax\n  struct cocos2d::CCSprite *v11; // rax\n  __int64 v12; // rcx\n  __int64 *v13; // rdi\n  __int64 v14; // rbx\n  __int64 v15; // rax\n  __int64 *v16; // rdi\n  __int64 v17; // rbx\n  __int64 v18; // rax\n  __int64 result; // rax\n  __int64 (__fastcall ***v20)(_QWORD, __int64); // rcx\n  __int64 v21; // [rsp+40h] [rbp+8h] BYREF\n  float v22; // [rsp+50h] [rbp+18h] BYREF\n\n  v3 = a1[54];\n  v4 = 0;\n  if ( v3 )\n  {\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v3 + 512LL))(v3);\n    a1[54] = 0;\n  }\n  v6 = 1;\n  if ( a2 >= 1 )\n    v6 = a2;\n  if ( v6 >= 3 )\n  {\n    *((_DWORD *)a1 + 112) = 3;\n  }\n  else\n  {\n    *((_DWORD *)a1 + 112) = v6;\n    if ( v6 == 1 )\n    {\n      v7 = 0.5;\n      goto LABEL_11;\n    }\n  }\n  v7 = 0.2;\nLABEL_11:\n  v8 = cocos2d::CCDirector::sharedDirector(v3);\n  cocos2d::CCDirector::getWinSize(v8, &v22);\n  LOBYTE(v4) = *((_DWORD *)a1 + 112) != 1;\n  v9 = cocos2d::CCString::createWithFormat(\"floorLine_%02d_001.png\", v4 + 1);\n  CString = cocos2d::CCString::getCString(v9);\n  v11 = cocos2d::CCSprite::createWithSpriteFrameName(CString);\n  v12 = *a1;\n  a1[54] = (__int64)v11;\n  (*(void (__fastcall **)(__int64 *, struct cocos2d::CCSprite *, __int64))(v12 + 456))(a1, v11, 5);\n  v13 = (__int64 *)a1[54];\n  v14 = *v13;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, v22 * 0.5, v7);\n  (*(void (__fastcall **)(__int64 *, __int64))(v14 + 184))(v13, v15);\n  v16 = (__int64 *)a1[54];\n  v17 = *v16;\n  cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, 0.5, 1.0);\n  (*(void (__fastcall **)(__int64 *, __int64))(v17 + 288))(v16, v18);\n  result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1[54] + 64LL))(a1[54], 2);\n  if ( *((_BYTE *)a1 + 441) )\n  {\n    v20 = (__int64 (__fastcall ***)(_QWORD, __int64))(a1[54] + 344);\n    v21 = 0x100000302LL;\n    result = (**v20)(v20, 0x100000302LL);\n  }\n  if ( *((int *)a1 + 112) > 1 )\n    result = (*(__int64 (**)(void))(*(_QWORD *)a1[54] + 120LL))();\n  if ( *((_DWORD *)a1 + 112) == 3 )\n    return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1[54] + 136LL))(a1[54]);\n  return result;\n}", "assembly": "; \n; GJGroundLayer::createLine from 0x1403875e0 to 0x1403877c0 (480 bytes)\n; \n; 2 xrefs:\n; > GJGroundLayer::init @ 0x140386e65\n; > <???> @ 0x140922b68\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; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1403875e0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1403875e5\npush    rdi                                                            ; +0xa, 0x1403875ea\nsub     rsp, 30h                                                       ; +0xb, 0x1403875eb\nmov     rsi, rcx                                                       ; +0xf, 0x1403875ef\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x12, 0x1403875f2\nmov     rcx, [rcx+1B0h]                                                ; +0x17, 0x1403875f7\nxor     edi, edi                                                       ; +0x1e, 0x1403875fe\nmov     ebx, edx                                                       ; +0x20, 0x140387600\ntest    rcx, rcx                                                       ; +0x22, 0x140387602\njz      short loc_140387617                                            ; +0x25, 0x140387605\nmov     rax, [rcx]                                                     ; +0x27, 0x140387607\ncall    qword ptr [rax+200h]                                           ; +0x2a, 0x14038760a\nmov     [rsi+1B0h], rdi                                                ; +0x30, 0x140387610\nmov     eax, 1                                                         ; +0x37, 0x140387617\ncmp     ebx, eax                                                       ; +0x3c, 0x14038761c\ncmovge  eax, ebx                                                       ; +0x3e, 0x14038761e\ncmp     eax, 3                                                         ; +0x41, 0x140387621\njge     short loc_140387645                                            ; +0x44, 0x140387624\nmov     [rsi+1C0h], eax                                                ; +0x46, 0x140387626\nxorps   xmm6, xmm6                                                     ; +0x4c, 0x14038762c\ncmp     eax, 1                                                         ; +0x4f, 0x14038762f\njnz     short loc_14038763E                                            ; +0x52, 0x140387632\nmovss   xmm6, cs:dword_140834F20                                       ; +0x54, 0x140387634\njmp     short loc_140387657                                            ; +0x5c, 0x14038763c\ncmp     eax, 2                                                         ; +0x5e, 0x14038763e\njz      short loc_14038764F                                            ; +0x61, 0x140387641\njmp     short loc_140387657                                            ; +0x63, 0x140387643\nmov     dword ptr [rsi+1C0h], 3                                        ; +0x65, 0x140387645\nmovss   xmm6, cs:dword_140834E64                                       ; +0x6f, 0x14038764f\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x77, 0x140387657\nmov     rcx, rax                                                       ; +0x7d, 0x14038765d\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x80, 0x140387660\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x85, 0x140387665\ncmp     dword ptr [rsi+1C0h], 1                                        ; +0x8b, 0x14038766b\nlea     rcx, aFloorline02d00; \"floorLine_%02d_001.png\"                 ; +0x92, 0x140387672\nsetnz   dil                                                            ; +0x99, 0x140387679\nlea     edx, [rdi+1]                                                   ; +0x9d, 0x14038767d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xa0, 0x140387680\nmov     rcx, rax                                                       ; +0xa6, 0x140387686\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xa9, 0x140387689\nmov     rcx, rax                                                       ; +0xaf, 0x14038768f\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xb2, 0x140387692\nmov     rcx, [rsi]                                                     ; +0xb8, 0x140387698\nmov     r8d, 5                                                         ; +0xbb, 0x14038769b\nmov     rdx, rax                                                       ; +0xc1, 0x1403876a1\nmov     [rsi+1B0h], rax                                                ; +0xc4, 0x1403876a4\nmov     r9, [rcx+1C8h]                                                 ; +0xcb, 0x1403876ab\nmov     rcx, rsi                                                       ; +0xd2, 0x1403876b2\ncall    r9                                                             ; +0xd5, 0x1403876b5\nmovss   xmm1, [rsp+38h+arg_10]                                         ; +0xd8, 0x1403876b8\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xde, 0x1403876be\nmov     rdi, [rsi+1B0h]                                                ; +0xe3, 0x1403876c3\nmovaps  xmm2, xmm6                                                     ; +0xea, 0x1403876ca\nmulss   xmm1, cs:dword_140834F20                                       ; +0xed, 0x1403876cd\nmov     rbx, [rdi]                                                     ; +0xf5, 0x1403876d5\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xf8, 0x1403876d8\nmov     rdx, rax                                                       ; +0xfe, 0x1403876de\nmov     rcx, rdi                                                       ; +0x101, 0x1403876e1\ncall    qword ptr [rbx+0B8h]                                           ; +0x104, 0x1403876e4\nmov     rdi, [rsi+1B0h]                                                ; +0x10a, 0x1403876ea\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x111, 0x1403876f1\nmovss   xmm2, cs:flt_140835080                                         ; +0x116, 0x1403876f6\nmovss   xmm1, cs:dword_140834F20                                       ; +0x11e, 0x1403876fe\nmov     rbx, [rdi]                                                     ; +0x126, 0x140387706\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x129, 0x140387709\nmov     rdx, rax                                                       ; +0x12f, 0x14038770f\nmov     rcx, rdi                                                       ; +0x132, 0x140387712\ncall    qword ptr [rbx+120h]                                           ; +0x135, 0x140387715\nmov     rcx, [rsi+1B0h]                                                ; +0x13b, 0x14038771b\nmov     edx, 2                                                         ; +0x142, 0x140387722\nmov     rax, [rcx]                                                     ; +0x147, 0x140387727\ncall    qword ptr [rax+40h]                                            ; +0x14a, 0x14038772a\ncmp     byte ptr [rsi+1B9h], 0                                         ; +0x14d, 0x14038772d\njz      short loc_14038775E                                            ; +0x154, 0x140387734\nmov     rcx, [rsi+1B0h]                                                ; +0x156, 0x140387736\nadd     rcx, 158h                                                      ; +0x15d, 0x14038773d\nmov     dword ptr [rsp+38h+arg_0], 302h                                ; +0x164, 0x140387744\nmov     dword ptr [rsp+38h+arg_0+4], 1                                 ; +0x16c, 0x14038774c\nmov     rdx, [rsp+38h+arg_0]                                           ; +0x174, 0x140387754\nmov     rax, [rcx]                                                     ; +0x179, 0x140387759\ncall    qword ptr [rax]                                                ; +0x17c, 0x14038775c\ncmp     dword ptr [rsi+1C0h], 1                                        ; +0x17e, 0x14038775e\njle     short loc_14038778A                                            ; +0x185, 0x140387765\nmov     rcx, [rsi+1B0h]                                                ; +0x187, 0x140387767\nmovss   xmm1, [rsp+38h+arg_10]                                         ; +0x18e, 0x14038776e\naddss   xmm1, cs:flt_1408354EC                                         ; +0x194, 0x140387774\nmov     rax, [rcx]                                                     ; +0x19c, 0x14038777c\ndivss   xmm1, dword ptr [rcx+1B0h]                                     ; +0x19f, 0x14038777f\ncall    qword ptr [rax+78h]                                            ; +0x1a7, 0x140387787\ncmp     dword ptr [rsi+1C0h], 3                                        ; +0x1aa, 0x14038778a\njnz     short loc_1403877AB                                            ; +0x1b1, 0x140387791\nmov     rcx, [rsi+1B0h]                                                ; +0x1b3, 0x140387793\nmovss   xmm1, cs:width                                                 ; +0x1ba, 0x14038779a\nmov     rax, [rcx]                                                     ; +0x1c2, 0x1403877a2\ncall    qword ptr [rax+88h]                                            ; +0x1c5, 0x1403877a5\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1cb, 0x1403877ab\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x1d0, 0x1403877b0\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x1d5, 0x1403877b5\nadd     rsp, 30h                                                       ; +0x1da, 0x1403877ba\npop     rdi                                                            ; +0x1de, 0x1403877be\nretn                                                                   ; +0x1df, 0x1403877bf", "xrefs": ["GJGroundLayer::init @ 0x140386e65", "<???> @ 0x140922b68"], "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"}