{"type": "func", "start": 5370445968, "end": 5370446499, "name": "GJTransformControl::applyFreeRotation", "pseudocode": "// \n// GJTransformControl::applyFreeRotation from 0x1401a8090 to 0x1401a82a3 (531 bytes)\n// \n// 5 xrefs:\n// > GJTransformControl::ccTouchEnded @ 0x1401a7dff\n// > GJTransformControl::applyRotation @ 0x1401a8037\n// > <???> @ 0x1408a0dac\n// > <???> @ 0x1408a0dbc\n// > <???> @ 0x140919c4c\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:27:51 +0000\n// \n\ndouble __fastcall GJTransformControl::applyFreeRotation(__int64 a1, float a2)\n{\n  cocos2d::CCArray *v3; // rcx\n  __int64 v4; // rdi\n  __int64 TransformState; // rax\n  __int64 v6; // rcx\n  __int64 v7; // rsi\n  __int64 v8; // rbx\n  int v9; // eax\n  int v10; // r9d\n  __int64 v11; // rcx\n  struct cocos2d::CCObject *v12; // rax\n  __int64 v13; // rax\n  struct cocos2d::CCObject *v14; // rax\n  __int64 v15; // rax\n  double result; // xmm0_8\n  char v17; // [rsp+90h] [rbp+8h] BYREF\n\n  if ( *(_QWORD *)(a1 + 440) )\n  {\n    v3 = *(cocos2d::CCArray **)(a1 + 424);\n    if ( v3 )\n    {\n      if ( cocos2d::CCArray::count(v3) )\n      {\n        v4 = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 440) + 120LL))(*(_QWORD *)(a1 + 440));\n        TransformState = EditorUI::getTransformState(v4);\n        v6 = *(_QWORD *)(a1 + 416);\n        *(_DWORD *)(a1 + 608) = 0;\n        v7 = TransformState;\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)v6 + 352LL))(v6);\n        *(_DWORD *)v7 = 1065353216;\n        *(_QWORD *)(v7 + 4) = 1065353216;\n        *(_QWORD *)(v7 + 12) = 0;\n        *(_DWORD *)(v7 + 20) = 0;\n        *(_QWORD *)(v7 + 32) = 0;\n        *(_QWORD *)(v7 + 40) = 0;\n        *(_DWORD *)(v7 + 64) = 1065353216;\n        *(_DWORD *)(v7 + 68) = 1065353216;\n        GJTransformControl::loadValues(a1, nullptr, *(cocos2d::CCArray **)(a1 + 424), v4 + 464);\n        v8 = *(_QWORD *)(a1 + 424);\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v17, (const struct cocos2d::CCPoint *)(v4 + 816));\n        EditorUI::transformObjects(v4, v8, v9, v10, 1065353216, -a2, -a2, 0, 0);\n        EditorUI::resetObjectEditorValues(v4, *(_QWORD *)(a1 + 424));\n        *(float *)(v7 + 8) = a2;\n        *(float *)(v7 + 12) = a2;\n        v11 = *(_QWORD *)(a1 + 416);\n        *(float *)(a1 + 608) = a2;\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)v11 + 352LL))(v11);\n        GJTransformControl::updateButtons(a1, 0, 0);\n        v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 512), 6u);\n        v13 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v12 + 200LL))(v12);\n        cocos2d::CCPoint::operator=(a1 + 456, v13);\n        v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 512), 7u);\n        v15 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v14 + 200LL))(v14);\n        return cocos2d::CCPoint::operator=(a1 + 464, v15);\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJTransformControl::applyFreeRotation from 0x1401a8090 to 0x1401a82a3 (531 bytes)\n; \n; 5 xrefs:\n; > GJTransformControl::ccTouchEnded @ 0x1401a7dff\n; > GJTransformControl::applyRotation @ 0x1401a8037\n; > <???> @ 0x1408a0dac\n; > <???> @ 0x1408a0dbc\n; > <???> @ 0x140919c4c\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:27:51 +0000\n; \npush    rbp                                                            ; +0x0, 0x1401a8090\nsub     rsp, 80h                                                       ; +0x2, 0x1401a8092\ncmp     qword ptr [rcx+1B8h], 0                                        ; +0x9, 0x1401a8099\nmov     rbp, rcx                                                       ; +0x11, 0x1401a80a1\nmovaps  [rsp+88h+var_38], xmm8                                         ; +0x14, 0x1401a80a4\nmovaps  xmm8, xmm1                                                     ; +0x1a, 0x1401a80aa\njz      loc_1401A8294                                                  ; +0x1e, 0x1401a80ae\nmov     rcx, [rcx+1A8h]                                                ; +0x24, 0x1401a80b4\ntest    rcx, rcx                                                       ; +0x2b, 0x1401a80bb\njz      loc_1401A8294                                                  ; +0x2e, 0x1401a80be\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x34, 0x1401a80c4\ntest    eax, eax                                                       ; +0x3a, 0x1401a80ca\njz      loc_1401A8294                                                  ; +0x3c, 0x1401a80cc\nmov     rcx, [rbp+1B8h]                                                ; +0x42, 0x1401a80d2\nmov     [rsp+88h+arg_8], rbx                                           ; +0x49, 0x1401a80d9\nmov     [rsp+88h+arg_10], rsi                                          ; +0x51, 0x1401a80e1\nmov     [rsp+88h+arg_18], rdi                                          ; +0x59, 0x1401a80e9\nmov     rax, [rcx]                                                     ; +0x61, 0x1401a80f1\nmovaps  [rsp+88h+var_18], xmm6                                         ; +0x64, 0x1401a80f4\nmovaps  [rsp+88h+var_28], xmm7                                         ; +0x69, 0x1401a80f9\ncall    qword ptr [rax+78h]                                            ; +0x6e, 0x1401a80fe\nmov     rcx, rax                                                       ; +0x71, 0x1401a8101\nmov     rdi, rax                                                       ; +0x74, 0x1401a8104\ncall    EditorUI__getTransformState                                    ; +0x77, 0x1401a8107\nmov     rcx, [rbp+1A0h]                                                ; +0x7c, 0x1401a810c\nxor     ebx, ebx                                                       ; +0x83, 0x1401a8113\nmov     [rbp+260h], ebx                                                ; +0x85, 0x1401a8115\nxorps   xmm1, xmm1                                                     ; +0x8b, 0x1401a811b\nmov     rsi, rax                                                       ; +0x8e, 0x1401a811e\nxorps   xmm7, xmm7                                                     ; +0x91, 0x1401a8121\nmov     rdx, [rcx]                                                     ; +0x94, 0x1401a8124\ncall    qword ptr [rdx+160h]                                           ; +0x97, 0x1401a8127\nmov     dword ptr [rsi], 3F800000h                                     ; +0x9d, 0x1401a812d\nlea     r9, [rdi+1D0h]                                                 ; +0xa3, 0x1401a8133\nmov     qword ptr [rsi+4], 3F800000h                                   ; +0xaa, 0x1401a813a\nxor     edx, edx                                                       ; +0xb2, 0x1401a8142\nmov     [rsi+0Ch], rbx                                                 ; +0xb4, 0x1401a8144\nmov     rcx, rbp                                                       ; +0xb8, 0x1401a8148\nmov     [rsi+14h], ebx                                                 ; +0xbb, 0x1401a814b\nmov     [rsi+20h], rbx                                                 ; +0xbe, 0x1401a814e\nmov     [rsi+28h], rbx                                                 ; +0xc2, 0x1401a8152\nmov     dword ptr [rsi+40h], 3F800000h                                 ; +0xc6, 0x1401a8156\nmov     dword ptr [rsi+44h], 3F800000h                                 ; +0xcd, 0x1401a815d\nmov     r8, [rbp+1A8h]                                                 ; +0xd4, 0x1401a8164\ncall    GJTransformControl__loadValues                                 ; +0xdb, 0x1401a816b\nmov     rbx, [rbp+1A8h]                                                ; +0xe0, 0x1401a8170\nlea     rdx, [rdi+330h]                                                ; +0xe7, 0x1401a8177\nmovaps  xmm6, xmm8                                                     ; +0xee, 0x1401a817e\nlea     rcx, [rsp+88h+arg_0]                                           ; +0xf2, 0x1401a8182\nxorps   xmm6, cs:xmmword_140836CC0                                     ; +0xfa, 0x1401a818a\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x101, 0x1401a8191\nmovss   xmm3, cs:flt_140835080                                         ; +0x107, 0x1401a8197\nmov     rdx, rbx                                                       ; +0x10f, 0x1401a819f\nmovss   [rsp+88h+var_48], xmm7                                         ; +0x112, 0x1401a81a2\nmov     r8, rax                                                        ; +0x118, 0x1401a81a8\nmovss   [rsp+88h+var_50], xmm7                                         ; +0x11b, 0x1401a81ab\nmov     rcx, rdi                                                       ; +0x121, 0x1401a81b1\nmovss   [rsp+88h+var_58], xmm6                                         ; +0x124, 0x1401a81b4\nmovss   [rsp+88h+var_60], xmm6                                         ; +0x12a, 0x1401a81ba\nmovss   [rsp+88h+var_68], xmm3                                         ; +0x130, 0x1401a81c0\ncall    EditorUI__transformObjects                                     ; +0x136, 0x1401a81c6\nmov     rdx, [rbp+1A8h]                                                ; +0x13b, 0x1401a81cb\nmov     rcx, rdi                                                       ; +0x142, 0x1401a81d2\ncall    EditorUI__resetObjectEditorValues                              ; +0x145, 0x1401a81d5\nmovss   dword ptr [rsi+8], xmm8                                        ; +0x14a, 0x1401a81da\nmovaps  xmm1, xmm8                                                     ; +0x150, 0x1401a81e0\nmovss   dword ptr [rsi+0Ch], xmm8                                      ; +0x154, 0x1401a81e4\nmov     rcx, [rbp+1A0h]                                                ; +0x15a, 0x1401a81ea\nmovss   dword ptr [rbp+260h], xmm8                                     ; +0x161, 0x1401a81f1\nmov     rax, [rcx]                                                     ; +0x16a, 0x1401a81fa\ncall    qword ptr [rax+160h]                                           ; +0x16d, 0x1401a81fd\nxor     r8d, r8d                                                       ; +0x173, 0x1401a8203\nxor     edx, edx                                                       ; +0x176, 0x1401a8206\nmov     rcx, rbp                                                       ; +0x178, 0x1401a8208\ncall    GJTransformControl__updateButtons                              ; +0x17b, 0x1401a820b\nmov     rcx, [rbp+200h]                                                ; +0x180, 0x1401a8210\nmov     edx, 6                                                         ; +0x187, 0x1401a8217\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x18c, 0x1401a821c\nmov     rcx, [rax]                                                     ; +0x192, 0x1401a8222\nmov     rdx, [rcx+0C8h]                                                ; +0x195, 0x1401a8225\nmov     rcx, rax                                                       ; +0x19c, 0x1401a822c\ncall    rdx                                                            ; +0x19f, 0x1401a822f\nmov     rdx, rax                                                       ; +0x1a1, 0x1401a8231\nlea     rcx, [rbp+1C8h]                                                ; +0x1a4, 0x1401a8234\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x1ab, 0x1401a823b\nmov     rcx, [rbp+200h]                                                ; +0x1b1, 0x1401a8241\nmov     edx, 7                                                         ; +0x1b8, 0x1401a8248\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x1bd, 0x1401a824d\nmov     rcx, [rax]                                                     ; +0x1c3, 0x1401a8253\nmov     rdx, [rcx+0C8h]                                                ; +0x1c6, 0x1401a8256\nmov     rcx, rax                                                       ; +0x1cd, 0x1401a825d\ncall    rdx                                                            ; +0x1d0, 0x1401a8260\nmov     rdx, rax                                                       ; +0x1d2, 0x1401a8262\nlea     rcx, [rbp+1D0h]                                                ; +0x1d5, 0x1401a8265\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x1dc, 0x1401a826c\nmovaps  xmm7, [rsp+88h+var_28]                                         ; +0x1e2, 0x1401a8272\nmovaps  xmm6, [rsp+88h+var_18]                                         ; +0x1e7, 0x1401a8277\nmov     rdi, [rsp+88h+arg_18]                                          ; +0x1ec, 0x1401a827c\nmov     rsi, [rsp+88h+arg_10]                                          ; +0x1f4, 0x1401a8284\nmov     rbx, [rsp+88h+arg_8]                                           ; +0x1fc, 0x1401a828c\nmovaps  xmm8, [rsp+88h+var_38]                                         ; +0x204, 0x1401a8294\nadd     rsp, 80h                                                       ; +0x20a, 0x1401a829a\npop     rbp                                                            ; +0x211, 0x1401a82a1\nretn                                                                   ; +0x212, 0x1401a82a2", "xrefs": ["GJTransformControl::ccTouchEnded @ 0x1401a7dff", "GJTransformControl::applyRotation @ 0x1401a8037", "<???> @ 0x1408a0dac", "<???> @ 0x1408a0dbc", "<???> @ 0x140919c4c"], "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"}