{"type": "func", "start": 4295612640, "end": 4295612849, "name": "HardStreak::quadCornerOffset", "pseudocode": "// \n// HardStreak::quadCornerOffset from 0x10009d8e0 to 0x10009d9b1 (209 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\ncocos2d::CCPoint __fastcall HardStreak::quadCornerOffset(\n        HardStreak *a1,\n        cocos2d::CCPoint a2,\n        cocos2d::CCPoint a3,\n        float a4)\n{\n  float *v4; // rdx\n  __int64 v5; // rcx\n  float x; // xmm2_4\n  __m128 v8; // xmm0\n  float v9; // xmm1_4\n  float v10; // [rsp+0h] [rbp-Ch]\n  cocos2d::CCPoint result; // 0:xmm0_8.8\n\n  x = a2.x;\n  if ( a2.x >= 1.0 )\n  {\n    v8 = (__m128)*(unsigned int *)(v5 + 4);\n    v10 = x * 0.5;\n    *(double *)v8.i64 = atan2f(v8.f32[0] - v4[1], *(float *)v5 - *v4) * 180.0 / 3.141592653589793 + 90.0;\n    if ( *(double *)v8.i64 <= 360.0 )\n    {\n      if ( *(double *)v8.i64 < 0.0 )\n        *(double *)v8.i64 = *(double *)v8.i64 + 360.0;\n    }\n    else\n    {\n      *(double *)v8.i64 = *(double *)v8.i64 + -360.0;\n    }\n    v8.f32[0] = *(double *)v8.i64 * 3.141592653589793 / 180.0;\n    *(__float2 *)v8.f32 = __sincosf_stret(v8.f32[0]);\n    v9 = v8.f32[0];\n    result = (cocos2d::CCPoint)_mm_movehdup_ps(v8).u64[0];\n    result.x = result.x * v10;\n    sub_10028CBE0(a1, result.x, v9 * v10);\n  }\n  else\n  {\n    *(double *)&result = sub_10028CC60(a1);\n  }\n  return result;\n}", "assembly": "; \n; HardStreak::quadCornerOffset from 0x10009d8e0 to 0x10009d9b1 (209 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, 0x10009d8e0\nmov     rbp, rsp                                                       ; +0x1, 0x10009d8e1\npush    rbx                                                            ; +0x4, 0x10009d8e4\npush    rax                                                            ; +0x5, 0x10009d8e5\nmovaps  xmm2, xmm0                                                     ; +0x6, 0x10009d8e6\nmov     rbx, rdi                                                       ; +0x9, 0x10009d8e9\nmovss   xmm0, cs:alpha                                                 ; +0xc, 0x10009d8ec\nucomiss xmm0, xmm2                                                     ; +0x14, 0x10009d8f4\njbe     short loc_10009D90D                                            ; +0x17, 0x10009d8f7\nlea     rsi, unk_10099EE20                                             ; +0x19, 0x10009d8f9\nmov     rdi, rbx                                                       ; +0x20, 0x10009d900\ncall    sub_10028CC60                                                  ; +0x23, 0x10009d903\njmp     loc_10009D9A7                                                  ; +0x28, 0x10009d908\nmovss   xmm1, dword ptr [rcx]                                          ; +0x2d, 0x10009d90d\nmovss   xmm0, dword ptr [rcx+4]                                        ; +0x31, 0x10009d911\nsubss   xmm1, dword ptr [rdx]; float                                   ; +0x36, 0x10009d916\nsubss   xmm0, dword ptr [rdx+4]; float                                 ; +0x3a, 0x10009d91a\nmulss   xmm2, cs:dword_100814FA8                                       ; +0x3f, 0x10009d91f\nmovss   [rbp+var_C], xmm2                                              ; +0x47, 0x10009d927\ncall    _atan2f                                                        ; +0x4c, 0x10009d92c\ncvtss2sd xmm0, xmm0                                                    ; +0x51, 0x10009d931\nmulsd   xmm0, cs:qword_100815C18                                       ; +0x55, 0x10009d935\ndivsd   xmm0, cs:qword_100815C20                                       ; +0x5d, 0x10009d93d\naddsd   xmm0, cs:qword_100815C28                                       ; +0x65, 0x10009d945\nucomisd xmm0, cs:qword_100815C30                                       ; +0x6d, 0x10009d94d\njbe     short loc_10009D961                                            ; +0x75, 0x10009d955\naddsd   xmm0, cs:qword_100815C38                                       ; +0x77, 0x10009d957\njmp     short loc_10009D972                                            ; +0x7f, 0x10009d95f\nxorps   xmm1, xmm1                                                     ; +0x81, 0x10009d961\nucomisd xmm1, xmm0                                                     ; +0x84, 0x10009d964\njbe     short loc_10009D972                                            ; +0x88, 0x10009d968\naddsd   xmm0, cs:qword_100815C30                                       ; +0x8a, 0x10009d96a\nmulsd   xmm0, cs:qword_100815C20                                       ; +0x92, 0x10009d972\ndivsd   xmm0, cs:qword_100815C18                                       ; +0x9a, 0x10009d97a\ncvtsd2ss xmm0, xmm0; float                                             ; +0xa2, 0x10009d982\ncall    ___sincosf_stret                                               ; +0xa6, 0x10009d986\nmovaps  xmm1, xmm0                                                     ; +0xab, 0x10009d98b\nmovshdup xmm0, xmm0                                                    ; +0xae, 0x10009d98e\nmovss   xmm2, [rbp+var_C]                                              ; +0xb2, 0x10009d992\nmulss   xmm1, xmm2                                                     ; +0xb7, 0x10009d997\nmulss   xmm0, xmm2                                                     ; +0xbb, 0x10009d99b\nmov     rdi, rbx                                                       ; +0xbf, 0x10009d99f\ncall    sub_10028CBE0                                                  ; +0xc2, 0x10009d9a2\nmov     rax, rbx                                                       ; +0xc7, 0x10009d9a7\nadd     rsp, 8                                                         ; +0xca, 0x10009d9aa\npop     rbx                                                            ; +0xce, 0x10009d9ae\npop     rbp                                                            ; +0xcf, 0x10009d9af\nretn                                                                   ; +0xd0, 0x10009d9b0", "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"}