{"type": "func", "start": 4299994496, "end": 4299994827, "name": "GJUINode::activeRangeTouchTest", "pseudocode": "// \n// GJUINode::activeRangeTouchTest from 0x1004cb580 to 0x1004cb6cb (331 bytes)\n// \n// 3 xrefs:\n// > UILayer::processUINodeTouch @ 0x1004c9f5f\n// > GJUINode::touchTest @ 0x1004ca34b\n// > GJUINode::activeTouchTest @ 0x1004ca499\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\nint __fastcall GJUINode::activeRangeTouchTest(GJUINode *a1, cocos2d::CCPoint a2)\n{\n  float *v2; // rsi\n  float *v3; // rax\n  float v4; // xmm2_4\n  float v5; // xmm2_4\n  float v6; // xmm1_4\n  int v7; // r14d\n  float m_radius; // xmm0_4\n  float v9; // xmm1_4\n  __m128 width_low; // xmm0\n  __m128 v11; // xmm1\n  __m128 v12; // xmm2\n  __m128 v13; // xmm3\n  double v15[4]; // [rsp+10h] [rbp-20h] BYREF\n\n  v3 = (float *)((__int64 (__fastcall *)(cocos2d::CCSprite *, double))a1->m_firstSprite->getPosition)(\n                  a1->m_firstSprite,\n                  *(double *)&a2);\n  sub_10028CBE0((float *)v15, *v3, v2[1] + 40.0);\n  v4 = *v2;\n  v5 = v4 - *(float *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_firstSprite->getPosition)(a1->m_firstSprite);\n  v6 = fabs(v5);\n  v7 = 0;\n  if ( a1->m_deadzone <= v6 )\n  {\n    m_radius = a1->m_radius;\n    if ( v6 > m_radius )\n    {\n      v9 = *v2;\n      if ( v5 <= 0.0 )\n        *(float *)v15 = m_radius + v9;\n      else\n        *(float *)v15 = v9 - m_radius;\n    }\n    v7 = (v5 > 0.0) | 2;\n  }\n  width_low = (__m128)LODWORD(a1->m_rect.size.width);\n  v11 = (__m128)0x3F000000u;\n  v12 = width_low;\n  v12.f32[0] = width_low.f32[0] * 0.5;\n  v11.f32[0] = 0.5 * a1->m_rect.size.height;\n  v13 = (__m128)0x42200000u;\n  v13.f32[0] = v11.f32[0] + 40.0;\n  width_low.f32[0] = width_low.f32[0] * -0.5;\n  _mm_storel_ps(\n    v15,\n    _mm_max_ps(\n      _mm_min_ps((__m128)*(unsigned __int64 *)&v15[0], _mm_insert_ps(v12, v13, 16)),\n      _mm_blend_ps(_mm_sub_ps((__m128)xmmword_10081D8A0, _mm_moveldup_ps(v11)), width_low, 13)));\n  ((void (__fastcall *)(cocos2d::CCSprite *, __int64))a1->m_firstSprite->setVisible)(a1->m_firstSprite, 1);\n  ((void (__fastcall *)(cocos2d::CCSprite *, double *))a1->m_firstSprite->setPosition)(a1->m_firstSprite, v15);\n  return v7;\n}", "assembly": "; \n; GJUINode::activeRangeTouchTest from 0x1004cb580 to 0x1004cb6cb (331 bytes)\n; \n; 3 xrefs:\n; > UILayer::processUINodeTouch @ 0x1004c9f5f\n; > GJUINode::touchTest @ 0x1004ca34b\n; > GJUINode::activeTouchTest @ 0x1004ca499\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, 0x1004cb580\nmov     rbp, rsp                                                       ; +0x1, 0x1004cb581\npush    r15                                                            ; +0x4, 0x1004cb584\npush    r14                                                            ; +0x6, 0x1004cb586\npush    rbx                                                            ; +0x8, 0x1004cb588\nsub     rsp, 18h                                                       ; +0x9, 0x1004cb589\nmov     r15, rsi                                                       ; +0xd, 0x1004cb58d\nmov     rbx, rdi                                                       ; +0x10, 0x1004cb590\nmov     rdi, [rdi+140h]                                                ; +0x13, 0x1004cb593\nmov     rax, [rdi]                                                     ; +0x1a, 0x1004cb59a\ncall    qword ptr [rax+0C0h]                                           ; +0x1d, 0x1004cb59d\nmovss   xmm0, dword ptr [rax]                                          ; +0x23, 0x1004cb5a3\nmovss   xmm1, dword ptr [r15+4]                                        ; +0x27, 0x1004cb5a7\naddss   xmm1, cs:dword_100814FC8                                       ; +0x2d, 0x1004cb5ad\nlea     rdi, [rbp+var_20]                                              ; +0x35, 0x1004cb5b5\ncall    sub_10028CBE0                                                  ; +0x39, 0x1004cb5b9\nmovss   xmm0, dword ptr [r15]                                          ; +0x3e, 0x1004cb5be\nmovaps  [rbp+var_30], xmm0                                             ; +0x43, 0x1004cb5c3\nmov     rdi, [rbx+140h]                                                ; +0x47, 0x1004cb5c7\nmov     rax, [rdi]                                                     ; +0x4e, 0x1004cb5ce\ncall    qword ptr [rax+0C0h]                                           ; +0x51, 0x1004cb5d1\nmovaps  xmm2, [rbp+var_30]                                             ; +0x57, 0x1004cb5d7\nsubss   xmm2, dword ptr [rax]                                          ; +0x5b, 0x1004cb5db\nmovaps  xmm1, cs:xmmword_100815500                                     ; +0x5f, 0x1004cb5df\nandps   xmm1, xmm2                                                     ; +0x66, 0x1004cb5e6\nmovss   xmm0, dword ptr [rbx+178h]                                     ; +0x69, 0x1004cb5e9\nxor     r14d, r14d                                                     ; +0x71, 0x1004cb5f1\nucomiss xmm0, xmm1                                                     ; +0x74, 0x1004cb5f4\nja      short loc_1004CB638                                            ; +0x77, 0x1004cb5f7\nmovss   xmm0, dword ptr [rbx+174h]                                     ; +0x79, 0x1004cb5f9\nucomiss xmm1, xmm0                                                     ; +0x81, 0x1004cb601\njbe     short loc_1004CB627                                            ; +0x84, 0x1004cb604\nxorps   xmm1, xmm1                                                     ; +0x86, 0x1004cb606\nucomiss xmm2, xmm1                                                     ; +0x89, 0x1004cb609\nmovss   xmm1, dword ptr [r15]                                          ; +0x8c, 0x1004cb60c\njbe     short loc_1004CB61E                                            ; +0x91, 0x1004cb611\nsubss   xmm1, xmm0                                                     ; +0x93, 0x1004cb613\nmovss   dword ptr [rbp+var_20], xmm1                                   ; +0x97, 0x1004cb617\njmp     short loc_1004CB627                                            ; +0x9c, 0x1004cb61c\naddss   xmm0, xmm1                                                     ; +0x9e, 0x1004cb61e\nmovss   dword ptr [rbp+var_20], xmm0                                   ; +0xa2, 0x1004cb622\nxorps   xmm0, xmm0                                                     ; +0xa7, 0x1004cb627\nxor     r14d, r14d                                                     ; +0xaa, 0x1004cb62a\nucomiss xmm2, xmm0                                                     ; +0xad, 0x1004cb62d\nsetnbe  r14b                                                           ; +0xb0, 0x1004cb630\nor      r14d, 2                                                        ; +0xb4, 0x1004cb634\nmovss   xmm0, dword ptr [rbx+158h]                                     ; +0xb8, 0x1004cb638\nmovss   xmm1, cs:dword_100814FA8                                       ; +0xc0, 0x1004cb640\nmovaps  xmm2, xmm0                                                     ; +0xc8, 0x1004cb648\nmulss   xmm2, xmm1                                                     ; +0xcb, 0x1004cb64b\nmulss   xmm1, dword ptr [rbx+15Ch]                                     ; +0xcf, 0x1004cb64f\nmovss   xmm3, cs:dword_100814FC8                                       ; +0xd7, 0x1004cb657\naddss   xmm3, xmm1                                                     ; +0xdf, 0x1004cb65f\ninsertps xmm2, xmm3, 10h                                               ; +0xe3, 0x1004cb663\nmovsldup xmm1, xmm1                                                    ; +0xe9, 0x1004cb669\nmulss   xmm0, cs:dword_100815248                                       ; +0xed, 0x1004cb66d\nmovaps  xmm3, cs:xmmword_10081D8A0                                     ; +0xf5, 0x1004cb675\nsubps   xmm3, xmm1                                                     ; +0xfc, 0x1004cb67c\nblendps xmm3, xmm0, 0Dh                                                ; +0xff, 0x1004cb67f\nmovsd   xmm0, [rbp+var_20]                                             ; +0x105, 0x1004cb685\nminps   xmm0, xmm2                                                     ; +0x10a, 0x1004cb68a\nmaxps   xmm0, xmm3                                                     ; +0x10d, 0x1004cb68d\nmovlps  [rbp+var_20], xmm0                                             ; +0x110, 0x1004cb690\nmov     rdi, [rbx+140h]                                                ; +0x114, 0x1004cb694\nmov     rax, [rdi]                                                     ; +0x11b, 0x1004cb69b\nmov     esi, 1                                                         ; +0x11e, 0x1004cb69e\ncall    qword ptr [rax+148h]                                           ; +0x123, 0x1004cb6a3\nmov     rdi, [rbx+140h]                                                ; +0x129, 0x1004cb6a9\nmov     rax, [rdi]                                                     ; +0x130, 0x1004cb6b0\nlea     rsi, [rbp+var_20]                                              ; +0x133, 0x1004cb6b3\ncall    qword ptr [rax+0B8h]                                           ; +0x137, 0x1004cb6b7\nmov     eax, r14d                                                      ; +0x13d, 0x1004cb6bd\nadd     rsp, 18h                                                       ; +0x140, 0x1004cb6c0\npop     rbx                                                            ; +0x144, 0x1004cb6c4\npop     r14                                                            ; +0x145, 0x1004cb6c5\npop     r15                                                            ; +0x147, 0x1004cb6c7\npop     rbp                                                            ; +0x149, 0x1004cb6c9\nretn                                                                   ; +0x14a, 0x1004cb6ca", "xrefs": ["UILayer::processUINodeTouch @ 0x1004c9f5f", "GJUINode::touchTest @ 0x1004ca34b", "GJUINode::activeTouchTest @ 0x1004ca499"], "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"}