{"type": "func", "start": 5369927056, "end": 5369927332, "name": "GJRotationControl::init", "pseudocode": "// \n// GJRotationControl::init from 0x140129590 to 0x1401296a4 (276 bytes)\n// \n// 4 xrefs:\n// > EditorUI::init @ 0x1400df654\n// > EditorUI::init @ 0x1400df645\n// > <???> @ 0x140553a80\n// > <???> @ 0x1406c9a2c\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\nbool GJRotationControl::init(GJRotationControl *a1)\n{\n  bool result; // al\n  _BOOL8 v3; // rdx\n  __int64 v4; // rax\n  cocos2d::CCSprite *v5; // rax\n  GJRotationControl_vtbl *v6; // r9\n  float v7; // xmm7_4\n  float v8; // xmm0_4\n  __int64 v9; // rax\n  cocos2d::CCPoint v10; // [rsp+48h] [rbp+10h] BYREF\n\n  result = cocos2d::CCLayer::init(a1);\n  if ( result )\n  {\n    LOBYTE(v3) = 1;\n    a1->setTouchEnabled(a1, v3);\n    cocos2d::CCPoint::CCPoint(&v10, 60.0, 0.0);\n    cocos2d::CCPoint::operator=(&a1->m_controlPosition, v4);\n    a1->setAnchorPoint(a1, (const cocos2d::CCPoint *)&dword_1406C1AA8);\n    v5 = cocos2d::CCSprite::createWithSpriteFrameName(\"GJ_rotationControlBtn01_001.png\");\n    v6 = a1->cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    a1->m_controlSprite = v5;\n    v6->addChild_0(a1, v5, 1);\n    *(_QWORD *)&a1->m_startingRotation = 0;\n    v7 = sinf(-0.0) * 60.0;\n    v8 = cosf(-0.0) * 60.0;\n    cocos2d::CCPoint::CCPoint(&v10, v8, v7);\n    cocos2d::CCPoint::operator=(&a1->m_controlPosition, v9);\n    a1->m_controlSprite->setPosition_0(a1->m_controlSprite, &a1->m_controlPosition);\n    return 1;\n  }\n  return result;\n}", "assembly": "; \n; GJRotationControl::init from 0x140129590 to 0x1401296a4 (276 bytes)\n; \n; 4 xrefs:\n; > EditorUI::init @ 0x1400df654\n; > EditorUI::init @ 0x1400df645\n; > <???> @ 0x140553a80\n; > <???> @ 0x1406c9a2c\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, 0x140129590\nsub     rsp, 30h                                                       ; +0x2, 0x140129592\nmov     rdi, rcx                                                       ; +0x6, 0x140129596\ncall    cs:__imp_?init@CCLayer@cocos2d@@UEAA_NXZ; cocos2d::CCLayer::init(void) ; +0x9, 0x140129599\ntest    al, al                                                         ; +0xf, 0x14012959f\njnz     short loc_1401295A9                                            ; +0x11, 0x1401295a1\nadd     rsp, 30h                                                       ; +0x13, 0x1401295a3\npop     rdi                                                            ; +0x17, 0x1401295a7\nretn                                                                   ; +0x18, 0x1401295a8\nmov     rax, [rdi]                                                     ; +0x19, 0x1401295a9\nmov     dl, 1                                                          ; +0x1c, 0x1401295ac\nmov     [rsp+38h+arg_0], rbx                                           ; +0x1e, 0x1401295ae\nmov     rcx, rdi                                                       ; +0x23, 0x1401295b3\nmovaps  [rsp+38h+var_18], xmm7                                         ; +0x26, 0x1401295b6\ncall    qword ptr [rax+388h]                                           ; +0x2b, 0x1401295bb\nmovss   xmm1, cs:dword_140623210                                       ; +0x31, 0x1401295c1\nlea     rcx, [rsp+38h+arg_8]                                           ; +0x39, 0x1401295c9\nxorps   xmm2, xmm2                                                     ; +0x3e, 0x1401295ce\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x41, 0x1401295d1\nmov     rdx, rax                                                       ; +0x47, 0x1401295d7\nlea     rcx, [rdi+1A0h]                                                ; +0x4a, 0x1401295da\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x51, 0x1401295e1\nmov     rax, [rdi]                                                     ; +0x57, 0x1401295e7\nlea     rdx, dword_1406C1AA8                                           ; +0x5a, 0x1401295ea\nmov     rcx, rdi                                                       ; +0x61, 0x1401295f1\ncall    qword ptr [rax+110h]                                           ; +0x64, 0x1401295f4\nlea     rcx, aGjRotationcont; \"GJ_rotationControlBtn01_001.png\"        ; +0x6a, 0x1401295fa\ncall    cs:?createWithSpriteFrameName@CCSprite@cocos2d@@SAPEAV12@PEBD@Z; cocos2d::CCSprite::createWithSpriteFrameName(char const *) ; +0x71, 0x140129601\nmov     r9, [rdi]                                                      ; +0x77, 0x140129607\nmov     r8d, 1                                                         ; +0x7a, 0x14012960a\nmov     rdx, rax                                                       ; +0x80, 0x140129610\nmov     [rdi+1A8h], rax                                                ; +0x83, 0x140129613\nmov     rcx, rdi                                                       ; +0x8a, 0x14012961a\ncall    qword ptr [r9+1B8h]                                            ; +0x8d, 0x14012961d\nmovss   xmm0, cs:flt_1406236A8; X                                      ; +0x94, 0x140129624\nxor     eax, eax                                                       ; +0x9c, 0x14012962c\nmov     [rdi+1B0h], rax                                                ; +0x9e, 0x14012962e\ncall    sinf                                                           ; +0xa5, 0x140129635\nmovaps  xmm7, xmm0                                                     ; +0xaa, 0x14012963a\nmovss   xmm0, cs:flt_1406236A8; X                                      ; +0xad, 0x14012963d\nmulss   xmm7, cs:dword_140623210                                       ; +0xb5, 0x140129645\ncall    cosf                                                           ; +0xbd, 0x14012964d\nmulss   xmm0, cs:dword_140623210                                       ; +0xc2, 0x140129652\nlea     rcx, [rsp+38h+arg_8]                                           ; +0xca, 0x14012965a\nmovaps  xmm2, xmm7                                                     ; +0xcf, 0x14012965f\nmovaps  xmm1, xmm0                                                     ; +0xd2, 0x140129662\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0xd5, 0x140129665\nmov     rdx, rax                                                       ; +0xdb, 0x14012966b\nlea     rcx, [rdi+1A0h]                                                ; +0xde, 0x14012966e\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0xe5, 0x140129675\nmov     rcx, [rdi+1A8h]                                                ; +0xeb, 0x14012967b\nlea     rdx, [rdi+1A0h]                                                ; +0xf2, 0x140129682\nmov     rax, [rcx]                                                     ; +0xf9, 0x140129689\ncall    qword ptr [rax+0B8h]                                           ; +0xfc, 0x14012968c\nmovaps  xmm7, [rsp+38h+var_18]                                         ; +0x102, 0x140129692\nmov     al, 1                                                          ; +0x107, 0x140129697\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x109, 0x140129699\nadd     rsp, 30h                                                       ; +0x10e, 0x14012969e\npop     rdi                                                            ; +0x112, 0x1401296a2\nretn                                                                   ; +0x113, 0x1401296a3", "xrefs": ["EditorUI::init @ 0x1400df654", "EditorUI::init @ 0x1400df645", "<???> @ 0x140553a80", "<???> @ 0x1406c9a2c"], "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"}