{"type": "func", "start": 5375476352, "end": 5375476821, "name": "GJUINode::activeTouchTest", "pseudocode": "// \n// GJUINode::activeTouchTest from 0x140674280 to 0x140674455 (469 bytes)\n// \n// 3 xrefs:\n// > UILayer::processUINodeTouch @ 0x140673805\n// > GJUINode::touchTest @ 0x140674257\n// > <???> @ 0x140932450\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 11:35:55 +0000\n// \n\n__int64 __fastcall GJUINode::activeTouchTest(__int64 a1, const struct cocos2d::CCPoint *a2)\n{\n  float *v4; // rax\n  float *v5; // rbx\n  float *v6; // rax\n  float *v7; // rax\n  float v8; // xmm1_4\n  float v9; // xmm3_4\n  float v10; // xmm4_4\n  float v11; // xmm1_4\n  unsigned int v12; // ebx\n  float v13; // xmm0_4\n  float v14; // xmm3_4\n  float v15; // xmm2_4\n  float v16; // xmm3_4\n  float v17; // xmm2_4\n  float v18; // xmm0_4\n  __int64 *v19; // rcx\n  __int64 v20; // rdx\n  float v21; // [rsp+40h] [rbp+8h] BYREF\n  float v22; // [rsp+44h] [rbp+Ch]\n  char v23; // [rsp+50h] [rbp+18h] BYREF\n\n  if ( *(_BYTE *)(a1 + 381) )\n  {\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v23, a2);\n    v5 = v4;\n    v6 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 320) + 200LL))(*(_QWORD *)(a1 + 320));\n    cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v21, *v6, v5[1] + 40.0);\n    v7 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 320) + 200LL))(*(_QWORD *)(a1 + 320));\n    v8 = *v5;\n    v9 = *v5 - *v7;\n    v10 = fabs(v9);\n    if ( *(float *)(a1 + 376) <= v10 )\n    {\n      v13 = *(float *)(a1 + 372);\n      if ( v10 <= v13 )\n      {\n        v11 = v21;\n      }\n      else\n      {\n        if ( v9 <= 0.0 )\n          v11 = v8 + v13;\n        else\n          v11 = v8 - v13;\n        v21 = v11;\n      }\n      v12 = (v9 > 0.0) + 2;\n    }\n    else\n    {\n      v11 = v21;\n      v12 = 0;\n    }\n    v14 = *(float *)(a1 + 344);\n    v15 = -v14;\n    v16 = v14 * 0.5;\n    v17 = v15 * 0.5;\n    if ( v17 <= fminf(v16, v11) )\n    {\n      if ( v11 > v16 )\n        v21 = v16;\n    }\n    else\n    {\n      v21 = v17;\n    }\n    v18 = *(float *)(a1 + 348) * 0.5;\n    if ( (float)(40.0 - v18) <= fminf(v18 + 40.0, v22) )\n    {\n      if ( v22 > (float)(v18 + 40.0) )\n        v22 = v18 + 40.0;\n    }\n    else\n    {\n      v22 = 40.0 - v18;\n    }\n    v19 = *(__int64 **)(a1 + 320);\n    v20 = *v19;\n    LOBYTE(v20) = 1;\n    (*(void (__fastcall **)(__int64 *, __int64))(*v19 + 336))(v19, v20);\n    (*(void (__fastcall **)(_QWORD, float *))(**(_QWORD **)(a1 + 320) + 184LL))(*(_QWORD *)(a1 + 320), &v21);\n    return v12;\n  }\n  else if ( *(float *)(a1 + 376) <= fabs(*(float *)a2) )\n  {\n    return (unsigned int)(*(float *)a2 >= 0.0) + 2;\n  }\n  else\n  {\n    return 5;\n  }\n}", "assembly": "; \n; GJUINode::activeTouchTest from 0x140674280 to 0x140674455 (469 bytes)\n; \n; 3 xrefs:\n; > UILayer::processUINodeTouch @ 0x140673805\n; > GJUINode::touchTest @ 0x140674257\n; > <???> @ 0x140932450\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 11:35:55 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140674280\npush    rdi                                                            ; +0x5, 0x140674285\nsub     rsp, 30h                                                       ; +0x6, 0x140674286\ncmp     byte ptr [rcx+17Dh], 0                                         ; +0xa, 0x14067428a\nmov     rdi, rcx                                                       ; +0x11, 0x140674291\njnz     short loc_1406742DA                                            ; +0x14, 0x140674294\nmovss   xmm2, dword ptr [rdx]                                          ; +0x16, 0x140674296\nmovss   xmm0, dword ptr [rcx+178h]                                     ; +0x1a, 0x14067429a\nmovaps  xmm1, xmm2                                                     ; +0x22, 0x1406742a2\nandps   xmm1, cs:xmmword_140836C90                                     ; +0x25, 0x1406742a5\ncomiss  xmm0, xmm1                                                     ; +0x2c, 0x1406742ac\njbe     short loc_1406742C1                                            ; +0x2f, 0x1406742af\nmov     eax, 5                                                         ; +0x31, 0x1406742b1\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x36, 0x1406742b6\nadd     rsp, 30h                                                       ; +0x3b, 0x1406742bb\npop     rdi                                                            ; +0x3f, 0x1406742bf\nretn                                                                   ; +0x40, 0x1406742c0\nxor     ebx, ebx                                                       ; +0x41, 0x1406742c1\nxorps   xmm0, xmm0                                                     ; +0x43, 0x1406742c3\ncomiss  xmm2, xmm0                                                     ; +0x46, 0x1406742c6\nsetnb   bl                                                             ; +0x49, 0x1406742c9\nlea     eax, [rbx+2]                                                   ; +0x4c, 0x1406742cc\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x4f, 0x1406742cf\nadd     rsp, 30h                                                       ; +0x54, 0x1406742d4\npop     rdi                                                            ; +0x58, 0x1406742d8\nretn                                                                   ; +0x59, 0x1406742d9\nlea     rcx, [rsp+38h+arg_10]                                          ; +0x5a, 0x1406742da\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x5f, 0x1406742df\ncall    cs:??0CCPoint@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const &) ; +0x64, 0x1406742e4\nmov     rcx, [rdi+140h]                                                ; +0x6a, 0x1406742ea\nmov     rbx, rax                                                       ; +0x71, 0x1406742f1\nmov     rdx, [rcx]                                                     ; +0x74, 0x1406742f4\ncall    qword ptr [rdx+0C8h]                                           ; +0x77, 0x1406742f7\nmovss   xmm2, dword ptr [rbx+4]                                        ; +0x7d, 0x1406742fd\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x82, 0x140674302\nmovss   xmm6, cs:dword_140835674                                       ; +0x87, 0x140674307\naddss   xmm2, xmm6                                                     ; +0x8f, 0x14067430f\nmovss   xmm1, dword ptr [rax]                                          ; +0x93, 0x140674313\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x97, 0x140674317\nmov     rcx, [rdi+140h]                                                ; +0x9d, 0x14067431d\nmov     rax, [rcx]                                                     ; +0xa4, 0x140674324\ncall    qword ptr [rax+0C8h]                                           ; +0xa7, 0x140674327\nmovss   xmm1, dword ptr [rbx]                                          ; +0xad, 0x14067432d\nmovss   xmm0, dword ptr [rdi+178h]                                     ; +0xb1, 0x140674331\nmovaps  xmm3, xmm1                                                     ; +0xb9, 0x140674339\nsubss   xmm3, dword ptr [rax]                                          ; +0xbc, 0x14067433c\nmovaps  xmm4, xmm3                                                     ; +0xc0, 0x140674340\nandps   xmm4, cs:xmmword_140836C90                                     ; +0xc3, 0x140674343\ncomiss  xmm0, xmm4                                                     ; +0xca, 0x14067434a\njbe     short loc_140674359                                            ; +0xcd, 0x14067434d\nmovss   xmm1, [rsp+38h+arg_0]                                          ; +0xcf, 0x14067434f\nxor     ebx, ebx                                                       ; +0xd5, 0x140674355\njmp     short loc_140674397                                            ; +0xd7, 0x140674357\nmovss   xmm0, dword ptr [rdi+174h]                                     ; +0xd9, 0x140674359\nxorps   xmm2, xmm2                                                     ; +0xe1, 0x140674361\ncomiss  xmm4, xmm0                                                     ; +0xe4, 0x140674364\njbe     short loc_140674386                                            ; +0xe7, 0x140674367\ncomiss  xmm3, xmm2                                                     ; +0xe9, 0x140674369\njbe     short loc_14067437A                                            ; +0xec, 0x14067436c\nsubss   xmm1, xmm0                                                     ; +0xee, 0x14067436e\nmovss   [rsp+38h+arg_0], xmm1                                          ; +0xf2, 0x140674372\njmp     short loc_14067438C                                            ; +0xf8, 0x140674378\naddss   xmm1, xmm0                                                     ; +0xfa, 0x14067437a\nmovss   [rsp+38h+arg_0], xmm1                                          ; +0xfe, 0x14067437e\njmp     short loc_14067438C                                            ; +0x104, 0x140674384\nmovss   xmm1, [rsp+38h+arg_0]                                          ; +0x106, 0x140674386\nxor     ebx, ebx                                                       ; +0x10c, 0x14067438c\ncomiss  xmm3, xmm2                                                     ; +0x10e, 0x14067438e\nsetnbe  bl                                                             ; +0x111, 0x140674391\nadd     ebx, 2                                                         ; +0x114, 0x140674394\nmovss   xmm2, dword ptr [rdi+158h]                                     ; +0x117, 0x140674397\nmovss   xmm4, cs:dword_140834F20                                       ; +0x11f, 0x14067439f\nmovaps  xmm3, xmm2                                                     ; +0x127, 0x1406743a7\nxorps   xmm2, cs:xmmword_140836CC0                                     ; +0x12a, 0x1406743aa\nmulss   xmm3, xmm4                                                     ; +0x131, 0x1406743b1\nmulss   xmm2, xmm4                                                     ; +0x135, 0x1406743b5\nmovaps  xmm0, xmm3                                                     ; +0x139, 0x1406743b9\nminss   xmm0, xmm1                                                     ; +0x13c, 0x1406743bc\ncomiss  xmm2, xmm0                                                     ; +0x140, 0x1406743c0\njbe     short loc_1406743CD                                            ; +0x143, 0x1406743c3\nmovss   [rsp+38h+arg_0], xmm2                                          ; +0x145, 0x1406743c5\njmp     short loc_1406743D8                                            ; +0x14b, 0x1406743cb\ncomiss  xmm1, xmm3                                                     ; +0x14d, 0x1406743cd\njbe     short loc_1406743D8                                            ; +0x150, 0x1406743d0\nmovss   [rsp+38h+arg_0], xmm3                                          ; +0x152, 0x1406743d2\nmovss   xmm0, dword ptr [rdi+15Ch]                                     ; +0x158, 0x1406743d8\nmovss   xmm2, [rsp+38h+arg_4]                                          ; +0x160, 0x1406743e0\nmulss   xmm0, xmm4                                                     ; +0x166, 0x1406743e6\nmovaps  xmm1, xmm0                                                     ; +0x16a, 0x1406743ea\naddss   xmm1, xmm6                                                     ; +0x16d, 0x1406743ed\nsubss   xmm6, xmm0                                                     ; +0x171, 0x1406743f1\nmovaps  xmm0, xmm1                                                     ; +0x175, 0x1406743f5\nminss   xmm0, xmm2                                                     ; +0x178, 0x1406743f8\ncomiss  xmm6, xmm0                                                     ; +0x17c, 0x1406743fc\njbe     short loc_140674409                                            ; +0x17f, 0x1406743ff\nmovss   [rsp+38h+arg_4], xmm6                                          ; +0x181, 0x140674401\njmp     short loc_140674414                                            ; +0x187, 0x140674407\ncomiss  xmm2, xmm1                                                     ; +0x189, 0x140674409\njbe     short loc_140674414                                            ; +0x18c, 0x14067440c\nmovss   [rsp+38h+arg_4], xmm1                                          ; +0x18e, 0x14067440e\nmov     rcx, [rdi+140h]                                                ; +0x194, 0x140674414\nmov     rdx, [rcx]                                                     ; +0x19b, 0x14067441b\nmov     r8, [rdx+150h]                                                 ; +0x19e, 0x14067441e\nmov     dl, 1                                                          ; +0x1a5, 0x140674425\ncall    r8                                                             ; +0x1a7, 0x140674427\nmov     rcx, [rdi+140h]                                                ; +0x1aa, 0x14067442a\nmov     rdx, [rcx]                                                     ; +0x1b1, 0x140674431\nmov     r8, [rdx+0B8h]                                                 ; +0x1b4, 0x140674434\nlea     rdx, [rsp+38h+arg_0]                                           ; +0x1bb, 0x14067443b\ncall    r8                                                             ; +0x1c0, 0x140674440\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x1c3, 0x140674443\nmov     eax, ebx                                                       ; +0x1c8, 0x140674448\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1ca, 0x14067444a\nadd     rsp, 30h                                                       ; +0x1cf, 0x14067444f\npop     rdi                                                            ; +0x1d3, 0x140674453\nretn                                                                   ; +0x1d4, 0x140674454", "xrefs": ["UILayer::processUINodeTouch @ 0x140673805", "GJUINode::touchTest @ 0x140674257", "<???> @ 0x140932450"], "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"}