{"type": "func", "start": 4295301760, "end": 4295302008, "name": "GJRotationControl::updateSliderPosition", "pseudocode": "// \n// GJRotationControl::updateSliderPosition from 0x100051a80 to 0x100051b78 (248 bytes)\n// \n// 0 xrefs:\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 __fastcall GJRotationControl::updateSliderPosition(GJRotationControl *a1, cocos2d::CCPoint a2)\n{\n  __int64 v2; // rsi\n  __m128 v3; // xmm0\n  __m128 v4; // xmm2\n  __m128 v5; // xmm0\n  float v6; // xmm0_4\n  float m_currentRotation; // xmm1_4\n  GJRotationControlDelegate *m_delegate; // rdi\n  _BYTE v9[8]; // [rsp+8h] [rbp-38h] BYREF\n  __m128 v10; // [rsp+10h] [rbp-30h]\n\n  v3 = (__m128)*(unsigned int *)(v2 + 4);\n  v3.f32[0] = atan2f(v3.f32[0] - a1->m_cursorDifference.y, *(float *)v2 - a1->m_cursorDifference.x);\n  v10 = v3;\n  *(__float2 *)v3.f32 = __sincosf_stret(v3.f32[0]);\n  sub_10028CBE0(v9, (float)(_mm_movehdup_ps(v3).f32[0] * 60.0) + 0.0, (float)(60.0 * v3.f32[0]) + 0.0);\n  *(double *)v3.i64 = sub_10028CC90();\n  ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *, double))a1->m_controlSprite->setPosition)(\n    a1->m_controlSprite,\n    &a1->m_controlPosition,\n    *(double *)v3.i64);\n  v4 = v10;\n  v4.f32[0] = (float)(v10.f32[0] * -57.29578) * 1000.0;\n  v5 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v4), (__m128)xmmword_1008150C0);\n  v5.f32[0] = v5.f32[0] + v4.f32[0];\n  v6 = _mm_round_ss(v5, v5, 11).f32[0] / 1000.0;\n  m_currentRotation = a1->m_currentRotation;\n  if ( v6 != m_currentRotation )\n  {\n    a1->m_currentRotation = v6;\n    m_delegate = a1->m_delegate;\n    if ( m_delegate )\n      ((void (__fastcall *)(GJRotationControlDelegate *, float))m_delegate->angleChanged)(\n        m_delegate,\n        v6 - m_currentRotation);\n  }\n}", "assembly": "; \n; GJRotationControl::updateSliderPosition from 0x100051a80 to 0x100051b78 (248 bytes)\n; \n; 0 xrefs:\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    rbp                                                            ; +0x0, 0x100051a80\nmov     rbp, rsp                                                       ; +0x1, 0x100051a81\npush    r15                                                            ; +0x4, 0x100051a84\npush    r14                                                            ; +0x6, 0x100051a86\npush    rbx                                                            ; +0x8, 0x100051a88\nsub     rsp, 28h                                                       ; +0x9, 0x100051a89\nmov     rbx, rdi                                                       ; +0xd, 0x100051a8d\nmovss   xmm1, dword ptr [rsi]                                          ; +0x10, 0x100051a90\nmovss   xmm0, dword ptr [rsi+4]                                        ; +0x14, 0x100051a94\nsubss   xmm1, dword ptr [rdi+194h]; float                              ; +0x19, 0x100051a99\nsubss   xmm0, dword ptr [rdi+198h]; float                              ; +0x21, 0x100051aa1\ncall    _atan2f                                                        ; +0x29, 0x100051aa9\nmovaps  [rbp+var_30], xmm0                                             ; +0x2e, 0x100051aae\ncall    ___sincosf_stret                                               ; +0x32, 0x100051ab2\nmovshdup xmm2, xmm0                                                    ; +0x37, 0x100051ab7\nmovss   xmm1, cs:dword_100815028                                       ; +0x3b, 0x100051abb\nmulss   xmm2, xmm1                                                     ; +0x43, 0x100051ac3\nxorps   xmm3, xmm3                                                     ; +0x47, 0x100051ac7\naddss   xmm2, xmm3                                                     ; +0x4a, 0x100051aca\nmulss   xmm1, xmm0                                                     ; +0x4e, 0x100051ace\naddss   xmm1, xmm3                                                     ; +0x52, 0x100051ad2\nlea     r14, [rbp+var_38]                                              ; +0x56, 0x100051ad6\nmov     rdi, r14                                                       ; +0x5a, 0x100051ada\nmovaps  xmm0, xmm2                                                     ; +0x5d, 0x100051add\ncall    sub_10028CBE0                                                  ; +0x60, 0x100051ae0\nlea     r15, [rbx+19Ch]                                                ; +0x65, 0x100051ae5\nmov     rdi, r15                                                       ; +0x6c, 0x100051aec\nmov     rsi, r14                                                       ; +0x6f, 0x100051aef\ncall    sub_10028CC90                                                  ; +0x72, 0x100051af2\nmov     rdi, [rbx+1A8h]                                                ; +0x77, 0x100051af7\nmov     rax, [rdi]                                                     ; +0x7e, 0x100051afe\nmov     rsi, r15                                                       ; +0x81, 0x100051b01\ncall    qword ptr [rax+0B8h]                                           ; +0x84, 0x100051b04\nmovaps  xmm2, [rbp+var_30]                                             ; +0x8a, 0x100051b0a\nmulss   xmm2, cs:dword_100815404                                       ; +0x8e, 0x100051b0e\nmovss   xmm1, cs:dword_1008152B8                                       ; +0x96, 0x100051b16\nmulss   xmm2, xmm1                                                     ; +0x9e, 0x100051b1e\nmovaps  xmm0, cs:xmmword_1008150B0                                     ; +0xa2, 0x100051b22\nandps   xmm0, xmm2                                                     ; +0xa9, 0x100051b29\norps    xmm0, cs:xmmword_1008150C0                                     ; +0xac, 0x100051b2c\naddss   xmm0, xmm2                                                     ; +0xb3, 0x100051b33\nroundss xmm0, xmm0, 0Bh                                                ; +0xb7, 0x100051b37\ndivss   xmm0, xmm1                                                     ; +0xbd, 0x100051b3d\nmovss   xmm1, dword ptr [rbx+1B4h]                                     ; +0xc1, 0x100051b41\nucomiss xmm0, xmm1                                                     ; +0xc9, 0x100051b49\njnz     short loc_100051B50                                            ; +0xcc, 0x100051b4c\njnp     short loc_100051B6D                                            ; +0xce, 0x100051b4e\nmovss   dword ptr [rbx+1B4h], xmm0                                     ; +0xd0, 0x100051b50\nmov     rdi, [rbx+1C0h]                                                ; +0xd8, 0x100051b58\ntest    rdi, rdi                                                       ; +0xdf, 0x100051b5f\njz      short loc_100051B6D                                            ; +0xe2, 0x100051b62\nsubss   xmm0, xmm1                                                     ; +0xe4, 0x100051b64\nmov     rax, [rdi]                                                     ; +0xe8, 0x100051b68\ncall    qword ptr [rax]                                                ; +0xeb, 0x100051b6b\nadd     rsp, 28h                                                       ; +0xed, 0x100051b6d\npop     rbx                                                            ; +0xf1, 0x100051b71\npop     r14                                                            ; +0xf2, 0x100051b72\npop     r15                                                            ; +0xf4, 0x100051b74\npop     rbp                                                            ; +0xf6, 0x100051b76\nretn                                                                   ; +0xf7, 0x100051b77", "xrefs": [], "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"}