{"type": "func", "start": 4301846320, "end": 4301846861, "name": "GameObject::determineSlopeDirection", "pseudocode": "// \n// GameObject::determineSlopeDirection from 0x10068f730 to 0x10068f94d (541 bytes)\n// \n// 13 xrefs:\n// > EditorUI::addObjectsToSmartTemplate @ 0x100012595\n// > EditorUI::createSmartObjectsFromTemplate @ 0x100013d2a\n// > EditorUI::createSmartObjectsFromTemplate @ 0x100013e9c\n// > PlayLayer::addObject @ 0x10007f524\n// > LevelEditorLayer::addSpecial @ 0x1000af853\n// > LevelEditorLayer::rotationForSlopeNearObject @ 0x1000b03af\n// > LevelEditorLayer::onPlaytest @ 0x1000c5d13\n// > GJBaseGameLayer::updateDebugDraw @ 0x1000fe046\n// > RotateGameplayGameObject::updateGameplayRotation @ 0x1001d5e69\n// > RotateGameplayGameObject::updateStartValues @ 0x1001d5ec1\n// > PlayerObject::rotateGameplayObject @ 0x1003f4059\n// > PlayerObject::unrotateGameplayObject @ 0x1003f8757\n// > GameObject::getObjectDirection @ 0x10068f999\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 12:35:07 +0000\n// \n\n__int64 __fastcall GameObject::determineSlopeDirection(__int64 a1)\n{\n  unsigned __int8 v2; // r14\n  unsigned __int8 v3; // r15\n  __int64 result; // rax\n  int v5; // ecx\n  float v6; // xmm0_4\n  unsigned __int8 v7; // r9\n  char v8; // di\n  unsigned __int8 v9; // r10\n  char v10; // dl\n  char v11; // si\n  char v12; // r14\n\n  v2 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1424LL))(a1);\n  v3 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a1 + 1432LL))(a1);\n  result = (unsigned int)((int)(*(float (__fastcall **)(__int64))(*(_QWORD *)a1 + 1576LL))(a1) % 360);\n  *(_BYTE *)(a1 + 1080) = 0;\n  v5 = 0;\n  if ( !v2 && !(v3 | ((_DWORD)result != 0)) )\n    goto LABEL_5;\n  v6 = fabs((float)(int)result);\n  v7 = v2 ^ 1;\n  v8 = v3 ^ 1 | v2 ^ 1;\n  if ( (v8 & 1) == 0 && v6 == 180.0 )\n    goto LABEL_5;\n  v9 = v3 & ((_DWORD)result == 0);\n  v5 = 1;\n  if ( (v9 & v7) != 0 )\n    goto LABEL_6;\n  v10 = v3 | v7;\n  if ( ((v3 | v7) & 1) == 0 && v6 == 180.0 )\n    goto LABEL_6;\n  v5 = 2;\n  if ( !(v3 & 1 | ((_DWORD)result != 0) | v7 & 1) )\n    goto LABEL_6;\n  v11 = v2 | v3 ^ 1;\n  if ( (v11 & 1) == 0 && v6 == 180.0 )\n    goto LABEL_6;\n  v5 = 3;\n  if ( (v9 & v2) != 0 )\n    goto LABEL_5;\n  v12 = v3 | v2;\n  if ( (v12 & 1) == 0 && v6 == 180.0 )\n    goto LABEL_5;\n  if ( (v12 & 1) == 0 )\n  {\n    v5 = 4;\n    if ( (_DWORD)result == -270 || (_DWORD)result == 90 )\n      goto LABEL_6;\n  }\n  if ( (v8 & 1) == 0 )\n  {\n    v5 = 4;\n    if ( (_DWORD)result == -90 || (_DWORD)result == 270 )\n      goto LABEL_6;\n  }\n  if ( (v12 & 1) == 0 )\n  {\n    v5 = 5;\n    if ( (_DWORD)result == -90 || (_DWORD)result == 270 )\n      goto LABEL_6;\n  }\n  if ( (v8 & 1) == 0 )\n  {\n    v5 = 5;\n    if ( (_DWORD)result == -270 || (_DWORD)result == 90 )\n      goto LABEL_6;\n  }\n  if ( (v10 & 1) == 0 )\n  {\n    v5 = 6;\n    if ( (_DWORD)result == -270 || (_DWORD)result == 90 )\n      goto LABEL_5;\n  }\n  if ( (v11 & 1) == 0 )\n  {\n    v5 = 6;\n    if ( (int)result > 89 )\n    {\n      if ( (_DWORD)result != 90 )\n      {\n        if ( (_DWORD)result != 270 )\n          goto LABEL_33;\n        goto LABEL_5;\n      }\n    }\n    else if ( (_DWORD)result != -270 )\n    {\n      if ( (_DWORD)result != -90 )\n        goto LABEL_33;\nLABEL_5:\n      *(_BYTE *)(a1 + 1080) = 1;\nLABEL_6:\n      *(_DWORD *)(a1 + 1084) = v5;\n      return result;\n    }\nLABEL_44:\n    v5 = 7;\n    goto LABEL_5;\n  }\nLABEL_33:\n  if ( (v10 & 1) == 0 && ((_DWORD)result == 270 || (_DWORD)result == -90) )\n    goto LABEL_44;\n  return result;\n}", "assembly": "; \n; GameObject::determineSlopeDirection from 0x10068f730 to 0x10068f94d (541 bytes)\n; \n; 13 xrefs:\n; > EditorUI::addObjectsToSmartTemplate @ 0x100012595\n; > EditorUI::createSmartObjectsFromTemplate @ 0x100013d2a\n; > EditorUI::createSmartObjectsFromTemplate @ 0x100013e9c\n; > PlayLayer::addObject @ 0x10007f524\n; > LevelEditorLayer::addSpecial @ 0x1000af853\n; > LevelEditorLayer::rotationForSlopeNearObject @ 0x1000b03af\n; > LevelEditorLayer::onPlaytest @ 0x1000c5d13\n; > GJBaseGameLayer::updateDebugDraw @ 0x1000fe046\n; > RotateGameplayGameObject::updateGameplayRotation @ 0x1001d5e69\n; > RotateGameplayGameObject::updateStartValues @ 0x1001d5ec1\n; > PlayerObject::rotateGameplayObject @ 0x1003f4059\n; > PlayerObject::unrotateGameplayObject @ 0x1003f8757\n; > GameObject::getObjectDirection @ 0x10068f999\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 12:35:07 +0000\n; \npush    rbp                                                            ; +0x0, 0x10068f730\nmov     rbp, rsp                                                       ; +0x1, 0x10068f731\npush    r15                                                            ; +0x4, 0x10068f734\npush    r14                                                            ; +0x6, 0x10068f736\npush    rbx                                                            ; +0x8, 0x10068f738\npush    rax                                                            ; +0x9, 0x10068f739\nmov     rbx, rdi                                                       ; +0xa, 0x10068f73a\nmov     rax, [rdi]                                                     ; +0xd, 0x10068f73d\ncall    qword ptr [rax+590h]                                           ; +0x10, 0x10068f740\nmov     r14d, eax                                                      ; +0x16, 0x10068f746\nmov     rax, [rbx]                                                     ; +0x19, 0x10068f749\nmov     rdi, rbx                                                       ; +0x1c, 0x10068f74c\ncall    qword ptr [rax+598h]                                           ; +0x1f, 0x10068f74f\nmov     r15d, eax                                                      ; +0x25, 0x10068f755\nmov     rax, [rbx]                                                     ; +0x28, 0x10068f758\nmov     rdi, rbx                                                       ; +0x2b, 0x10068f75b\ncall    qword ptr [rax+628h]                                           ; +0x2e, 0x10068f75e\ncvttss2si eax, xmm0                                                    ; +0x34, 0x10068f764\ncdqe                                                                   ; +0x38, 0x10068f768\nimul    rcx, rax, 0FFFFFFFFB60B60B7h                                   ; +0x3a, 0x10068f76a\nshr     rcx, 20h                                                       ; +0x41, 0x10068f771\nadd     ecx, eax                                                       ; +0x45, 0x10068f775\nmov     edx, ecx                                                       ; +0x47, 0x10068f777\nshr     edx, 1Fh                                                       ; +0x49, 0x10068f779\nsar     ecx, 8                                                         ; +0x4c, 0x10068f77c\nadd     ecx, edx                                                       ; +0x4f, 0x10068f77f\nimul    ecx, 168h                                                      ; +0x51, 0x10068f781\nsub     eax, ecx                                                       ; +0x57, 0x10068f787\nmov     byte ptr [rbx+438h], 0                                         ; +0x59, 0x10068f789\nsetnz   r8b                                                            ; +0x60, 0x10068f790\nor      r8b, r15b                                                      ; +0x64, 0x10068f794\nxor     ecx, ecx                                                       ; +0x67, 0x10068f797\ntest    r14b, r14b                                                     ; +0x69, 0x10068f799\njnz     short loc_10068F7A3                                            ; +0x6c, 0x10068f79c\ntest    r8b, r8b                                                       ; +0x6e, 0x10068f79e\njz      short loc_10068F7D6                                            ; +0x71, 0x10068f7a1\nxorps   xmm0, xmm0                                                     ; +0x73, 0x10068f7a3\ncvtsi2ss xmm0, eax                                                     ; +0x76, 0x10068f7a6\nandps   xmm0, cs:xmmword_100A038A0                                     ; +0x7a, 0x10068f7aa\nmov     r9d, r14d                                                      ; +0x81, 0x10068f7b1\nxor     r9b, 1                                                         ; +0x84, 0x10068f7b4\nmov     esi, r15d                                                      ; +0x88, 0x10068f7b8\nxor     sil, 1                                                         ; +0x8b, 0x10068f7bb\nmov     edi, r9d                                                       ; +0x8f, 0x10068f7bf\nor      dil, sil                                                       ; +0x92, 0x10068f7c2\ntest    dil, 1                                                         ; +0x95, 0x10068f7c5\njnz     short loc_10068F7EE                                            ; +0x99, 0x10068f7c9\nucomiss xmm0, cs:dword_100A03A84                                       ; +0x9b, 0x10068f7cb\njnz     short loc_10068F7EE                                            ; +0xa2, 0x10068f7d2\njp      short loc_10068F7EE                                            ; +0xa4, 0x10068f7d4\nmov     byte ptr [rbx+438h], 1                                         ; +0xa6, 0x10068f7d6\nmov     [rbx+43Ch], ecx                                                ; +0xad, 0x10068f7dd\nadd     rsp, 8                                                         ; +0xb3, 0x10068f7e3\npop     rbx                                                            ; +0xb7, 0x10068f7e7\npop     r14                                                            ; +0xb8, 0x10068f7e8\npop     r15                                                            ; +0xba, 0x10068f7ea\npop     rbp                                                            ; +0xbc, 0x10068f7ec\nretn                                                                   ; +0xbd, 0x10068f7ed\ntest    eax, eax                                                       ; +0xbe, 0x10068f7ee\nsetz    r10b                                                           ; +0xc0, 0x10068f7f0\nand     r10b, r15b                                                     ; +0xc4, 0x10068f7f4\nmov     ecx, 1                                                         ; +0xc7, 0x10068f7f7\ntest    r9b, r10b                                                      ; +0xcc, 0x10068f7fc\njnz     short loc_10068F7DD                                            ; +0xcf, 0x10068f7ff\nmov     edx, r9d                                                       ; +0xd1, 0x10068f801\nor      dl, r15b                                                       ; +0xd4, 0x10068f804\ntest    dl, 1                                                          ; +0xd7, 0x10068f807\njnz     short loc_10068F817                                            ; +0xda, 0x10068f80a\nucomiss xmm0, cs:dword_100A03A84                                       ; +0xdc, 0x10068f80c\njnz     short loc_10068F817                                            ; +0xe3, 0x10068f813\njnp     short loc_10068F7DD                                            ; +0xe5, 0x10068f815\nor      r9b, r8b                                                       ; +0xe7, 0x10068f817\nmov     ecx, 2                                                         ; +0xea, 0x10068f81a\ntest    r9b, 1                                                         ; +0xef, 0x10068f81f\njz      short loc_10068F7DD                                            ; +0xf3, 0x10068f823\nor      sil, r14b                                                      ; +0xf5, 0x10068f825\ntest    sil, 1                                                         ; +0xf8, 0x10068f828\njnz     short loc_10068F839                                            ; +0xfc, 0x10068f82c\nucomiss xmm0, cs:dword_100A03A84                                       ; +0xfe, 0x10068f82e\njnz     short loc_10068F839                                            ; +0x105, 0x10068f835\njnp     short loc_10068F7DD                                            ; +0x107, 0x10068f837\nmov     ecx, 3                                                         ; +0x109, 0x10068f839\ntest    r14b, r10b                                                     ; +0x10e, 0x10068f83e\njnz     short loc_10068F7D6                                            ; +0x111, 0x10068f841\nor      r14b, r15b                                                     ; +0x113, 0x10068f843\ntest    r14b, 1                                                        ; +0x116, 0x10068f846\njnz     short loc_10068F85B                                            ; +0x11a, 0x10068f84a\nucomiss xmm0, cs:dword_100A03A84                                       ; +0x11c, 0x10068f84c\njnz     short loc_10068F85B                                            ; +0x123, 0x10068f853\njnp     loc_10068F7D6                                                  ; +0x125, 0x10068f855\ntest    r14b, 1                                                        ; +0x12b, 0x10068f85b\njnz     short loc_10068F87A                                            ; +0x12f, 0x10068f85f\nmov     ecx, 4                                                         ; +0x131, 0x10068f861\ncmp     eax, 0FFFFFEF2h                                                ; +0x136, 0x10068f866\njz      loc_10068F7DD                                                  ; +0x13b, 0x10068f86b\ncmp     eax, 5Ah ; 'Z'                                                 ; +0x141, 0x10068f871\njz      loc_10068F7DD                                                  ; +0x144, 0x10068f874\ntest    dil, 1                                                         ; +0x14a, 0x10068f87a\njnz     short loc_10068F899                                            ; +0x14e, 0x10068f87e\nmov     ecx, 4                                                         ; +0x150, 0x10068f880\ncmp     eax, 0FFFFFFA6h                                                ; +0x155, 0x10068f885\njz      loc_10068F7DD                                                  ; +0x158, 0x10068f888\ncmp     eax, 10Eh                                                      ; +0x15e, 0x10068f88e\njz      loc_10068F7DD                                                  ; +0x163, 0x10068f893\ntest    r14b, 1                                                        ; +0x169, 0x10068f899\njnz     short loc_10068F8B8                                            ; +0x16d, 0x10068f89d\nmov     ecx, 5                                                         ; +0x16f, 0x10068f89f\ncmp     eax, 0FFFFFFA6h                                                ; +0x174, 0x10068f8a4\njz      loc_10068F7DD                                                  ; +0x177, 0x10068f8a7\ncmp     eax, 10Eh                                                      ; +0x17d, 0x10068f8ad\njz      loc_10068F7DD                                                  ; +0x182, 0x10068f8b2\ntest    dil, 1                                                         ; +0x188, 0x10068f8b8\njnz     short loc_10068F8D7                                            ; +0x18c, 0x10068f8bc\nmov     ecx, 5                                                         ; +0x18e, 0x10068f8be\ncmp     eax, 0FFFFFEF2h                                                ; +0x193, 0x10068f8c3\njz      loc_10068F7DD                                                  ; +0x198, 0x10068f8c8\ncmp     eax, 5Ah ; 'Z'                                                 ; +0x19e, 0x10068f8ce\njz      loc_10068F7DD                                                  ; +0x1a1, 0x10068f8d1\ntest    dl, 1                                                          ; +0x1a7, 0x10068f8d7\njnz     short loc_10068F8F5                                            ; +0x1aa, 0x10068f8da\nmov     ecx, 6                                                         ; +0x1ac, 0x10068f8dc\ncmp     eax, 0FFFFFEF2h                                                ; +0x1b1, 0x10068f8e1\njz      loc_10068F7D6                                                  ; +0x1b6, 0x10068f8e6\ncmp     eax, 5Ah ; 'Z'                                                 ; +0x1bc, 0x10068f8ec\njz      loc_10068F7D6                                                  ; +0x1bf, 0x10068f8ef\ntest    sil, 1                                                         ; +0x1c5, 0x10068f8f5\njz      short loc_10068F915                                            ; +0x1c9, 0x10068f8f9\ntest    dl, 1                                                          ; +0x1cb, 0x10068f8fb\njnz     loc_10068F7E3                                                  ; +0x1ce, 0x10068f8fe\ncmp     eax, 10Eh                                                      ; +0x1d4, 0x10068f904\njz      short loc_10068F943                                            ; +0x1d9, 0x10068f909\ncmp     eax, 0FFFFFFA6h                                                ; +0x1db, 0x10068f90b\njz      short loc_10068F943                                            ; +0x1de, 0x10068f90e\njmp     loc_10068F7E3                                                  ; +0x1e0, 0x10068f910\nmov     ecx, 6                                                         ; +0x1e5, 0x10068f915\ncmp     eax, 59h ; 'Y'                                                 ; +0x1ea, 0x10068f91a\njg      short loc_10068F931                                            ; +0x1ed, 0x10068f91d\ncmp     eax, 0FFFFFEF2h                                                ; +0x1ef, 0x10068f91f\njz      short loc_10068F943                                            ; +0x1f4, 0x10068f924\ncmp     eax, 0FFFFFFA6h                                                ; +0x1f6, 0x10068f926\njz      loc_10068F7D6                                                  ; +0x1f9, 0x10068f929\njmp     short loc_10068F8FB                                            ; +0x1ff, 0x10068f92f\ncmp     eax, 5Ah ; 'Z'                                                 ; +0x201, 0x10068f931\njz      short loc_10068F943                                            ; +0x204, 0x10068f934\ncmp     eax, 10Eh                                                      ; +0x206, 0x10068f936\njz      loc_10068F7D6                                                  ; +0x20b, 0x10068f93b\njmp     short loc_10068F8FB                                            ; +0x211, 0x10068f941\nmov     ecx, 7                                                         ; +0x213, 0x10068f943\njmp     loc_10068F7D6                                                  ; +0x218, 0x10068f948", "xrefs": ["EditorUI::addObjectsToSmartTemplate @ 0x100012595", "EditorUI::createSmartObjectsFromTemplate @ 0x100013d2a", "EditorUI::createSmartObjectsFromTemplate @ 0x100013e9c", "PlayLayer::addObject @ 0x10007f524", "LevelEditorLayer::addSpecial @ 0x1000af853", "LevelEditorLayer::rotationForSlopeNearObject @ 0x1000b03af", "LevelEditorLayer::onPlaytest @ 0x1000c5d13", "GJBaseGameLayer::updateDebugDraw @ 0x1000fe046", "RotateGameplayGameObject::updateGameplayRotation @ 0x1001d5e69", "RotateGameplayGameObject::updateStartValues @ 0x1001d5ec1", "PlayerObject::rotateGameplayObject @ 0x1003f4059", "PlayerObject::unrotateGameplayObject @ 0x1003f8757", "GameObject::getObjectDirection @ 0x10068f999"], "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"}