{"type": "func", "start": 6442670256, "end": 6442670769, "name": "cocos2d::CCAnimate::initWithAnimation", "pseudocode": "// \n// cocos2d::CCAnimate::initWithAnimation from 0x1800358b0 to 0x180035ab1 (513 bytes)\n// \n// 7 xrefs:\n// > cocos2d::CCAnimate::copyWithZone @ 0x180032181\n// > cocos2d::CCAnimate::create @ 0x180033c06\n// > cocos2d::CCAnimate::reverse @ 0x180036185\n// > <???> @ 0x18013f088\n// > <???> @ 0x18013f098\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801ba864\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:35 +0000\n// \n\nchar __fastcall cocos2d::CCAnimate::initWithAnimation(cocos2d::CCAnimate *this, struct cocos2d::CCAnimation *a2)\n{\n  double v4; // xmm0_8\n  float v5; // xmm8_4\n  float v6; // xmm6_4\n  float v7; // xmm1_4\n  _QWORD *v8; // rbx\n  cocos2d::CCObject *v9; // rcx\n  unsigned int v10; // eax\n  __int64 v11; // r14\n  __int64 v12; // r15\n  size_t v13; // rcx\n  __int64 v14; // rbp\n  __int64 v15; // rax\n  __int64 v16; // rbx\n  float v17; // xmm7_4\n  unsigned int *v18; // rbx\n  __int64 v19; // rax\n  unsigned __int64 v20; // rbx\n  unsigned __int64 i; // rsi\n  __int64 v22; // rcx\n  float v23; // xmm0_4\n  float *v24; // rdx\n  float v25; // xmm0_4\n  float v27; // [rsp+80h] [rbp+8h] BYREF\n\n  v4 = (*(double (__fastcall **)(struct cocos2d::CCAnimation *))(*(_QWORD *)a2 + 72LL))(a2);\n  v5 = *(float *)&v4;\n  v6 = 0.0;\n  v7 = (float)*((int *)a2 + 21) * *(float *)&v4;\n  *((float *)this + 20) = v7;\n  if ( v7 == 0.0 )\n    *((_DWORD *)this + 20) = 872415232;\n  v8 = nullptr;\n  *((_BYTE *)this + 92) = 1;\n  *((_DWORD *)this + 22) = 0;\n  *((_DWORD *)this + 28) = 0;\n  if ( *((struct cocos2d::CCAnimation **)this + 12) != a2 )\n  {\n    cocos2d::CCObject::retain(a2);\n    v9 = *((cocos2d::CCObject **)this + 12);\n    if ( v9 )\n      cocos2d::CCObject::release(v9);\n    *((_QWORD *)this + 12) = a2;\n  }\n  *((_QWORD *)this + 15) = 0;\n  *((_DWORD *)this + 32) = 0;\n  v10 = cocos2d::CCArray::count(*((cocos2d::CCArray **)a2 + 9));\n  v11 = *((_QWORD *)this + 13);\n  v12 = v10;\n  if ( v10 > (unsigned __int64)((__int64)(*(_QWORD *)(v11 + 16) - *(_QWORD *)v11) >> 2) )\n  {\n    v13 = 4LL * v10;\n    v14 = (__int64)(*(_QWORD *)(v11 + 8) - *(_QWORD *)v11) >> 2;\n    if ( v13 )\n    {\n      if ( v13 < 0x1000 )\n      {\n        v8 = (_QWORD *)sub_1800E4AC0(v13);\n      }\n      else\n      {\n        if ( v13 + 39 < v13 )\n          Concurrency::cancel_current_task();\n        v15 = sub_1800E4AC0(v13 + 39);\n        if ( !v15 )\n          invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n        v8 = (_QWORD *)((v15 + 39) & 0xFFFFFFFFFFFFFFE0uLL);\n        *(v8 - 1) = v15;\n      }\n    }\n    memmove(v8, *(const void **)v11, *(_QWORD *)(v11 + 8) - *(_QWORD *)v11);\n    sub_180031E30(v11, (__int64)v8, v14, v12);\n  }\n  v16 = *((_QWORD *)a2 + 9);\n  v17 = *(float *)&v4 / *((float *)a2 + 14);\n  if ( v16 )\n  {\n    v18 = *(unsigned int **)(v16 + 56);\n    v19 = *v18;\n    if ( (_DWORD)v19 )\n    {\n      v20 = *((_QWORD *)v18 + 2);\n      for ( i = v20 + 8 * (v19 - 1); v20 <= i; v20 += 8LL )\n      {\n        if ( !*(_QWORD *)v20 )\n          break;\n        v22 = *((_QWORD *)this + 13);\n        v23 = v17 * v6;\n        v6 = v6 + *(float *)(*(_QWORD *)v20 + 64LL);\n        v24 = *(float **)(v22 + 8);\n        v25 = v23 / v5;\n        v27 = v25;\n        if ( v24 == *(float **)(v22 + 16) )\n        {\n          sub_180030E20((const void **)v22, v24, &v27);\n        }\n        else\n        {\n          *v24 = v25;\n          *(_QWORD *)(v22 + 8) = v24 + 1;\n        }\n      }\n    }\n  }\n  return 1;\n}", "assembly": "; \n; cocos2d::CCAnimate::initWithAnimation from 0x1800358b0 to 0x180035ab1 (513 bytes)\n; \n; 7 xrefs:\n; > cocos2d::CCAnimate::copyWithZone @ 0x180032181\n; > cocos2d::CCAnimate::create @ 0x180033c06\n; > cocos2d::CCAnimate::reverse @ 0x180036185\n; > <???> @ 0x18013f088\n; > <???> @ 0x18013f098\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801ba864\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:35 +0000\n; \nmov     [rsp+arg_10], rbx                                              ; +0x0, 0x1800358b0\nmov     [rsp+arg_18], rsi                                              ; +0x5, 0x1800358b5\npush    rdi                                                            ; +0xa, 0x1800358ba\npush    r14                                                            ; +0xb, 0x1800358bb\npush    r15                                                            ; +0xd, 0x1800358bd\nsub     rsp, 60h                                                       ; +0xf, 0x1800358bf\nmov     rax, [rdx]                                                     ; +0x13, 0x1800358c3\nmov     rdi, rcx                                                       ; +0x16, 0x1800358c6\nmovaps  [rsp+78h+var_28], xmm6                                         ; +0x19, 0x1800358c9\nmov     rcx, rdx                                                       ; +0x1e, 0x1800358ce\nmovaps  [rsp+78h+var_48], xmm8                                         ; +0x21, 0x1800358d1\nmov     rsi, rdx                                                       ; +0x27, 0x1800358d7\ncall    qword ptr [rax+48h]                                            ; +0x2a, 0x1800358da\nmov     eax, [rsi+54h]                                                 ; +0x2d, 0x1800358dd\nxorps   xmm1, xmm1                                                     ; +0x30, 0x1800358e0\nmovaps  xmm8, xmm0                                                     ; +0x33, 0x1800358e3\nxorps   xmm6, xmm6                                                     ; +0x37, 0x1800358e7\ncvtsi2ss xmm1, rax                                                     ; +0x3a, 0x1800358ea\nmulss   xmm1, xmm8                                                     ; +0x3f, 0x1800358ef\nucomiss xmm1, xmm6                                                     ; +0x44, 0x1800358f4\nmovss   dword ptr [rdi+50h], xmm1                                      ; +0x47, 0x1800358f7\njp      short loc_180035907                                            ; +0x4c, 0x1800358fc\njnz     short loc_180035907                                            ; +0x4e, 0x1800358fe\nmov     dword ptr [rdi+50h], 34000000h                                 ; +0x50, 0x180035900\nxor     ebx, ebx                                                       ; +0x57, 0x180035907\nmov     byte ptr [rdi+5Ch], 1                                          ; +0x59, 0x180035909\nmov     [rdi+58h], ebx                                                 ; +0x5d, 0x18003590d\nmov     [rdi+70h], ebx                                                 ; +0x60, 0x180035910\ncmp     [rdi+60h], rsi                                                 ; +0x63, 0x180035913\njz      short loc_180035933                                            ; +0x67, 0x180035917\nmov     rcx, rsi; this                                                 ; +0x69, 0x180035919\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0x6c, 0x18003591c\nmov     rcx, [rdi+60h]; this                                           ; +0x71, 0x180035921\ntest    rcx, rcx                                                       ; +0x75, 0x180035925\njz      short loc_18003592F                                            ; +0x78, 0x180035928\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x7a, 0x18003592a\nmov     [rdi+60h], rsi                                                 ; +0x7f, 0x18003592f\nmov     [rdi+78h], rbx                                                 ; +0x83, 0x180035933\nmov     [rdi+80h], ebx                                                 ; +0x87, 0x180035937\nmov     rcx, [rsi+48h]; this                                           ; +0x8d, 0x18003593d\nmov     [rsp+78h+arg_8], rbp                                           ; +0x91, 0x180035941\ncall    ?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x99, 0x180035949\nmov     r14, [rdi+68h]                                                 ; +0x9e, 0x18003594e\nmov     r15d, eax                                                      ; +0xa2, 0x180035952\nmov     rcx, [r14]                                                     ; +0xa5, 0x180035955\nmov     rax, [r14+10h]                                                 ; +0xa8, 0x180035958\nsub     rax, rcx                                                       ; +0xac, 0x18003595c\nsar     rax, 2                                                         ; +0xaf, 0x18003595f\ncmp     r15, rax                                                       ; +0xb3, 0x180035963\njbe     loc_1800359F6                                                  ; +0xb6, 0x180035966\nmov     rbp, [r14+8]                                                   ; +0xbc, 0x18003596c\nsub     rbp, rcx                                                       ; +0xc0, 0x180035970\nlea     rcx, ds:0[r15*4]; Size                                         ; +0xc3, 0x180035973\nsar     rbp, 2                                                         ; +0xcb, 0x18003597b\ntest    rcx, rcx                                                       ; +0xcf, 0x18003597f\njz      short loc_1800359D3                                            ; +0xd2, 0x180035982\ncmp     rcx, 1000h                                                     ; +0xd4, 0x180035984\njb      short loc_1800359CB                                            ; +0xdb, 0x18003598b\nlea     rax, [rcx+27h]                                                 ; +0xdd, 0x18003598d\ncmp     rax, rcx                                                       ; +0xe1, 0x180035991\njbe     loc_180035AAB                                                  ; +0xe4, 0x180035994\nmov     rcx, rax; Size                                                 ; +0xea, 0x18003599a\ncall    sub_1800E4AC0                                                  ; +0xed, 0x18003599d\ntest    rax, rax                                                       ; +0xf2, 0x1800359a2\njnz     short loc_1800359BD                                            ; +0xf5, 0x1800359a5\nxor     r9d, r9d; LineNo                                               ; +0xf7, 0x1800359a7\nmov     [rsp+78h+Reserved], rbx; Reserved                              ; +0xfa, 0x1800359aa\nxor     r8d, r8d; FileName                                             ; +0xff, 0x1800359af\nxor     edx, edx; FunctionName                                         ; +0x102, 0x1800359b2\nxor     ecx, ecx; Expression                                           ; +0x104, 0x1800359b4\ncall    cs:_invoke_watson                                              ; +0x106, 0x1800359b6\ndb 0CCh                                                                ; +0x10c, 0x1800359bc\nlea     rbx, [rax+27h]                                                 ; +0x10d, 0x1800359bd\nand     rbx, 0FFFFFFFFFFFFFFE0h                                        ; +0x111, 0x1800359c1\nmov     [rbx-8], rax                                                   ; +0x115, 0x1800359c5\njmp     short loc_1800359D3                                            ; +0x119, 0x1800359c9\ncall    sub_1800E4AC0                                                  ; +0x11b, 0x1800359cb\nmov     rbx, rax                                                       ; +0x120, 0x1800359d0\nmov     rdx, [r14]; Src                                                ; +0x123, 0x1800359d3\nmov     rcx, rbx; void *                                               ; +0x126, 0x1800359d6\nmov     r8, [r14+8]                                                    ; +0x129, 0x1800359d9\nsub     r8, rdx; Size                                                  ; +0x12d, 0x1800359dd\ncall    memmove                                                        ; +0x130, 0x1800359e0\nmov     r9, r15                                                        ; +0x135, 0x1800359e5\nmov     r8, rbp                                                        ; +0x138, 0x1800359e8\nmov     rdx, rbx                                                       ; +0x13b, 0x1800359eb\nmov     rcx, r14                                                       ; +0x13e, 0x1800359ee\ncall    sub_180031E30                                                  ; +0x141, 0x1800359f1\nmov     rbx, [rsi+48h]                                                 ; +0x146, 0x1800359f6\nmovaps  [rsp+78h+var_38], xmm7                                         ; +0x14a, 0x1800359fa\nmovaps  xmm7, xmm8                                                     ; +0x14f, 0x1800359ff\ndivss   xmm7, dword ptr [rsi+38h]                                      ; +0x153, 0x180035a03\ntest    rbx, rbx                                                       ; +0x158, 0x180035a08\njz      short loc_180035A7C                                            ; +0x15b, 0x180035a0b\nmov     rbx, [rbx+38h]                                                 ; +0x15d, 0x180035a0d\nmov     eax, [rbx]                                                     ; +0x161, 0x180035a11\ntest    eax, eax                                                       ; +0x163, 0x180035a13\njz      short loc_180035A7C                                            ; +0x165, 0x180035a15\nmov     rbx, [rbx+10h]                                                 ; +0x167, 0x180035a17\nlea     rsi, [rax-1]                                                   ; +0x16b, 0x180035a1b\nlea     rsi, [rbx+rsi*8]                                               ; +0x16f, 0x180035a1f\ncmp     rbx, rsi                                                       ; +0x173, 0x180035a23\nja      short loc_180035A7C                                            ; +0x176, 0x180035a26\nmov     rax, [rbx]                                                     ; +0x178, 0x180035a28\ntest    rax, rax                                                       ; +0x17b, 0x180035a2b\njz      short loc_180035A7C                                            ; +0x17e, 0x180035a2e\nmov     rcx, [rdi+68h]                                                 ; +0x180, 0x180035a30\nmovaps  xmm0, xmm7                                                     ; +0x184, 0x180035a34\nmulss   xmm0, xmm6                                                     ; +0x187, 0x180035a37\naddss   xmm6, dword ptr [rax+40h]                                      ; +0x18b, 0x180035a3b\nmov     rdx, [rcx+8]                                                   ; +0x190, 0x180035a40\ndivss   xmm0, xmm8                                                     ; +0x194, 0x180035a44\nmovss   [rsp+78h+arg_0], xmm0                                          ; +0x199, 0x180035a49\ncmp     rdx, [rcx+10h]                                                 ; +0x1a2, 0x180035a52\njz      short loc_180035A66                                            ; +0x1a6, 0x180035a56\nlea     rax, [rdx+4]                                                   ; +0x1a8, 0x180035a58\nmovss   dword ptr [rdx], xmm0                                          ; +0x1ac, 0x180035a5c\nmov     [rcx+8], rax                                                   ; +0x1b0, 0x180035a60\njmp     short loc_180035A73                                            ; +0x1b4, 0x180035a64\nlea     r8, [rsp+78h+arg_0]                                            ; +0x1b6, 0x180035a66\ncall    sub_180030E20                                                  ; +0x1be, 0x180035a6e\nadd     rbx, 8                                                         ; +0x1c3, 0x180035a73\ncmp     rbx, rsi                                                       ; +0x1c7, 0x180035a77\njbe     short loc_180035A28                                            ; +0x1ca, 0x180035a7a\nmovaps  xmm7, [rsp+78h+var_38]                                         ; +0x1cc, 0x180035a7c\nlea     r11, [rsp+78h+var_18]                                          ; +0x1d1, 0x180035a81\nmov     rbx, [r11+30h]                                                 ; +0x1d6, 0x180035a86\nmov     al, 1                                                          ; +0x1da, 0x180035a8a\nmov     rsi, [r11+38h]                                                 ; +0x1dc, 0x180035a8c\nmovaps  xmm8, xmmword ptr [r11-30h]                                    ; +0x1e0, 0x180035a90\nmov     rbp, [rsp+78h+arg_8]                                           ; +0x1e5, 0x180035a95\nmovaps  xmm6, [rsp+78h+var_28]                                         ; +0x1ed, 0x180035a9d\nmov     rsp, r11                                                       ; +0x1f2, 0x180035aa2\npop     r15                                                            ; +0x1f5, 0x180035aa5\npop     r14                                                            ; +0x1f7, 0x180035aa7\npop     rdi                                                            ; +0x1f9, 0x180035aa9\nretn                                                                   ; +0x1fa, 0x180035aaa\ncall    ?cancel_current_task@Concurrency@@YAXXZ; Concurrency::cancel_current_task(void) ; +0x1fb, 0x180035aab\ndb 0CCh                                                                ; +0x200, 0x180035ab0", "xrefs": ["cocos2d::CCAnimate::copyWithZone @ 0x180032181", "cocos2d::CCAnimate::create @ 0x180033c06", "cocos2d::CCAnimate::reverse @ 0x180036185", "<???> @ 0x18013f088", "<???> @ 0x18013f098", "<???> @ 0x18014cf68", "<???> @ 0x1801ba864"], "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"}