{"type": "func", "start": 5371956432, "end": 5371957124, "name": "GJBaseGameLayer::playerCircleCollision", "pseudocode": "// \n// GJBaseGameLayer::playerCircleCollision from 0x140318cd0 to 0x140318f84 (692 bytes)\n// \n// 5 xrefs:\n// > GJBaseGameLayer::checkCollisions @ 0x14031bb77\n// > GJBaseGameLayer::collisionCheckObjects @ 0x14031be78\n// > <???> @ 0x1408b4f68\n// > <???> @ 0x1408b4f78\n// > <???> @ 0x14091ea7c\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:30:19 +0000\n// \n\nbool __fastcall GJBaseGameLayer::playerCircleCollision(__int64 a1, __int64 a2, float *a3)\n{\n  __int64 (__fastcall *v5)(__int64); // rdi\n  const struct cocos2d::CCPoint *v6; // rbx\n  cocos2d *v7; // rax\n  const struct cocos2d::CCPoint *v8; // r8\n  float v9; // xmm0_4\n  float v10; // xmm6_4\n  float v11; // xmm6_4\n  bool result; // al\n  const struct cocos2d::CCRect *v13; // rax\n  float v14; // xmm6_4\n  float v15; // xmm6_4\n  float MaxX; // xmm7_4\n  float MinX; // xmm8_4\n  float MaxY; // xmm10_4\n  float MinY; // xmm9_4\n  cocos2d *v20; // rax\n  const struct cocos2d::CCPoint *v21; // r8\n  cocos2d *v22; // rax\n  const struct cocos2d::CCPoint *v23; // r8\n  cocos2d *v24; // rax\n  const struct cocos2d::CCPoint *v25; // r8\n  cocos2d *v26; // rax\n  const struct cocos2d::CCPoint *v27; // r8\n  _BYTE v28[8]; // [rsp+20h] [rbp-98h] BYREF\n  _BYTE v29[8]; // [rsp+28h] [rbp-90h] BYREF\n  _BYTE v30[8]; // [rsp+30h] [rbp-88h] BYREF\n  _BYTE v31[24]; // [rsp+38h] [rbp-80h] BYREF\n  char v32; // [rsp+C0h] [rbp+8h] BYREF\n  char v33; // [rsp+D8h] [rbp+20h] BYREF\n\n  if ( *(_BYTE *)(*(_QWORD *)(a1 + 3528) + 463LL) )\n  {\n    v5 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 200LL);\n    v6 = (const struct cocos2d::CCPoint *)(*(__int64 (__fastcall **)(float *, char *))(*(_QWORD *)a3 + 1208LL))(\n                                            a3,\n                                            &v32);\n    v7 = (cocos2d *)v5(a2);\n    v9 = cocos2d::ccpDistance(v7, v6, v8);\n    v10 = a3[290];\n    if ( v10 == 1.0 && a3[291] == 1.0 )\n      v11 = a3[227];\n    else\n      v11 = fmaxf(v10, a3[291]) * a3[227];\n    return (float)((float)(*(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2) + 8) * 0.5) + v11) >= v9;\n  }\n  else\n  {\n    v13 = (const struct cocos2d::CCRect *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 1184LL))(a2);\n    cocos2d::CCRect::CCRect((cocos2d::CCRect *)v31, v13);\n    v14 = a3[290];\n    if ( v14 == 1.0 && a3[291] == 1.0 )\n      v15 = a3[227];\n    else\n      v15 = fmaxf(v14, a3[291]) * a3[227];\n    (*(void (__fastcall **)(float *, char *))(*(_QWORD *)a3 + 1208LL))(a3, &v32);\n    MaxX = cocos2d::CCRect::getMaxX((cocos2d::CCRect *)v31);\n    MinX = cocos2d::CCRect::getMinX((cocos2d::CCRect *)v31);\n    MaxY = cocos2d::CCRect::getMaxY((cocos2d::CCRect *)v31);\n    MinY = cocos2d::CCRect::getMinY((cocos2d::CCRect *)v31);\n    result = true;\n    if ( !cocos2d::CCRect::containsPoint((cocos2d::CCRect *)v31, (const struct cocos2d::CCPoint *)&v32) )\n    {\n      cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v33, MaxX, MaxY);\n      if ( v15 <= fabs(cocos2d::ccpDistance(v20, (const struct cocos2d::CCPoint *)&v32, v21)) )\n      {\n        cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, MaxX, MinY);\n        if ( v15 <= fabs(cocos2d::ccpDistance(v22, (const struct cocos2d::CCPoint *)&v32, v23)) )\n        {\n          cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v29, MinX, MinY);\n          if ( v15 <= COERCE_FLOAT(\n                        COERCE_UNSIGNED_INT(cocos2d::ccpDistance(v24, (const struct cocos2d::CCPoint *)&v32, v25))\n                      & 0x7FFFFFFF) )\n          {\n            cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, MinX, MaxY);\n            if ( v15 <= fabs(cocos2d::ccpDistance(v26, (const struct cocos2d::CCPoint *)&v32, v27)) )\n              return false;\n          }\n        }\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; GJBaseGameLayer::playerCircleCollision from 0x140318cd0 to 0x140318f84 (692 bytes)\n; \n; 5 xrefs:\n; > GJBaseGameLayer::checkCollisions @ 0x14031bb77\n; > GJBaseGameLayer::collisionCheckObjects @ 0x14031be78\n; > <???> @ 0x1408b4f68\n; > <???> @ 0x1408b4f78\n; > <???> @ 0x14091ea7c\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:30:19 +0000\n; \nmov     r11, rsp                                                       ; +0x0, 0x140318cd0\npush    rsi                                                            ; +0x3, 0x140318cd3\npush    r14                                                            ; +0x4, 0x140318cd4\nsub     rsp, 0A8h                                                      ; +0x6, 0x140318cd6\nmov     rax, [rcx+0DC8h]                                               ; +0xd, 0x140318cdd\nmov     rsi, r8                                                        ; +0x14, 0x140318ce4\nmovaps  xmmword ptr [r11-28h], xmm6                                    ; +0x17, 0x140318ce7\nmov     r14, rdx                                                       ; +0x1c, 0x140318cec\nmovaps  xmmword ptr [r11-38h], xmm7                                    ; +0x1f, 0x140318cef\ncmp     byte ptr [rax+1CFh], 0                                         ; +0x24, 0x140318cf4\njz      loc_140318DB6                                                  ; +0x2b, 0x140318cfb\nmov     rax, [r8]                                                      ; +0x31, 0x140318d01\nmov     rcx, r8                                                        ; +0x34, 0x140318d04\nmov     [r11+10h], rbx                                                 ; +0x37, 0x140318d07\nmov     [r11-18h], rdi                                                 ; +0x3b, 0x140318d0b\nmov     r9, [rax+4B8h]                                                 ; +0x3f, 0x140318d0f\nmov     rax, [rdx]                                                     ; +0x46, 0x140318d16\nlea     rdx, [r11+8]                                                   ; +0x49, 0x140318d19\nmov     rdi, [rax+0C8h]                                                ; +0x4d, 0x140318d1d\ncall    r9                                                             ; +0x54, 0x140318d24\nmov     rcx, r14                                                       ; +0x57, 0x140318d27\nmov     rbx, rax                                                       ; +0x5a, 0x140318d2a\ncall    rdi                                                            ; +0x5d, 0x140318d2d\nmov     rcx, rax                                                       ; +0x5f, 0x140318d2f\nmov     rdx, rbx                                                       ; +0x62, 0x140318d32\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x65, 0x140318d35\nmovss   xmm2, cs:flt_140835080                                         ; +0x6b, 0x140318d3b\nmovaps  xmm7, xmm0                                                     ; +0x73, 0x140318d43\nmovss   xmm6, dword ptr [rsi+488h]                                     ; +0x76, 0x140318d46\nucomiss xmm6, xmm2                                                     ; +0x7e, 0x140318d4e\nmov     rdi, [rsp+0B8h+var_18]                                         ; +0x81, 0x140318d51\nmov     rbx, [rsp+0B8h+arg_8]                                          ; +0x89, 0x140318d59\njp      short loc_140318D7E                                            ; +0x91, 0x140318d61\njnz     short loc_140318D7E                                            ; +0x93, 0x140318d63\nmovss   xmm1, dword ptr [rsi+48Ch]                                     ; +0x95, 0x140318d65\nucomiss xmm1, xmm2                                                     ; +0x9d, 0x140318d6d\njp      short loc_140318D7E                                            ; +0xa0, 0x140318d70\njnz     short loc_140318D7E                                            ; +0xa2, 0x140318d72\nmovss   xmm6, dword ptr [rsi+38Ch]                                     ; +0xa4, 0x140318d74\njmp     short loc_140318D8E                                            ; +0xac, 0x140318d7c\nmaxss   xmm6, dword ptr [rsi+48Ch]                                     ; +0xae, 0x140318d7e\nmulss   xmm6, dword ptr [rsi+38Ch]                                     ; +0xb6, 0x140318d86\nmov     rax, [r14]                                                     ; +0xbe, 0x140318d8e\nmov     rcx, r14                                                       ; +0xc1, 0x140318d91\ncall    qword ptr [rax+4A0h]                                           ; +0xc4, 0x140318d94\nmovss   xmm0, dword ptr [rax+8]                                        ; +0xca, 0x140318d9a\nmulss   xmm0, cs:dword_140834F20                                       ; +0xcf, 0x140318d9f\naddss   xmm0, xmm6                                                     ; +0xd7, 0x140318da7\ncomiss  xmm0, xmm7                                                     ; +0xdb, 0x140318dab\nsetnb   al                                                             ; +0xde, 0x140318dae\njmp     loc_140318F69                                                  ; +0xe1, 0x140318db1\nmov     rax, [rdx]                                                     ; +0xe6, 0x140318db6\nmov     rcx, r14                                                       ; +0xe9, 0x140318db9\nmovaps  [rsp+0B8h+var_48], xmm8                                        ; +0xec, 0x140318dbc\nmovaps  [rsp+0B8h+var_58], xmm9                                        ; +0xf2, 0x140318dc2\nmovaps  [rsp+0B8h+var_68], xmm10                                       ; +0xf8, 0x140318dc8\ncall    qword ptr [rax+4A0h]                                           ; +0xfe, 0x140318dce\nmov     rdx, rax                                                       ; +0x104, 0x140318dd4\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x107, 0x140318dd7\ncall    cs:??0CCRect@cocos2d@@QEAA@AEBV01@@Z; cocos2d::CCRect::CCRect(cocos2d::CCRect const &) ; +0x10c, 0x140318ddc\nmovss   xmm1, cs:flt_140835080                                         ; +0x112, 0x140318de2\nmovss   xmm6, dword ptr [rsi+488h]                                     ; +0x11a, 0x140318dea\nucomiss xmm6, xmm1                                                     ; +0x122, 0x140318df2\njp      short loc_140318E12                                            ; +0x125, 0x140318df5\njnz     short loc_140318E12                                            ; +0x127, 0x140318df7\nmovss   xmm0, dword ptr [rsi+48Ch]                                     ; +0x129, 0x140318df9\nucomiss xmm0, xmm1                                                     ; +0x131, 0x140318e01\njp      short loc_140318E12                                            ; +0x134, 0x140318e04\njnz     short loc_140318E12                                            ; +0x136, 0x140318e06\nmovss   xmm6, dword ptr [rsi+38Ch]                                     ; +0x138, 0x140318e08\njmp     short loc_140318E22                                            ; +0x140, 0x140318e10\nmaxss   xmm6, dword ptr [rsi+48Ch]                                     ; +0x142, 0x140318e12\nmulss   xmm6, dword ptr [rsi+38Ch]                                     ; +0x14a, 0x140318e1a\nmov     rax, [rsi]                                                     ; +0x152, 0x140318e22\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x155, 0x140318e25\nmov     rcx, rsi                                                       ; +0x15d, 0x140318e2d\ncall    qword ptr [rax+4B8h]                                           ; +0x160, 0x140318e30\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x166, 0x140318e36\ncall    cs:?getMaxX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxX(void) ; +0x16b, 0x140318e3b\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x171, 0x140318e41\nmovaps  xmm7, xmm0                                                     ; +0x176, 0x140318e46\ncall    cs:?getMinX@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinX(void) ; +0x179, 0x140318e49\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x17f, 0x140318e4f\nmovaps  xmm8, xmm0                                                     ; +0x184, 0x140318e54\ncall    cs:?getMaxY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMaxY(void) ; +0x188, 0x140318e58\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x18e, 0x140318e5e\nmovaps  xmm10, xmm0                                                    ; +0x193, 0x140318e63\ncall    cs:?getMinY@CCRect@cocos2d@@QEBAMXZ; cocos2d::CCRect::getMinY(void) ; +0x197, 0x140318e67\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x19d, 0x140318e6d\nmovaps  xmm9, xmm0                                                     ; +0x1a5, 0x140318e75\nlea     rcx, [rsp+0B8h+var_80]                                         ; +0x1a9, 0x140318e79\ncall    cs:?containsPoint@CCRect@cocos2d@@QEBA_NAEBVCCPoint@2@@Z; cocos2d::CCRect::containsPoint(cocos2d::CCPoint const &) ; +0x1ae, 0x140318e7e\ntest    al, al                                                         ; +0x1b4, 0x140318e84\njnz     loc_140318F55                                                  ; +0x1b6, 0x140318e86\nmovaps  xmm2, xmm10                                                    ; +0x1bc, 0x140318e8c\nlea     rcx, [rsp+0B8h+arg_18]                                         ; +0x1c0, 0x140318e90\nmovaps  xmm1, xmm7                                                     ; +0x1c8, 0x140318e98\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1cb, 0x140318e9b\nmov     rcx, rax                                                       ; +0x1d1, 0x140318ea1\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x1d4, 0x140318ea4\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x1dc, 0x140318eac\nandps   xmm0, cs:xmmword_140836C90                                     ; +0x1e2, 0x140318eb2\ncomiss  xmm6, xmm0                                                     ; +0x1e9, 0x140318eb9\nja      loc_140318F55                                                  ; +0x1ec, 0x140318ebc\nmovaps  xmm2, xmm9                                                     ; +0x1f2, 0x140318ec2\nlea     rcx, [rsp+0B8h+var_98]                                         ; +0x1f6, 0x140318ec6\nmovaps  xmm1, xmm7                                                     ; +0x1fb, 0x140318ecb\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x1fe, 0x140318ece\nmov     rcx, rax                                                       ; +0x204, 0x140318ed4\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x207, 0x140318ed7\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x20f, 0x140318edf\nandps   xmm0, cs:xmmword_140836C90                                     ; +0x215, 0x140318ee5\ncomiss  xmm6, xmm0                                                     ; +0x21c, 0x140318eec\nja      short loc_140318F55                                            ; +0x21f, 0x140318eef\nmovaps  xmm2, xmm9                                                     ; +0x221, 0x140318ef1\nlea     rcx, [rsp+0B8h+var_90]                                         ; +0x225, 0x140318ef5\nmovaps  xmm1, xmm8                                                     ; +0x22a, 0x140318efa\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x22e, 0x140318efe\nmov     rcx, rax                                                       ; +0x234, 0x140318f04\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x237, 0x140318f07\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x23f, 0x140318f0f\nandps   xmm0, cs:xmmword_140836C90                                     ; +0x245, 0x140318f15\ncomiss  xmm6, xmm0                                                     ; +0x24c, 0x140318f1c\nja      short loc_140318F55                                            ; +0x24f, 0x140318f1f\nmovaps  xmm2, xmm10                                                    ; +0x251, 0x140318f21\nlea     rcx, [rsp+0B8h+var_88]                                         ; +0x255, 0x140318f25\nmovaps  xmm1, xmm8                                                     ; +0x25a, 0x140318f2a\ncall    cs:??0CCPoint@cocos2d@@QEAA@MM@Z; cocos2d::CCPoint::CCPoint(float,float) ; +0x25e, 0x140318f2e\nmov     rcx, rax                                                       ; +0x264, 0x140318f34\nlea     rdx, [rsp+0B8h+arg_0]                                          ; +0x267, 0x140318f37\ncall    cs:?ccpDistance@cocos2d@@YAMAEBVCCPoint@1@0@Z; cocos2d::ccpDistance(cocos2d::CCPoint const &,cocos2d::CCPoint const &) ; +0x26f, 0x140318f3f\nandps   xmm0, cs:xmmword_140836C90                                     ; +0x275, 0x140318f45\ncomiss  xmm6, xmm0                                                     ; +0x27c, 0x140318f4c\nja      short loc_140318F55                                            ; +0x27f, 0x140318f4f\nxor     al, al                                                         ; +0x281, 0x140318f51\njmp     short loc_140318F57                                            ; +0x283, 0x140318f53\nmov     al, 1                                                          ; +0x285, 0x140318f55\nmovaps  xmm10, [rsp+0B8h+var_68]                                       ; +0x287, 0x140318f57\nmovaps  xmm9, [rsp+0B8h+var_58]                                        ; +0x28d, 0x140318f5d\nmovaps  xmm8, [rsp+0B8h+var_48]                                        ; +0x293, 0x140318f63\nmovaps  xmm6, [rsp+0B8h+var_28]                                        ; +0x299, 0x140318f69\nmovaps  xmm7, [rsp+0B8h+var_38]                                        ; +0x2a1, 0x140318f71\nadd     rsp, 0A8h                                                      ; +0x2a9, 0x140318f79\npop     r14                                                            ; +0x2b0, 0x140318f80\npop     rsi                                                            ; +0x2b2, 0x140318f82\nretn                                                                   ; +0x2b3, 0x140318f83", "xrefs": ["GJBaseGameLayer::checkCollisions @ 0x14031bb77", "GJBaseGameLayer::collisionCheckObjects @ 0x14031be78", "<???> @ 0x1408b4f68", "<???> @ 0x1408b4f78", "<???> @ 0x14091ea7c"], "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"}