{"type": "func", "start": 5372449776, "end": 5372450517, "name": "PlayerObject::rotateGameplayObject", "pseudocode": "// \n// PlayerObject::rotateGameplayObject from 0x1403913f0 to 0x1403916d5 (741 bytes)\n// \n// 6 xrefs:\n// > PlayerObject::handleRotatedCollisionInternal @ 0x14038f189\n// > PlayerObject::handleRotatedCollisionInternal @ 0x14038f1a7\n// > PlayerObject::spiderTestJumpInternal @ 0x140394b0a\n// > <???> @ 0x140697954\n// > <???> @ 0x14069798c\n// > <???> @ 0x1406d61f4\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 PlayerObject::rotateGameplayObject(PlayerObject *a1, GameObject *a2)\n{\n  unsigned int m_uniqueID; // edx\n  std::_Vector_val<std::_Simple_types<std::_List_unchecked_iterator<std::_List_val<std::_List_simple_types<std::pair<const int, GJPointDouble>>>>>>::pointer Myfirst; // r8\n  unsigned __int64 v6; // rcx\n  __int64 v7; // rax\n  __int64 v8; // rcx\n  float v9; // xmm9_4\n  float v10; // xmm0_4\n  bool v11; // zf\n  float v12; // xmm4_4\n  double v13; // xmm1_8\n  double v14; // xmm6_8\n  double v15; // xmm7_8\n  double v16; // xmm0_8\n  GameObject_vtbl *v17; // rax\n  _BOOL8 v18; // rdx\n  _QWORD v19[2]; // [rsp+20h] [rbp-88h] BYREF\n  _BYTE v20[16]; // [rsp+30h] [rbp-78h] BYREF\n  float v21; // [rsp+B0h] [rbp+8h] BYREF\n  float v22; // [rsp+B4h] [rbp+Ch]\n  cocos2d::CCPoint v23; // [rsp+B8h] [rbp+10h] BYREF\n  cocos2d::CCPoint v24; // [rsp+C0h] [rbp+18h] BYREF\n  char v25; // [rsp+C8h] [rbp+20h] BYREF\n\n  m_uniqueID = a2->m_uniqueID;\n  Myfirst = a1->m_rotateObjectsRelated._Vec._Mypair._Myval2._Myfirst;\n  v6 = 2\n     * ((0x100000001B3LL\n       * (((unsigned __int64)m_uniqueID >> 24)\n        ^ (0x100000001B3LL\n         * (BYTE2(m_uniqueID)\n          ^ (0x100000001B3LL\n           * ((0x100000001B3LL * ((unsigned __int8)m_uniqueID ^ 0xCBF29CE484222325uLL)) ^ BYTE1(m_uniqueID)))))))\n      & a1->m_rotateObjectsRelated._Mask);\n  v7 = *((_QWORD *)Myfirst + v6 + 1);\n  if ( (std::_List_val<std::_List_simple_types<std::pair<const int, GJPointDouble>>>::_Nodeptr)v7 != a1->m_rotateObjectsRelated._List._Mypair._Myval2._Myhead )\n  {\n    v8 = *((_QWORD *)Myfirst + v6);\n    if ( m_uniqueID == *(_DWORD *)(v7 + 16) )\n      goto LABEL_7;\n    while ( v7 != v8 )\n    {\n      v7 = *(_QWORD *)(v7 + 8);\n      if ( m_uniqueID == *(_DWORD *)(v7 + 16) )\n        goto LABEL_7;\n    }\n  }\n  v7 = 0;\nLABEL_7:\n  if ( !v7 )\n  {\n    ((void (__fastcall *)(GameObject *, float *))a2->getRealPosition)(a2, &v21);\n    cocos2d::CCPoint::CCPoint(&v24);\n    a1->getPosition_0(a1);\n    cocos2d::CCPoint::CCPoint(&v23);\n    v9 = sinf(1.5707964);\n    v10 = cosf(1.5707964);\n    v11 = !a2->m_tempOffsetXRelated;\n    v12 = (float)((float)(v10 * (float)(v21 - v23.x)) - (float)(v9 * (float)(v22 - v23.y))) + v23.x;\n    v13 = (float)((float)(v10 * (float)(v22 - v23.y)) + (float)(v9 * (float)(v21 - v23.x))) + v23.y;\n    v21 = v12;\n    v14 = (float)(v12 - v24.x);\n    v22 = v13;\n    v15 = (float)(v22 - v24.y);\n    if ( v11 )\n      a2->m_positionX = v14 + a2->m_positionX;\n    v16 = v15 + a2->m_positionY;\n    a2->m_positionY = v16;\n    cocos2d::CCPoint::CCPoint(*(float *)&v16, v14);\n    cocos2d::CCPoint::operator+(&a2->m_lastPosition, &v25);\n    cocos2d::CCPoint::operator=(&a2->m_lastPosition, &v25);\n    v17 = a2->CCSpritePlus::cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable;\n    a2->m_startRotationX = a2->m_startRotationX - 90.0;\n    a2->m_startRotationY = a2->m_startRotationY - 90.0;\n    ((void (__fastcall *)(GameObject *))v17->setRRotation)(a2);\n    LOBYTE(v18) = 1;\n    a2->setObjectRectDirty(a2, v18);\n    if ( a2->getType(a2) == Slope )\n      GameObject::determineSlopeDirection(a2);\n    *(double *)v19 = v14;\n    *(double *)&v19[1] = v15;\n    ((void (__fastcall *)(std::unordered_map<int, GJPointDouble> *, _BYTE *, int *, _QWORD *))sub_1403A3FF0)(\n      &a1->m_rotateObjectsRelated,\n      v20,\n      &a2->m_uniqueID,\n      v19);\n  }\n}", "assembly": "; \n; PlayerObject::rotateGameplayObject from 0x1403913f0 to 0x1403916d5 (741 bytes)\n; \n; 6 xrefs:\n; > PlayerObject::handleRotatedCollisionInternal @ 0x14038f189\n; > PlayerObject::handleRotatedCollisionInternal @ 0x14038f1a7\n; > PlayerObject::spiderTestJumpInternal @ 0x140394b0a\n; > <???> @ 0x140697954\n; > <???> @ 0x14069798c\n; > <???> @ 0x1406d61f4\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    rbx                                                            ; +0x0, 0x1403913f0\npush    rbp                                                            ; +0x2, 0x1403913f2\npush    rsi                                                            ; +0x3, 0x1403913f3\npush    rdi                                                            ; +0x4, 0x1403913f4\nsub     rsp, 88h                                                       ; +0x5, 0x1403913f5\nmov     rbx, rcx                                                       ; +0xc, 0x1403913fc\nmov     r9, 100000001B3h                                               ; +0xf, 0x1403913ff\nmov     rcx, 0CBF29CE484222325h                                        ; +0x19, 0x140391409\nmov     rdi, rdx                                                       ; +0x23, 0x140391413\nmov     edx, [rdx+39Ch]                                                ; +0x26, 0x140391416\nmov     eax, edx                                                       ; +0x2c, 0x14039141c\nshr     eax, 8                                                         ; +0x2e, 0x14039141e\nmovzx   r8d, al                                                        ; +0x31, 0x140391421\nmovzx   eax, dl                                                        ; +0x35, 0x140391425\nxor     rax, rcx                                                       ; +0x38, 0x140391428\nimul    rax, r9                                                        ; +0x3b, 0x14039142b\nxor     r8, rax                                                        ; +0x3f, 0x14039142f\nmov     eax, edx                                                       ; +0x42, 0x140391432\nimul    r8, r9                                                         ; +0x44, 0x140391434\nshr     eax, 10h                                                       ; +0x48, 0x140391438\nmovzx   ecx, al                                                        ; +0x4b, 0x14039143b\nmov     eax, edx                                                       ; +0x4e, 0x14039143e\nxor     r8, rcx                                                        ; +0x50, 0x140391440\nshr     rax, 18h                                                       ; +0x53, 0x140391443\nmov     rcx, [rbx+6D0h]                                                ; +0x57, 0x140391447\nimul    r8, r9                                                         ; +0x5e, 0x14039144e\nxor     r8, rax                                                        ; +0x62, 0x140391452\nimul    r8, r9                                                         ; +0x65, 0x140391455\nand     rcx, r8                                                        ; +0x69, 0x140391459\nmov     r8, [rbx+6B8h]                                                 ; +0x6c, 0x14039145c\nadd     rcx, rcx                                                       ; +0x73, 0x140391463\nmov     rax, [r8+rcx*8+8]                                              ; +0x76, 0x140391466\ncmp     rax, [rbx+6A8h]                                                ; +0x7b, 0x14039146b\njz      short loc_140391490                                            ; +0x82, 0x140391472\nmov     rcx, [r8+rcx*8]                                                ; +0x84, 0x140391474\ncmp     edx, [rax+10h]                                                 ; +0x88, 0x140391478\njz      short loc_140391492                                            ; +0x8b, 0x14039147b\nnop     dword ptr [rax]                                                ; +0x8d, 0x14039147d\ncmp     rax, rcx                                                       ; +0x90, 0x140391480\njz      short loc_140391490                                            ; +0x93, 0x140391483\nmov     rax, [rax+8]                                                   ; +0x95, 0x140391485\ncmp     edx, [rax+10h]                                                 ; +0x99, 0x140391489\njnz     short loc_140391480                                            ; +0x9c, 0x14039148c\njmp     short loc_140391492                                            ; +0x9e, 0x14039148e\nxor     eax, eax                                                       ; +0xa0, 0x140391490\ntest    rax, rax                                                       ; +0xa2, 0x140391492\njnz     loc_1403916C9                                                  ; +0xa5, 0x140391495\nmov     rax, [rdi]                                                     ; +0xab, 0x14039149b\nlea     rdx, [rsp+0A8h+arg_0]                                          ; +0xae, 0x14039149e\nmovaps  [rsp+0A8h+var_38], xmm6                                        ; +0xb6, 0x1403914a6\nmov     rcx, rdi                                                       ; +0xbb, 0x1403914ab\nmovaps  [rsp+0A8h+var_48], xmm7                                        ; +0xbe, 0x1403914ae\nmovaps  [rsp+0A8h+var_58], xmm8                                        ; +0xc3, 0x1403914b3\nmovaps  [rsp+0A8h+var_68], xmm9                                        ; +0xc9, 0x1403914b9\ncall    qword ptr [rax+4A8h]                                           ; +0xcf, 0x1403914bf\nlea     rdx, [rsp+0A8h+arg_0]                                          ; +0xd5, 0x1403914c5\nlea     rcx, [rsp+0A8h+arg_10]                                         ; +0xdd, 0x1403914cd\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0xe5, 0x1403914d5\nmov     rax, [rbx]                                                     ; +0xeb, 0x1403914db\nmov     rcx, rbx                                                       ; +0xee, 0x1403914de\ncall    qword ptr [rax+0C8h]                                           ; +0xf1, 0x1403914e1\nmov     rdx, rax                                                       ; +0xf7, 0x1403914e7\nlea     rcx, [rsp+0A8h+arg_8]                                          ; +0xfa, 0x1403914ea\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x102, 0x1403914f2\nmovss   xmm6, cs:flt_140622D08                                         ; +0x108, 0x1403914f8\nmovaps  xmm0, xmm6; X                                                  ; +0x110, 0x140391500\ncall    sinf                                                           ; +0x113, 0x140391503\nmovaps  xmm9, xmm0                                                     ; +0x118, 0x140391508\nmovaps  xmm0, xmm6; X                                                  ; +0x11c, 0x14039150c\ncall    cosf                                                           ; +0x11f, 0x14039150f\ncmp     byte ptr [rdi+2C8h], 0                                         ; +0x124, 0x140391514\nmovaps  xmm2, xmm0                                                     ; +0x12b, 0x14039151b\nmovss   xmm7, [rsp+0A8h+arg_0]                                         ; +0x12e, 0x14039151e\nmovaps  xmm1, xmm9                                                     ; +0x137, 0x140391527\nmovss   xmm6, [rsp+0A8h+arg_C]                                         ; +0x13b, 0x14039152b\nmovaps  xmm8, xmm0                                                     ; +0x144, 0x140391534\nmovss   xmm3, [rsp+0A8h+arg_8]                                         ; +0x148, 0x140391538\nxorps   xmm4, xmm4                                                     ; +0x151, 0x140391541\nmovss   xmm5, [rsp+0A8h+arg_4]                                         ; +0x154, 0x140391544\nsubss   xmm7, xmm3                                                     ; +0x15d, 0x14039154d\nsubss   xmm5, xmm6                                                     ; +0x161, 0x140391551\ncvtps2pd xmm0, xmm3                                                    ; +0x165, 0x140391555\nmulss   xmm2, xmm7                                                     ; +0x168, 0x140391558\nmulss   xmm1, xmm5                                                     ; +0x16c, 0x14039155c\nmulss   xmm9, xmm7                                                     ; +0x170, 0x140391560\nsubss   xmm2, xmm1                                                     ; +0x175, 0x140391565\nmulss   xmm8, xmm5                                                     ; +0x179, 0x140391569\nxorps   xmm1, xmm1                                                     ; +0x17e, 0x14039156e\naddss   xmm8, xmm9                                                     ; +0x181, 0x140391571\nmovaps  xmm9, [rsp+0A8h+var_68]                                        ; +0x186, 0x140391576\ncvtss2sd xmm2, xmm2                                                    ; +0x18c, 0x14039157c\ncvtss2sd xmm1, xmm8                                                    ; +0x190, 0x140391580\nmovaps  xmm8, [rsp+0A8h+var_58]                                        ; +0x195, 0x140391585\naddsd   xmm2, xmm0                                                     ; +0x19b, 0x14039158b\ncvtps2pd xmm0, xmm6                                                    ; +0x19f, 0x14039158f\ncvtsd2ss xmm4, xmm2                                                    ; +0x1a2, 0x140391592\naddsd   xmm1, xmm0                                                     ; +0x1a6, 0x140391596\nmovss   [rsp+0A8h+arg_0], xmm4                                         ; +0x1aa, 0x14039159a\nsubss   xmm4, [rsp+0A8h+arg_10]                                        ; +0x1b3, 0x1403915a3\ncvtpd2ps xmm2, xmm1                                                    ; +0x1bc, 0x1403915ac\ncvtps2pd xmm6, xmm4                                                    ; +0x1c0, 0x1403915b0\nmovss   [rsp+0A8h+arg_4], xmm2                                         ; +0x1c3, 0x1403915b3\nsubss   xmm2, [rsp+0A8h+arg_14]                                        ; +0x1cc, 0x1403915bc\ncvtps2pd xmm7, xmm2                                                    ; +0x1d5, 0x1403915c5\njnz     short loc_1403915DD                                            ; +0x1d8, 0x1403915c8\nmovaps  xmm0, xmm6                                                     ; +0x1da, 0x1403915ca\naddsd   xmm0, qword ptr [rdi+3B8h]                                     ; +0x1dd, 0x1403915cd\nmovsd   qword ptr [rdi+3B8h], xmm0                                     ; +0x1e5, 0x1403915d5\nmovaps  xmm0, xmm7                                                     ; +0x1ed, 0x1403915dd\nlea     rcx, [rsp+0A8h+var_88]                                         ; +0x1f0, 0x1403915e0\naddsd   xmm0, qword ptr [rdi+3C0h]                                     ; +0x1f5, 0x1403915e5\ncvtpd2ps xmm2, xmm7                                                    ; +0x1fd, 0x1403915ed\ncvtpd2ps xmm1, xmm6                                                    ; +0x201, 0x1403915f1\nmovsd   qword ptr [rdi+3C0h], xmm0                                     ; +0x205, 0x1403915f5\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x20d, 0x1403915fd\nmov     r8, rax                                                        ; +0x213, 0x140391603\nlea     rdx, [rsp+0A8h+arg_18]                                         ; +0x216, 0x140391606\nlea     rcx, [rdi+4D0h]                                                ; +0x21e, 0x14039160e\ncall    cs:??HCCPoint@cocos2d@@QEBA?AV01@AEBV01@@Z; cocos2d::CCPoint::operator+(cocos2d::CCPoint const &) ; +0x225, 0x140391615\nlea     rdx, [rsp+0A8h+arg_18]                                         ; +0x22b, 0x14039161b\nlea     rcx, [rdi+4D0h]                                                ; +0x233, 0x140391623\ncall    cs:??4CCPoint@cocos2d@@QEAAAEAV01@AEBV01@@Z; cocos2d::CCPoint::operator=(cocos2d::CCPoint const &) ; +0x23a, 0x14039162a\nmovss   xmm0, dword ptr [rdi+3D4h]                                     ; +0x240, 0x140391630\nxorps   xmm1, xmm1                                                     ; +0x248, 0x140391638\nsubss   xmm0, cs:dword_140623294                                       ; +0x24b, 0x14039163b\nmov     rax, [rdi]                                                     ; +0x253, 0x140391643\nmov     rcx, rdi                                                       ; +0x256, 0x140391646\nmovss   dword ptr [rdi+3D4h], xmm0                                     ; +0x259, 0x140391649\nmovss   xmm0, dword ptr [rdi+3D8h]                                     ; +0x261, 0x140391651\nsubss   xmm0, cs:dword_140623294                                       ; +0x269, 0x140391659\nmovss   dword ptr [rdi+3D8h], xmm0                                     ; +0x271, 0x140391661\ncall    qword ptr [rax+520h]                                           ; +0x279, 0x140391669\nmov     rax, [rdi]                                                     ; +0x27f, 0x14039166f\nmov     dl, 1                                                          ; +0x282, 0x140391672\nmov     rcx, rdi                                                       ; +0x284, 0x140391674\ncall    qword ptr [rax+648h]                                           ; +0x287, 0x140391677\nmov     rax, [rdi]                                                     ; +0x28d, 0x14039167d\nmov     rcx, rdi                                                       ; +0x290, 0x140391680\ncall    qword ptr [rax+660h]                                           ; +0x293, 0x140391683\ncmp     eax, 19h                                                       ; +0x299, 0x140391689\njnz     short loc_140391696                                            ; +0x29c, 0x14039168c\nmov     rcx, rdi                                                       ; +0x29e, 0x14039168e\ncall    GameObject__determineSlopeDirection                            ; +0x2a1, 0x140391691\nlea     r9, [rsp+0A8h+var_88]                                          ; +0x2a6, 0x140391696\nmovsd   [rsp+0A8h+var_88], xmm6                                        ; +0x2ab, 0x14039169b\nlea     r8, [rdi+39Ch]                                                 ; +0x2b1, 0x1403916a1\nmovsd   [rsp+0A8h+var_80], xmm7                                        ; +0x2b8, 0x1403916a8\nlea     rdx, [rsp+0A8h+var_78]                                         ; +0x2be, 0x1403916ae\nlea     rcx, [rbx+6A0h]                                                ; +0x2c3, 0x1403916b3\ncall    sub_1403A3FF0                                                  ; +0x2ca, 0x1403916ba\nmovaps  xmm7, [rsp+0A8h+var_48]                                        ; +0x2cf, 0x1403916bf\nmovaps  xmm6, [rsp+0A8h+var_38]                                        ; +0x2d4, 0x1403916c4\nadd     rsp, 88h                                                       ; +0x2d9, 0x1403916c9\npop     rdi                                                            ; +0x2e0, 0x1403916d0\npop     rsi                                                            ; +0x2e1, 0x1403916d1\npop     rbp                                                            ; +0x2e2, 0x1403916d2\npop     rbx                                                            ; +0x2e3, 0x1403916d3\nretn                                                                   ; +0x2e4, 0x1403916d4", "xrefs": ["PlayerObject::handleRotatedCollisionInternal @ 0x14038f189", "PlayerObject::handleRotatedCollisionInternal @ 0x14038f1a7", "PlayerObject::spiderTestJumpInternal @ 0x140394b0a", "<???> @ 0x140697954", "<???> @ 0x14069798c", "<???> @ 0x1406d61f4"], "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"}