{"type": "func", "start": 6442600496, "end": 6442600848, "name": "cocos2d::CCFollow::initWithTarget", "pseudocode": "// \n// cocos2d::CCFollow::initWithTarget from 0x180024830 to 0x180024990 (352 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCFollow::create @ 0x1800246d6\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801b9238\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:21:29 +0000\n// \n\nbool __fastcall cocos2d::CCFollow::initWithTarget(\n        cocos2d::CCFollow *this,\n        struct cocos2d::CCNode *a2,\n        const struct cocos2d::CCRect *a3)\n{\n  struct cocos2d::CCDirector *v6; // rax\n  float *v7; // rax\n  float v8; // xmm3_4\n  float v9; // xmm2_4\n  float v10; // xmm4_4\n  float v11; // xmm1_4\n  bool result; // al\n  float v13; // [rsp+30h] [rbp+8h] BYREF\n  float v14; // [rsp+34h] [rbp+Ch]\n  int v15; // [rsp+38h] [rbp+10h] BYREF\n\n  cocos2d::CCObject::retain(a2);\n  *((_QWORD *)this + 10) = a2;\n  *((_BYTE *)this + 88) = !cocos2d::CCRect::equals(a3, (const struct cocos2d::CCRect *)&unk_1801B2390);\n  *((_BYTE *)this + 89) = 0;\n  v6 = cocos2d::CCDirector::sharedDirector();\n  cocos2d::CCDirector::getWinSize(v6, &v13);\n  v7 = kmVec2Fill((float *)&v15, v13, v14);\n  cocos2d::CCSize::operator=((_DWORD *)this + 25, v7);\n  cocos2d::CCSize::operator*((float *)this + 25, (float *)&v15, 0.5);\n  cocos2d::CCSize::operator=((_DWORD *)this + 23, &v15);\n  if ( !*((_BYTE *)this + 88) )\n    return 1;\n  v8 = -(float)((float)(*((float *)a3 + 2) + *(float *)a3) - *((float *)this + 25));\n  *((float *)this + 27) = v8;\n  v9 = -*(float *)a3;\n  *((float *)this + 28) = v9;\n  v10 = -*((float *)a3 + 1);\n  *((float *)this + 29) = v10;\n  v11 = -(float)((float)(*((float *)a3 + 3) + *((float *)a3 + 1)) - *((float *)this + 26));\n  *((float *)this + 30) = v11;\n  if ( v8 > v9 )\n  {\n    v9 = (float)(v8 + v9) * 0.5;\n    *((float *)this + 27) = v9;\n    v8 = v9;\n    *((float *)this + 28) = v9;\n  }\n  if ( v11 > v10 )\n  {\n    v11 = (float)(v11 + v10) * 0.5;\n    *((float *)this + 30) = v11;\n    v10 = v11;\n    *((float *)this + 29) = v11;\n  }\n  if ( v10 != v11 )\n    return 1;\n  result = 1;\n  if ( v8 == v9 )\n    *((_BYTE *)this + 89) = 1;\n  return result;\n}", "assembly": "; \n; cocos2d::CCFollow::initWithTarget from 0x180024830 to 0x180024990 (352 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCFollow::create @ 0x1800246d6\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801b9238\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:21:29 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x180024830\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x180024835\npush    rdi                                                            ; +0xa, 0x18002483a\nsub     rsp, 20h                                                       ; +0xb, 0x18002483b\nmov     rdi, rcx                                                       ; +0xf, 0x18002483f\nmov     rsi, r8                                                        ; +0x12, 0x180024842\nmov     rcx, rdx; this                                                 ; +0x15, 0x180024845\nmov     rbx, rdx                                                       ; +0x18, 0x180024848\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x1b, 0x18002484b\nlea     rdx, unk_1801B2390; struct cocos2d::CCRect *                   ; +0x20, 0x180024850\nmov     [rdi+50h], rbx                                                 ; +0x27, 0x180024857\nmov     rcx, rsi; this                                                 ; +0x2b, 0x18002485b\ncall    ?equals@CCRect@cocos2d@@QEBA_NAEBV12@@Z; cocos2d::CCRect::equals(cocos2d::CCRect const &) ; +0x2e, 0x18002485e\nxor     al, 1                                                          ; +0x33, 0x180024863\nmov     [rdi+58h], al                                                  ; +0x35, 0x180024865\nmov     byte ptr [rdi+59h], 0                                          ; +0x38, 0x180024868\ncall    ?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x3c, 0x18002486c\nmov     rcx, rax                                                       ; +0x41, 0x180024871\nlea     rdx, [rsp+28h+arg_0]                                           ; +0x44, 0x180024874\ncall    ?getWinSize@CCDirector@cocos2d@@QEAA?AVCCSize@2@XZ; cocos2d::CCDirector::getWinSize(void) ; +0x49, 0x180024879\nmovss   xmm2, [rsp+28h+arg_4]                                          ; +0x4e, 0x18002487e\nlea     rcx, [rsp+28h+arg_8]                                           ; +0x54, 0x180024884\nmovss   xmm1, [rsp+28h+arg_0]                                          ; +0x59, 0x180024889\ncall    kmVec2Fill                                                     ; +0x5f, 0x18002488f\nmov     rdx, rax                                                       ; +0x64, 0x180024894\nlea     rcx, [rdi+64h]                                                 ; +0x67, 0x180024897\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x6b, 0x18002489b\nmovss   xmm2, cs:dword_1800EC358                                       ; +0x70, 0x1800248a0\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x78, 0x1800248a8\nlea     rcx, [rdi+64h]                                                 ; +0x7d, 0x1800248ad\ncall    ??DCCSize@cocos2d@@QEBA?AV01@M@Z; cocos2d::CCSize::operator*(float) ; +0x81, 0x1800248b1\nlea     rcx, [rdi+5Ch]                                                 ; +0x86, 0x1800248b6\nlea     rdx, [rsp+28h+arg_8]                                           ; +0x8a, 0x1800248ba\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0x8f, 0x1800248bf\ncmp     byte ptr [rdi+58h], 0                                          ; +0x94, 0x1800248c4\njz      loc_18002497E                                                  ; +0x98, 0x1800248c8\nmovss   xmm3, dword ptr [rsi+8]                                        ; +0x9e, 0x1800248ce\naddss   xmm3, dword ptr [rsi]                                          ; +0xa3, 0x1800248d3\nmovss   xmm0, dword ptr cs:xmmword_1800EC220                           ; +0xa7, 0x1800248d7\nsubss   xmm3, dword ptr [rdi+64h]                                      ; +0xaf, 0x1800248df\nxorps   xmm3, xmm0                                                     ; +0xb4, 0x1800248e4\nmovss   dword ptr [rdi+6Ch], xmm3                                      ; +0xb7, 0x1800248e7\nmovss   xmm2, dword ptr [rsi]                                          ; +0xbc, 0x1800248ec\nxorps   xmm2, xmm0                                                     ; +0xc0, 0x1800248f0\ncomiss  xmm3, xmm2                                                     ; +0xc3, 0x1800248f3\nmovss   dword ptr [rdi+70h], xmm2                                      ; +0xc6, 0x1800248f6\nmovss   xmm4, dword ptr [rsi+4]                                        ; +0xcb, 0x1800248fb\nxorps   xmm4, xmm0                                                     ; +0xd0, 0x180024900\nmovss   dword ptr [rdi+74h], xmm4                                      ; +0xd3, 0x180024903\nmovss   xmm1, dword ptr [rsi+0Ch]                                      ; +0xd8, 0x180024908\naddss   xmm1, dword ptr [rsi+4]                                        ; +0xdd, 0x18002490d\nsubss   xmm1, dword ptr [rdi+68h]                                      ; +0xe2, 0x180024912\nxorps   xmm1, xmm0                                                     ; +0xe7, 0x180024917\nmovss   dword ptr [rdi+78h], xmm1                                      ; +0xea, 0x18002491a\njbe     short loc_18002493D                                            ; +0xef, 0x18002491f\naddss   xmm3, xmm2                                                     ; +0xf1, 0x180024921\nmovaps  xmm2, xmm3                                                     ; +0xf5, 0x180024925\nmulss   xmm2, cs:dword_1800EC358                                       ; +0xf8, 0x180024928\nmovss   dword ptr [rdi+6Ch], xmm2                                      ; +0x100, 0x180024930\nmovaps  xmm3, xmm2                                                     ; +0x105, 0x180024935\nmovss   dword ptr [rdi+70h], xmm2                                      ; +0x108, 0x180024938\ncomiss  xmm1, xmm4                                                     ; +0x10d, 0x18002493d\njbe     short loc_18002495B                                            ; +0x110, 0x180024940\naddss   xmm1, xmm4                                                     ; +0x112, 0x180024942\nmulss   xmm1, cs:dword_1800EC358                                       ; +0x116, 0x180024946\nmovss   dword ptr [rdi+78h], xmm1                                      ; +0x11e, 0x18002494e\nmovaps  xmm4, xmm1                                                     ; +0x123, 0x180024953\nmovss   dword ptr [rdi+74h], xmm1                                      ; +0x126, 0x180024956\nucomiss xmm4, xmm1                                                     ; +0x12b, 0x18002495b\njp      short loc_18002497E                                            ; +0x12e, 0x18002495e\njnz     short loc_18002497E                                            ; +0x130, 0x180024960\nucomiss xmm3, xmm2                                                     ; +0x132, 0x180024962\njp      short loc_18002497E                                            ; +0x135, 0x180024965\nmov     al, 1                                                          ; +0x137, 0x180024967\njnz     short loc_180024980                                            ; +0x139, 0x180024969\nmov     [rdi+59h], al                                                  ; +0x13b, 0x18002496b\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x13e, 0x18002496e\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x143, 0x180024973\nadd     rsp, 20h                                                       ; +0x148, 0x180024978\npop     rdi                                                            ; +0x14c, 0x18002497c\nretn                                                                   ; +0x14d, 0x18002497d\nmov     al, 1                                                          ; +0x14e, 0x18002497e\nmov     rbx, [rsp+28h+arg_10]                                          ; +0x150, 0x180024980\nmov     rsi, [rsp+28h+arg_18]                                          ; +0x155, 0x180024985\nadd     rsp, 20h                                                       ; +0x15a, 0x18002498a\npop     rdi                                                            ; +0x15e, 0x18002498e\nretn                                                                   ; +0x15f, 0x18002498f", "xrefs": ["cocos2d::CCFollow::create @ 0x1800246d6", "<???> @ 0x18014cf68", "<???> @ 0x1801b9238"], "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"}