{"type": "func", "start": 6442844128, "end": 6442844531, "name": "cocos2d::CCProgressTimer::initWithSprite", "pseudocode": "// \n// cocos2d::CCProgressTimer::initWithSprite from 0x18005ffe0 to 0x180060173 (403 bytes)\n// \n// 3 xrefs:\n// > cocos2d::CCProgressTimer::create @ 0x18005fca6\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bd4e0\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:50 +0000\n// \n\nchar __fastcall cocos2d::CCProgressTimer::initWithSprite(\n        cocos2d::CCProgressTimer *this,\n        struct cocos2d::CCSprite *a2,\n        __int64 a3,\n        float a4)\n{\n  float v6; // xmm0_4\n  int v7; // ecx\n  float *v8; // rax\n  __int64 v9; // rbx\n  float *v10; // rax\n  float *v11; // rax\n  cocos2d::CCObject *v12; // rcx\n  __int64 v13; // rbx\n  __int64 v14; // rax\n  void *v15; // rcx\n  __int64 v16; // rbx\n  cocos2d::CCShaderCache *v17; // rax\n  struct cocos2d::CCGLProgram *v18; // rax\n  float v20; // [rsp+40h] [rbp+8h] BYREF\n\n  if ( *((float *)this + 87) != 0.0 )\n  {\n    v6 = cocos2d::clampf(this, 0.0, 100.0, a4);\n    v7 = *((_DWORD *)this + 86);\n    *((float *)this + 87) = v6;\n    if ( v7 )\n    {\n      if ( v7 == 1 )\n        cocos2d::CCProgressTimer::updateBar(this);\n    }\n    else\n    {\n      cocos2d::CCProgressTimer::updateRadial(this);\n    }\n  }\n  *((_QWORD *)this + 46) = 0;\n  *((_DWORD *)this + 90) = 0;\n  v8 = kmVec2Fill(&v20, 0.5, 0.5);\n  cocos2d::CCNode::setAnchorPoint(this, (const struct cocos2d::CCPoint *)v8);\n  v9 = *(_QWORD *)this;\n  *((_DWORD *)this + 86) = 0;\n  *((_BYTE *)this + 392) = 0;\n  v10 = kmVec2Fill(&v20, 0.5, 0.5);\n  (*(void (__fastcall **)(cocos2d::CCProgressTimer *, float *))(v9 + 912))(this, v10);\n  v11 = kmVec2Fill(&v20, 1.0, 1.0);\n  cocos2d::CCSize::operator=((_DWORD *)this + 96, v11);\n  if ( *((struct cocos2d::CCSprite **)this + 44) != a2 )\n  {\n    if ( a2 )\n      cocos2d::CCObject::retain(a2);\n    v12 = *((cocos2d::CCObject **)this + 44);\n    if ( v12 )\n      cocos2d::CCObject::release(v12);\n    v13 = *(_QWORD *)this;\n    *((_QWORD *)this + 44) = a2;\n    v14 = (*(__int64 (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)a2 + 320LL))(a2);\n    (*(void (__fastcall **)(cocos2d::CCProgressTimer *, __int64))(v13 + 312))(this, v14);\n    v15 = *((void **)this + 46);\n    if ( v15 )\n    {\n      free(v15);\n      *((_QWORD *)this + 46) = 0;\n      *((_DWORD *)this + 90) = 0;\n    }\n  }\n  v16 = *(_QWORD *)this;\n  v17 = cocos2d::CCShaderCache::sharedShaderCache();\n  v18 = cocos2d::CCShaderCache::programForKey(v17, \"ShaderPositionTextureColor\");\n  (*(void (__fastcall **)(cocos2d::CCProgressTimer *, struct cocos2d::CCGLProgram *))(v16 + 656))(this, v18);\n  return 1;\n}", "assembly": "; \n; cocos2d::CCProgressTimer::initWithSprite from 0x18005ffe0 to 0x180060173 (403 bytes)\n; \n; 3 xrefs:\n; > cocos2d::CCProgressTimer::create @ 0x18005fca6\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bd4e0\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:50 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18005ffe0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18005ffe5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x18005ffea\npush    rdi                                                            ; +0xf, 0x18005ffef\nsub     rsp, 30h                                                       ; +0x10, 0x18005fff0\nmovss   xmm1, dword ptr [rcx+15Ch]                                     ; +0x14, 0x18005fff4\nxorps   xmm0, xmm0                                                     ; +0x1c, 0x18005fffc\nucomiss xmm1, xmm0                                                     ; +0x1f, 0x18005ffff\nmov     rsi, rdx                                                       ; +0x22, 0x180060002\nmov     rdi, rcx                                                       ; +0x25, 0x180060005\nmovaps  [rsp+38h+var_18], xmm6                                         ; +0x28, 0x180060008\njp      short loc_180060011                                            ; +0x2d, 0x18006000d\njz      short loc_18006004A                                            ; +0x2f, 0x18006000f\nmovss   xmm2, cs:flt_1800F0280; float                                  ; +0x31, 0x180060011\nxorps   xmm1, xmm1; float                                              ; +0x39, 0x180060019\ncall    ?clampf@cocos2d@@YAMMMM@Z; cocos2d::clampf(float,float,float)  ; +0x3c, 0x18006001c\nmov     ecx, [rdi+158h]                                                ; +0x41, 0x180060021\nmovss   dword ptr [rdi+15Ch], xmm0                                     ; +0x47, 0x180060027\ntest    ecx, ecx                                                       ; +0x4f, 0x18006002f\njz      short loc_180060042                                            ; +0x51, 0x180060031\ncmp     ecx, 1                                                         ; +0x53, 0x180060033\njnz     short loc_18006004A                                            ; +0x56, 0x180060036\nmov     rcx, rdi; this                                                 ; +0x58, 0x180060038\ncall    ?updateBar@CCProgressTimer@cocos2d@@IEAAXXZ; cocos2d::CCProgressTimer::updateBar(void) ; +0x5b, 0x18006003b\njmp     short loc_18006004A                                            ; +0x60, 0x180060040\nmov     rcx, rdi; this                                                 ; +0x62, 0x180060042\ncall    ?updateRadial@CCProgressTimer@cocos2d@@IEAAXXZ; cocos2d::CCProgressTimer::updateRadial(void) ; +0x65, 0x180060045\nmovss   xmm6, cs:dword_1800EC358                                       ; +0x6a, 0x18006004a\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x72, 0x180060052\nxor     ebp, ebp                                                       ; +0x77, 0x180060057\nmovaps  xmm2, xmm6                                                     ; +0x79, 0x180060059\nmovaps  xmm1, xmm6                                                     ; +0x7c, 0x18006005c\nmov     [rdi+170h], rbp                                                ; +0x7f, 0x18006005f\nmov     [rdi+168h], ebp                                                ; +0x86, 0x180060066\ncall    kmVec2Fill                                                     ; +0x8c, 0x18006006c\nmov     rdx, rax; struct cocos2d::CCPoint *                            ; +0x91, 0x180060071\nmov     rcx, rdi; this                                                 ; +0x94, 0x180060074\ncall    ?setAnchorPoint@CCNode@cocos2d@@UEAAXAEBVCCPoint@2@@Z; cocos2d::CCNode::setAnchorPoint(cocos2d::CCPoint const &) ; +0x97, 0x180060077\nmov     rbx, [rdi]                                                     ; +0x9c, 0x18006007c\nlea     rcx, [rsp+38h+arg_0]                                           ; +0x9f, 0x18006007f\nmovaps  xmm2, xmm6                                                     ; +0xa4, 0x180060084\nmov     [rdi+158h], ebp                                                ; +0xa7, 0x180060087\nmovaps  xmm1, xmm6                                                     ; +0xad, 0x18006008d\nmov     [rdi+188h], bpl                                                ; +0xb0, 0x180060090\ncall    kmVec2Fill                                                     ; +0xb7, 0x180060097\nmov     rdx, rax                                                       ; +0xbc, 0x18006009c\nmov     rcx, rdi                                                       ; +0xbf, 0x18006009f\ncall    qword ptr [rbx+390h]                                           ; +0xc2, 0x1800600a2\nmovss   xmm1, cs:flt_1800EC208                                         ; +0xc8, 0x1800600a8\nlea     rcx, [rsp+38h+arg_0]                                           ; +0xd0, 0x1800600b0\nmovaps  xmm2, xmm1                                                     ; +0xd5, 0x1800600b5\ncall    kmVec2Fill                                                     ; +0xd8, 0x1800600b8\nlea     rcx, [rdi+180h]                                                ; +0xdd, 0x1800600bd\nmov     rdx, rax                                                       ; +0xe4, 0x1800600c4\ncall    ??4CCSize@cocos2d@@QEAAAEAV01@AEBVCCPoint@1@@Z; cocos2d::CCSize::operator=(cocos2d::CCPoint const &) ; +0xe7, 0x1800600c7\ncmp     [rdi+160h], rsi                                                ; +0xec, 0x1800600cc\njz      short loc_180060134                                            ; +0xf3, 0x1800600d3\ntest    rsi, rsi                                                       ; +0xf5, 0x1800600d5\njz      short loc_1800600E2                                            ; +0xf8, 0x1800600d8\nmov     rcx, rsi; this                                                 ; +0xfa, 0x1800600da\ncall    ?retain@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::retain(void) ; +0xfd, 0x1800600dd\nmov     rcx, [rdi+160h]; this                                          ; +0x102, 0x1800600e2\ntest    rcx, rcx                                                       ; +0x109, 0x1800600e9\njz      short loc_1800600F3                                            ; +0x10c, 0x1800600ec\ncall    ?release@CCObject@cocos2d@@QEAAXXZ; cocos2d::CCObject::release(void) ; +0x10e, 0x1800600ee\nmov     rbx, [rdi]                                                     ; +0x113, 0x1800600f3\nmov     rcx, rsi                                                       ; +0x116, 0x1800600f6\nmov     [rdi+160h], rsi                                                ; +0x119, 0x1800600f9\nmov     rax, [rsi]                                                     ; +0x120, 0x180060100\ncall    qword ptr [rax+140h]                                           ; +0x123, 0x180060103\nmov     rdx, rax                                                       ; +0x129, 0x180060109\nmov     rcx, rdi                                                       ; +0x12c, 0x18006010c\ncall    qword ptr [rbx+138h]                                           ; +0x12f, 0x18006010f\nmov     rcx, [rdi+170h]; Block                                         ; +0x135, 0x180060115\ntest    rcx, rcx                                                       ; +0x13c, 0x18006011c\njz      short loc_180060134                                            ; +0x13f, 0x18006011f\ncall    cs:__imp_free                                                  ; +0x141, 0x180060121\nmov     [rdi+170h], rbp                                                ; +0x147, 0x180060127\nmov     [rdi+168h], ebp                                                ; +0x14e, 0x18006012e\nmov     rbx, [rdi]                                                     ; +0x154, 0x180060134\ncall    ?sharedShaderCache@CCShaderCache@cocos2d@@SAPEAV12@XZ; cocos2d::CCShaderCache::sharedShaderCache(void) ; +0x157, 0x180060137\nmov     rcx, rax; this                                                 ; +0x15c, 0x18006013c\nlea     rdx, aShaderposition_3; \"ShaderPositionTextureColor\"           ; +0x15f, 0x18006013f\ncall    ?programForKey@CCShaderCache@cocos2d@@QEAAPEAVCCGLProgram@2@PEBD@Z; cocos2d::CCShaderCache::programForKey(char const *) ; +0x166, 0x180060146\nmov     rdx, rax                                                       ; +0x16b, 0x18006014b\nmov     rcx, rdi                                                       ; +0x16e, 0x18006014e\ncall    qword ptr [rbx+290h]                                           ; +0x171, 0x180060151\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x177, 0x180060157\nmov     al, 1                                                          ; +0x17c, 0x18006015c\nmov     rbp, [rsp+38h+arg_10]                                          ; +0x17e, 0x18006015e\nmov     rsi, [rsp+38h+arg_18]                                          ; +0x183, 0x180060163\nmovaps  xmm6, [rsp+38h+var_18]                                         ; +0x188, 0x180060168\nadd     rsp, 30h                                                       ; +0x18d, 0x18006016d\npop     rdi                                                            ; +0x191, 0x180060171\nretn                                                                   ; +0x192, 0x180060172", "xrefs": ["cocos2d::CCProgressTimer::create @ 0x18005fca6", "<???> @ 0x18014cf68", "<???> @ 0x1801bd4e0"], "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"}