{"type": "func", "start": 5371325008, "end": 5371325493, "name": "GJGroundLayer::createLine", "pseudocode": "// \n// GJGroundLayer::createLine from 0x14027ea50 to 0x14027ec35 (485 bytes)\n// \n// 2 xrefs:\n// > GJGroundLayer::init @ 0x14027e300\n// > <???> @ 0x1406d1250\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\nvoid GJGroundLayer::createLine(GJGroundLayer *a1, int a2)\n{\n  cocos2d::CCSprite *m_lineSprite; // rcx\n  int v4; // esi\n  int v6; // eax\n  cocos2d::CCDirector *v7; // rax\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rax\n  cocos2d::CCSprite *v10; // rax\n  GJGroundLayer_vtbl *v11; // r9\n  float v12; // xmm0_4\n  cocos2d::CCSprite_vtbl *v13; // rbx\n  __int64 v14; // rax\n  float v15; // xmm0_4\n  cocos2d::CCSprite_vtbl *v16; // rbx\n  const cocos2d::CCPoint *v17; // rax\n  float v18; // [rsp+50h] [rbp+18h]\n\n  m_lineSprite = a1->m_lineSprite;\n  v4 = 0;\n  if ( m_lineSprite )\n  {\n    m_lineSprite->removeFromParent(m_lineSprite);\n    a1->m_lineSprite = nullptr;\n  }\n  v6 = 1;\n  if ( a2 >= 1 )\n    v6 = a2;\n  if ( v6 >= 3 )\n    a1->m_lineType = 3;\n  else\n    a1->m_lineType = v6;\n  v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(m_lineSprite);\n  cocos2d::CCDirector::getWinSize(v7);\n  LOBYTE(v4) = a1->m_lineType != 1;\n  v8 = cocos2d::CCString::createWithFormat(\"floorLine_%02d_001.png\", v4 + 1);\n  CString = cocos2d::CCString::getCString(v8);\n  v10 = cocos2d::CCSprite::createWithSpriteFrameName(CString);\n  v11 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n  a1->m_lineSprite = v10;\n  v12 = ((float (__fastcall *)(GJGroundLayer *, cocos2d::CCSprite *, __int64))v11->addChild_0)(a1, v10, 5);\n  v13 = a1->m_lineSprite->__vftable;\n  cocos2d::CCPoint::CCPoint(v12, v18 * 0.5);\n  v15 = ((float (__fastcall *)(cocos2d::CCSprite *, __int64))v13->setPosition_0)(a1->m_lineSprite, v14);\n  v16 = a1->m_lineSprite->__vftable;\n  cocos2d::CCPoint::CCPoint(v15, 0.5);\n  v16->setAnchorPoint(a1->m_lineSprite, v17);\n  a1->m_lineSprite->setTag(a1->m_lineSprite, 2);\n  if ( a1->m_blendLine )\n    ((void (__fastcall *)(cocos2d::CCTextureProtocol *, __int64))a1->m_lineSprite->setBlendFunc)(\n      &a1->m_lineSprite->cocos2d::CCTextureProtocol,\n      0x100000302LL);\n  if ( a1->m_lineType > 1 )\n    ((void (*)(void))a1->m_lineSprite->setScaleX)();\n  if ( a1->m_lineType == 3 )\n    ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_lineSprite->setScaleY)(a1->m_lineSprite);\n}", "assembly": "; \n; GJGroundLayer::createLine from 0x14027ea50 to 0x14027ec35 (485 bytes)\n; \n; 2 xrefs:\n; > GJGroundLayer::init @ 0x14027e300\n; > <???> @ 0x1406d1250\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x14027ea50\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x14027ea55\npush    rdi                                                            ; +0xa, 0x14027ea5a\nsub     rsp, 30h                                                       ; +0xb, 0x14027ea5b\nmov     rdi, rcx                                                       ; +0xf, 0x14027ea5f\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x12, 0x14027ea62\nmov     rcx, [rcx+1B0h]                                                ; +0x17, 0x14027ea67\nxor     esi, esi                                                       ; +0x1e, 0x14027ea6e\nmov     ebx, edx                                                       ; +0x20, 0x14027ea70\ntest    rcx, rcx                                                       ; +0x22, 0x14027ea72\njz      short loc_14027EA87                                            ; +0x25, 0x14027ea75\nmov     rax, [rcx]                                                     ; +0x27, 0x14027ea77\ncall    qword ptr [rax+1F0h]                                           ; +0x2a, 0x14027ea7a\nmov     [rdi+1B0h], rsi                                                ; +0x30, 0x14027ea80\nmov     eax, 1                                                         ; +0x37, 0x14027ea87\ncmp     ebx, eax                                                       ; +0x3c, 0x14027ea8c\ncmovge  eax, ebx                                                       ; +0x3e, 0x14027ea8e\ncmp     eax, 3                                                         ; +0x41, 0x14027ea91\njge     short loc_14027EAB5                                            ; +0x44, 0x14027ea94\nmov     [rdi+1C0h], eax                                                ; +0x46, 0x14027ea96\nxorps   xmm6, xmm6                                                     ; +0x4c, 0x14027ea9c\ncmp     eax, 1                                                         ; +0x4f, 0x14027ea9f\njnz     short loc_14027EAAE                                            ; +0x52, 0x14027eaa2\nmovss   xmm6, cs:dword_140622B08                                       ; +0x54, 0x14027eaa4\njmp     short loc_14027EAC7                                            ; +0x5c, 0x14027eaac\ncmp     eax, 2                                                         ; +0x5e, 0x14027eaae\njz      short loc_14027EABF                                            ; +0x61, 0x14027eab1\njmp     short loc_14027EAC7                                            ; +0x63, 0x14027eab3\nmov     dword ptr [rdi+1C0h], 3                                        ; +0x65, 0x14027eab5\nmovss   xmm6, cs:dword_140622A74                                       ; +0x6f, 0x14027eabf\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x77, 0x14027eac7\nmov     rcx, rax                                                       ; +0x7d, 0x14027eacd\nlea     rdx, [rsp+38h+arg_10]                                          ; +0x80, 0x14027ead0\ncall    cs:?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x85, 0x14027ead5\ncmp     dword ptr [rdi+1C0h], 1                                        ; +0x8b, 0x14027eadb\nlea     rcx, aFloorline02d00; \"floorLine_%02d_001.png\"                 ; +0x92, 0x14027eae2\nsetnz   sil                                                            ; +0x99, 0x14027eae9\nlea     edx, [rsi+1]                                                   ; +0x9d, 0x14027eaed\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0xa0, 0x14027eaf0\nmov     rcx, rax                                                       ; +0xa6, 0x14027eaf6\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0xa9, 0x14027eaf9\nmov     rcx, rax                                                       ; +0xaf, 0x14027eaff\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0xb2, 0x14027eb02\nmov     r9, [rdi]                                                      ; +0xb8, 0x14027eb08\nmov     r8d, 5                                                         ; +0xbb, 0x14027eb0b\nmov     rdx, rax                                                       ; +0xc1, 0x14027eb11\nmov     [rdi+1B0h], rax                                                ; +0xc4, 0x14027eb14\nmov     rcx, rdi                                                       ; +0xcb, 0x14027eb1b\ncall    qword ptr [r9+1B8h]                                            ; +0xce, 0x14027eb1e\nmovss   xmm1, [rsp+38h+arg_10]                                         ; +0xd5, 0x14027eb25\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xdb, 0x14027eb2b\nmov     rax, [rdi+1B0h]                                                ; +0xe0, 0x14027eb30\nmovaps  xmm2, xmm6                                                     ; +0xe7, 0x14027eb37\nmulss   xmm1, cs:dword_140622B08                                       ; +0xea, 0x14027eb3a\nmov     rbx, [rax]                                                     ; +0xf2, 0x14027eb42\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xf5, 0x14027eb45\nmov     rcx, [rdi+1B0h]                                                ; +0xfb, 0x14027eb4b\nmov     rdx, rax                                                       ; +0x102, 0x14027eb52\ncall    qword ptr [rbx+0B8h]                                           ; +0x105, 0x14027eb55\nmov     rax, [rdi+1B0h]                                                ; +0x10b, 0x14027eb5b\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x112, 0x14027eb62\nmovss   xmm2, cs:flt_140622C24                                         ; +0x117, 0x14027eb67\nmovss   xmm1, cs:dword_140622B08                                       ; +0x11f, 0x14027eb6f\nmov     rbx, [rax]                                                     ; +0x127, 0x14027eb77\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x12a, 0x14027eb7a\nmov     rcx, [rdi+1B0h]                                                ; +0x130, 0x14027eb80\nmov     rdx, rax                                                       ; +0x137, 0x14027eb87\ncall    qword ptr [rbx+110h]                                           ; +0x13a, 0x14027eb8a\nmov     rcx, [rdi+1B0h]                                                ; +0x140, 0x14027eb90\nmov     edx, 2                                                         ; +0x147, 0x14027eb97\nmov     rax, [rcx]                                                     ; +0x14c, 0x14027eb9c\ncall    qword ptr [rax+40h]                                            ; +0x14f, 0x14027eb9f\ncmp     byte ptr [rdi+1B9h], 0                                         ; +0x152, 0x14027eba2\njz      short loc_14027EBD3                                            ; +0x159, 0x14027eba9\nmov     rcx, [rdi+1B0h]                                                ; +0x15b, 0x14027ebab\nadd     rcx, 158h                                                      ; +0x162, 0x14027ebb2\nmov     dword ptr [rsp+38h+arg_0], 302h                                ; +0x169, 0x14027ebb9\nmov     dword ptr [rsp+38h+arg_0+4], 1                                 ; +0x171, 0x14027ebc1\nmov     rdx, [rsp+38h+arg_0]                                           ; +0x179, 0x14027ebc9\nmov     rax, [rcx]                                                     ; +0x17e, 0x14027ebce\ncall    qword ptr [rax]                                                ; +0x181, 0x14027ebd1\ncmp     dword ptr [rdi+1C0h], 1                                        ; +0x183, 0x14027ebd3\njle     short loc_14027EBFF                                            ; +0x18a, 0x14027ebda\nmov     rcx, [rdi+1B0h]                                                ; +0x18c, 0x14027ebdc\nmovss   xmm1, [rsp+38h+arg_10]                                         ; +0x193, 0x14027ebe3\naddss   xmm1, cs:flt_14062307C                                         ; +0x199, 0x14027ebe9\nmov     rax, [rcx]                                                     ; +0x1a1, 0x14027ebf1\ndivss   xmm1, dword ptr [rcx+1B0h]                                     ; +0x1a4, 0x14027ebf4\ncall    qword ptr [rax+78h]                                            ; +0x1ac, 0x14027ebfc\ncmp     dword ptr [rdi+1C0h], 3                                        ; +0x1af, 0x14027ebff\njnz     short loc_14027EC20                                            ; +0x1b6, 0x14027ec06\nmov     rcx, [rdi+1B0h]                                                ; +0x1b8, 0x14027ec08\nmovss   xmm1, cs:width                                                 ; +0x1bf, 0x14027ec0f\nmov     rax, [rcx]                                                     ; +0x1c7, 0x14027ec17\ncall    qword ptr [rax+88h]                                            ; +0x1ca, 0x14027ec1a\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1d0, 0x14027ec20\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x1d5, 0x14027ec25\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x1da, 0x14027ec2a\nadd     rsp, 30h                                                       ; +0x1df, 0x14027ec2f\npop     rdi                                                            ; +0x1e3, 0x14027ec33\nretn                                                                   ; +0x1e4, 0x14027ec34", "xrefs": ["GJGroundLayer::init @ 0x14027e300", "<???> @ 0x1406d1250"], "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"}