{"type": "func", "start": 4296357904, "end": 4296358447, "name": "GJBaseGameLayer::checkRepellPlayer", "pseudocode": "// \n// GJBaseGameLayer::checkRepellPlayer from 0x100153810 to 0x100153a2f (543 bytes)\n// \n// 1 xrefs:\n// > GJBaseGameLayer::update @ 0x1001528d7\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\nvoid __fastcall GJBaseGameLayer::checkRepellPlayer(GJBaseGameLayer *a1)\n{\n  __m128 v1; // xmm0\n  PlayerObject *m_player1; // rax\n  PlayerObject *m_player2; // rcx\n  __m128 v5; // xmm1\n  PlayerObject *v6; // rbx\n  PlayerObject *v7; // rax\n  PlayerObject *v8; // rdi\n  __m128 v9; // xmm1\n  __int16 v10; // r13\n  GLubyte b; // r12\n  CCCircleWave *v12; // r15\n  __m128 v13; // [rsp-78h] [rbp-78h]\n  __int64 v14; // [rsp-60h] [rbp-60h] BYREF\n  __m128 v15; // [rsp-58h] [rbp-58h]\n  __m128 v16; // [rsp-48h] [rbp-48h]\n\n  if ( a1->m_gameState.m_isDualMode )\n  {\n    m_player1 = a1->m_player1;\n    if ( m_player1->m_isBall )\n    {\n      m_player2 = a1->m_player2;\n      if ( m_player2->m_isBall\n        && !a1->m_levelSettings->m_twoPlayerMode\n        && m_player1->m_isUpsideDown == m_player2->m_isUpsideDown )\n      {\n        *(double *)v1.i64 = ((double (__fastcall *)(PlayerObject *))m_player1->getScaleX)(a1->m_player1);\n        v16 = v1;\n        *(double *)v1.i64 = ((double (__fastcall *)(PlayerObject *))a1->m_player2->getScaleX)(a1->m_player2);\n        v5 = _mm_mul_ps(_mm_mul_ps(_mm_insert_ps(v16, v1, 16), (__m128)xmmword_100816570), (__m128)xmmword_100816970);\n        v16 = v5;\n        v13 = _mm_movehdup_ps(v5);\n        v5.f32[0] = (float)(v5.f32[0] + v13.f32[0]) + 5.0;\n        v15 = v5;\n        v5.i32[0] = *(_DWORD *)(((__int64 (__fastcall *)(PlayerObject *))a1->m_player1->getPosition)(a1->m_player1) + 4);\n        if ( v15.f32[0] > fabs(\n                            v5.f32[0]\n                          - *(float *)(((__int64 (__fastcall *)(PlayerObject *))a1->m_player2->getPosition)(a1->m_player2)\n                                     + 4)) )\n        {\n          v6 = a1->m_player1;\n          v7 = a1->m_player2;\n          if ( v6->m_isOnGround2 )\n          {\n            v8 = a1->m_player2;\n          }\n          else\n          {\n            if ( !v7->m_isOnGround2 )\n              return;\n            v16 = v13;\n            v8 = v6;\n            v6 = v7;\n          }\n          PlayerObject::hardFlipGravity(v8);\n          if ( !a1->m_isEditor )\n          {\n            v9 = v16;\n            v15.f32[0] = v16.f32[0] + 2.0;\n            v9.f32[0] = v16.f32[0] * 4.0;\n            v16 = v9;\n            v10 = *(_WORD *)&v6->m_playerColor1.r;\n            b = v6->m_playerColor1.b;\n            ((void (__fastcall *)(PlayerObject *))v6->getPosition)(v6);\n            sub_10028CC60(&v14);\n            v12 = CCCircleWave::create(v15.f32[0], v16.f32[0], 0.30000001, 0, 0);\n            v12->m_lineWidth = 4;\n            v12->m_color.b = b;\n            *(_WORD *)&v12->m_color.r = v10;\n            ((void (__fastcall *)(CCCircleWave *, __int64 *))v12->setPosition)(v12, &v14);\n            ((void (__fastcall *)(cocos2d::CCLayer *, CCCircleWave *, _QWORD))a1->m_objectLayer->addChild_0)(\n              a1->m_objectLayer,\n              v12,\n              0);\n            v12->m_circleMode = Outline;\n            CCCircleWave::followObject(v12, v6, 0);\n          }\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJBaseGameLayer::checkRepellPlayer from 0x100153810 to 0x100153a2f (543 bytes)\n; \n; 1 xrefs:\n; > GJBaseGameLayer::update @ 0x1001528d7\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\ncmp     byte ptr [rdi+3F2h], 1                                         ; +0x0, 0x100153810\njnz     locret_100153A2E                                               ; +0x7, 0x100153817\npush    rbp                                                            ; +0xd, 0x10015381d\nmov     rbp, rsp                                                       ; +0xe, 0x10015381e\npush    r15                                                            ; +0x11, 0x100153821\npush    r14                                                            ; +0x13, 0x100153823\npush    r13                                                            ; +0x15, 0x100153825\npush    r12                                                            ; +0x17, 0x100153827\npush    rbx                                                            ; +0x19, 0x100153829\nsub     rsp, 58h                                                       ; +0x1a, 0x10015382a\nmov     rax, [rdi+0CA0h]                                               ; +0x1e, 0x10015382e\ncmp     byte ptr [rax+96Bh], 1                                         ; +0x25, 0x100153835\njnz     loc_100153A20                                                  ; +0x2c, 0x10015383c\nmov     rcx, [rdi+0CA8h]                                               ; +0x32, 0x100153842\ncmp     byte ptr [rcx+96Bh], 1                                         ; +0x39, 0x100153849\njnz     loc_100153A20                                                  ; +0x40, 0x100153850\nmov     rdx, [rdi+0CB0h]                                               ; +0x46, 0x100153856\ncmp     byte ptr [rdx+154h], 0                                         ; +0x4d, 0x10015385d\njnz     loc_100153A20                                                  ; +0x54, 0x100153864\nmovzx   edx, byte ptr [rax+96Fh]                                       ; +0x5a, 0x10015386a\ncmp     dl, [rcx+96Fh]                                                 ; +0x61, 0x100153871\njnz     loc_100153A20                                                  ; +0x67, 0x100153877\nmov     rcx, [rax]                                                     ; +0x6d, 0x10015387d\nmov     r14, rdi                                                       ; +0x70, 0x100153880\nmov     rdi, rax                                                       ; +0x73, 0x100153883\ncall    qword ptr [rcx+88h]                                            ; +0x76, 0x100153886\nmovaps  xmmword ptr [rbp-40h], xmm0                                    ; +0x7c, 0x10015388c\nmov     rdi, [r14+0CA8h]                                               ; +0x80, 0x100153890\nmov     rax, [rdi]                                                     ; +0x87, 0x100153897\ncall    qword ptr [rax+88h]                                            ; +0x8a, 0x10015389a\nmovaps  xmm1, xmmword ptr [rbp-40h]                                    ; +0x90, 0x1001538a0\ninsertps xmm1, xmm0, 10h                                               ; +0x94, 0x1001538a4\nmulps   xmm1, cs:xmmword_100816570                                     ; +0x9a, 0x1001538aa\nmulps   xmm1, cs:xmmword_100816970                                     ; +0xa1, 0x1001538b1\nmovshdup xmm0, xmm1                                                    ; +0xa8, 0x1001538b8\nmovaps  xmmword ptr [rbp-40h], xmm1                                    ; +0xac, 0x1001538bc\nmovaps  xmmword ptr [rbp-70h], xmm0                                    ; +0xb0, 0x1001538c0\naddss   xmm1, xmm0                                                     ; +0xb4, 0x1001538c4\naddss   xmm1, cs:flt_100815088                                         ; +0xb8, 0x1001538c8\nmovaps  xmmword ptr [rbp-50h], xmm1                                    ; +0xc0, 0x1001538d0\nmov     rdi, [r14+0CA0h]                                               ; +0xc4, 0x1001538d4\nmov     rax, [rdi]                                                     ; +0xcb, 0x1001538db\ncall    qword ptr [rax+0C0h]                                           ; +0xce, 0x1001538de\nmovss   xmm0, dword ptr [rax+4]                                        ; +0xd4, 0x1001538e4\nmovaps  xmmword ptr [rbp-80h], xmm0                                    ; +0xd9, 0x1001538e9\nmov     rdi, [r14+0CA8h]                                               ; +0xdd, 0x1001538ed\nmov     rax, [rdi]                                                     ; +0xe4, 0x1001538f4\ncall    qword ptr [rax+0C0h]                                           ; +0xe7, 0x1001538f7\nmovaps  xmm1, xmmword ptr [rbp-80h]                                    ; +0xed, 0x1001538fd\nsubss   xmm1, dword ptr [rax+4]                                        ; +0xf1, 0x100153901\nandps   xmm1, cs:xmmword_100815500                                     ; +0xf6, 0x100153906\nmovaps  xmm0, xmmword ptr [rbp-50h]                                    ; +0xfd, 0x10015390d\nucomiss xmm0, xmm1                                                     ; +0x101, 0x100153911\njbe     loc_100153A20                                                  ; +0x104, 0x100153914\nmov     rbx, [r14+0CA0h]                                               ; +0x10a, 0x10015391a\nmov     rax, [r14+0CA8h]                                               ; +0x111, 0x100153921\ncmp     byte ptr [rbx+9BCh], 0                                         ; +0x118, 0x100153928\njz      short loc_100153936                                            ; +0x11f, 0x10015392f\nmov     rdi, rax                                                       ; +0x121, 0x100153931\njmp     short loc_100153951                                            ; +0x124, 0x100153934\ncmp     byte ptr [rax+9BCh], 1                                         ; +0x126, 0x100153936\njnz     loc_100153A20                                                  ; +0x12d, 0x10015393d\nmovaps  xmm0, xmmword ptr [rbp-70h]                                    ; +0x133, 0x100153943\nmovaps  xmmword ptr [rbp-40h], xmm0                                    ; +0x137, 0x100153947\nmov     rdi, rbx                                                       ; +0x13b, 0x10015394b\nmov     rbx, rax                                                       ; +0x13e, 0x10015394e\ncall    PlayerObject__hardFlipGravity                                  ; +0x141, 0x100153951\ncmp     byte ptr [r14+2F34h], 0                                        ; +0x146, 0x100153956\njnz     loc_100153A20                                                  ; +0x14e, 0x10015395e\nmovss   xmm0, cs:width                                                 ; +0x154, 0x100153964\nmovaps  xmm1, xmmword ptr [rbp-40h]                                    ; +0x15c, 0x10015396c\naddss   xmm0, xmm1                                                     ; +0x160, 0x100153970\nmovss   dword ptr [rbp-50h], xmm0                                      ; +0x164, 0x100153974\nmulss   xmm1, cs:dword_10081505C                                       ; +0x169, 0x100153979\nmovaps  xmmword ptr [rbp-40h], xmm1                                    ; +0x171, 0x100153981\nmovzx   r13d, word ptr [rbx+0A22h]                                     ; +0x175, 0x100153985\nmovzx   r12d, byte ptr [rbx+0A24h]                                     ; +0x17d, 0x10015398d\nmov     rax, [rbx]                                                     ; +0x185, 0x100153995\nmov     rdi, rbx                                                       ; +0x188, 0x100153998\ncall    qword ptr [rax+0C0h]                                           ; +0x18b, 0x10015399b\nlea     rdi, [rbp-58h]                                                 ; +0x191, 0x1001539a1\nmov     rsi, rax                                                       ; +0x195, 0x1001539a5\ncall    sub_10028CC60                                                  ; +0x198, 0x1001539a8\nmovss   xmm2, cs:dword_100815420                                       ; +0x19d, 0x1001539ad\nmovss   xmm0, dword ptr [rbp-50h]                                      ; +0x1a5, 0x1001539b5\nmovaps  xmm1, xmmword ptr [rbp-40h]                                    ; +0x1aa, 0x1001539ba\nxor     edi, edi                                                       ; +0x1ae, 0x1001539be\nxor     esi, esi                                                       ; +0x1b0, 0x1001539c0\ncall    CCCircleWave__create                                           ; +0x1b2, 0x1001539c2\nmov     r15, rax                                                       ; +0x1b7, 0x1001539c7\nmov     dword ptr [rax+164h], 4                                        ; +0x1ba, 0x1001539ca\nmov     [rax+156h], r12b                                               ; +0x1c4, 0x1001539d4\nmov     [rax+154h], r13w                                               ; +0x1cb, 0x1001539db\nmov     rax, [rax]                                                     ; +0x1d3, 0x1001539e3\nmov     rdi, r15                                                       ; +0x1d6, 0x1001539e6\nlea     rsi, [rbp-58h]                                                 ; +0x1d9, 0x1001539e9\ncall    qword ptr [rax+0B8h]                                           ; +0x1dd, 0x1001539ed\nmov     rdi, [r14+0EB8h]                                               ; +0x1e3, 0x1001539f3\nmov     rax, [rdi]                                                     ; +0x1ea, 0x1001539fa\nmov     rsi, r15                                                       ; +0x1ed, 0x1001539fd\nxor     edx, edx                                                       ; +0x1f0, 0x100153a00\ncall    qword ptr [rax+1C0h]                                           ; +0x1f2, 0x100153a02\nmov     dword ptr [r15+160h], 1                                        ; +0x1f8, 0x100153a08\nmov     rdi, r15                                                       ; +0x203, 0x100153a13\nmov     rsi, rbx                                                       ; +0x206, 0x100153a16\nxor     edx, edx                                                       ; +0x209, 0x100153a19\ncall    CCCircleWave__followObject                                     ; +0x20b, 0x100153a1b\nadd     rsp, 58h                                                       ; +0x210, 0x100153a20\npop     rbx                                                            ; +0x214, 0x100153a24\npop     r12                                                            ; +0x215, 0x100153a25\npop     r13                                                            ; +0x217, 0x100153a27\npop     r14                                                            ; +0x219, 0x100153a29\npop     r15                                                            ; +0x21b, 0x100153a2b\npop     rbp                                                            ; +0x21d, 0x100153a2d\nretn                                                                   ; +0x21e, 0x100153a2e", "xrefs": ["GJBaseGameLayer::update @ 0x1001528d7"], "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"}