{"type": "func", "start": 6443072560, "end": 6443072868, "name": "cocos2d::CCProfilingEndTimingBlock", "pseudocode": "// \n// cocos2d::CCProfilingEndTimingBlock from 0x180097c30 to 0x180097d64 (308 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801c099c\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:22:10 +0000\n// \n\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCProfilingEndTimingBlock(cocos2d *this, const char *a2, struct cocos2d::timezone *a3)\n{\n  struct cocos2d::CCProfiler *v4; // rbx\n  __int64 v5; // rbx\n  void *v6; // r8\n  int v7; // r8d\n  int v8; // eax\n  int v9; // eax\n  _DWORD v10[2]; // [rsp+30h] [rbp-38h] BYREF\n  void *Block[2]; // [rsp+38h] [rbp-30h] BYREF\n  __m128i si128; // [rsp+48h] [rbp-20h]\n\n  cocos2d::gettimeofday((cocos2d *)v10, nullptr, a3);\n  v4 = cocos2d::CCProfiler::sharedProfiler();\n  sub_180005A10(Block, (char *)this);\n  v5 = cocos2d::CCDictionary::objectForKey(*((_QWORD *)v4 + 7), (__int64)Block);\n  if ( si128.m128i_i64[1] > 0xFuLL )\n  {\n    v6 = Block[0];\n    if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )\n    {\n      v6 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )\n        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\n    }\n    j_j_free_0(v6);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);\n  LOBYTE(Block[0]) = 0;\n  v7 = v10[1] + 1000000 * (v10[0] - *(_DWORD *)(v5 + 120)) - *(_DWORD *)(v5 + 124);\n  *(_QWORD *)(v5 + 104) += v7;\n  *(_DWORD *)(v5 + 92) = (int)(float)((float)(v7 + *(_DWORD *)(v5 + 92)) * 0.5);\n  *(_DWORD *)(v5 + 96) = *(_QWORD *)(v5 + 104) / *(int *)(v5 + 88);\n  v8 = *(_DWORD *)(v5 + 116);\n  if ( v8 <= v7 )\n    v8 = v7;\n  *(_DWORD *)(v5 + 116) = v8;\n  v9 = *(_DWORD *)(v5 + 112);\n  if ( v9 >= v7 )\n    v9 = v7;\n  *(_DWORD *)(v5 + 112) = v9;\n}", "assembly": "; \n; cocos2d::CCProfilingEndTimingBlock from 0x180097c30 to 0x180097d64 (308 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801c099c\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:22:10 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180097c30\npush    rdi                                                            ; +0x5, 0x180097c35\nsub     rsp, 60h                                                       ; +0x6, 0x180097c36\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x180097c3a\nxor     rax, rsp                                                       ; +0x11, 0x180097c41\nmov     [rsp+68h+var_10], rax                                          ; +0x14, 0x180097c44\nmov     rdi, rcx                                                       ; +0x19, 0x180097c49\nxor     edx, edx; struct timeval *                                     ; +0x1c, 0x180097c4c\nlea     rcx, [rsp+68h+var_38]; this                                    ; +0x1e, 0x180097c4e\ncall    ?gettimeofday@cocos2d@@YAHPEAUtimeval@@PEAUtimezone@1@@Z; cocos2d::gettimeofday(timeval *,cocos2d::timezone *) ; +0x23, 0x180097c53\ncall    ?sharedProfiler@CCProfiler@cocos2d@@SAPEAV12@XZ; cocos2d::CCProfiler::sharedProfiler(void) ; +0x28, 0x180097c58\nmov     rbx, rax                                                       ; +0x2d, 0x180097c5d\nmov     rdx, rdi; Str                                                  ; +0x30, 0x180097c60\nlea     rcx, [rsp+68h+Block]; void *                                   ; +0x33, 0x180097c63\ncall    sub_180005A10                                                  ; +0x38, 0x180097c68\nnop                                                                    ; +0x3d, 0x180097c6d\nlea     rdx, [rsp+68h+Block]                                           ; +0x3e, 0x180097c6e\nmov     rcx, [rbx+38h]                                                 ; +0x43, 0x180097c73\ncall    ?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0x47, 0x180097c77\nmov     rbx, rax                                                       ; +0x4c, 0x180097c7c\nmov     rdx, [rsp+68h+var_18]                                          ; +0x4f, 0x180097c7f\ncmp     rdx, 0Fh                                                       ; +0x54, 0x180097c84\njbe     short loc_180097CD5                                            ; +0x58, 0x180097c88\ninc     rdx                                                            ; +0x5a, 0x180097c8a\nmov     r8, [rsp+68h+Block]                                            ; +0x5d, 0x180097c8d\nmov     rcx, r8                                                        ; +0x62, 0x180097c92\ncmp     rdx, 1000h                                                     ; +0x65, 0x180097c95\njb      short loc_180097CCD                                            ; +0x6c, 0x180097c9c\nadd     rdx, 27h ; '''                                                 ; +0x6e, 0x180097c9e\nmov     r8, [r8-8]                                                     ; +0x72, 0x180097ca2\nsub     rcx, r8                                                        ; +0x76, 0x180097ca6\nsub     rcx, 8                                                         ; +0x79, 0x180097ca9\ncmp     rcx, 1Fh                                                       ; +0x7d, 0x180097cad\njbe     short loc_180097CCD                                            ; +0x81, 0x180097cb1\nmov     [rsp+68h+Reserved], 0; Reserved                                ; +0x83, 0x180097cb3\nxor     r9d, r9d; LineNo                                               ; +0x8c, 0x180097cbc\nxor     r8d, r8d; FileName                                             ; +0x8f, 0x180097cbf\nxor     edx, edx; FunctionName                                         ; +0x92, 0x180097cc2\nxor     ecx, ecx; Expression                                           ; +0x94, 0x180097cc4\ncall    cs:_invoke_watson                                              ; +0x96, 0x180097cc6\ndb 0CCh                                                                ; +0x9c, 0x180097ccc\nmov     rcx, r8; Block                                                 ; +0x9d, 0x180097ccd\ncall    j_j_free_0                                                     ; +0xa0, 0x180097cd0\nmovdqa  xmm0, cs:xmmword_1800EC500                                     ; +0xa5, 0x180097cd5\nmovdqu  xmmword ptr [rsp+48h], xmm0                                    ; +0xad, 0x180097cdd\nmov     byte ptr [rsp+68h+Block], 0                                    ; +0xb3, 0x180097ce3\nmov     eax, [rsp+68h+var_38]                                          ; +0xb8, 0x180097ce8\nsub     eax, [rbx+78h]                                                 ; +0xbc, 0x180097cec\nimul    r8d, eax, 0F4240h                                              ; +0xbf, 0x180097cef\nsub     r8d, [rbx+7Ch]                                                 ; +0xc6, 0x180097cf6\nadd     r8d, [rsp+68h+var_34]                                          ; +0xca, 0x180097cfa\nmovsxd  rax, r8d                                                       ; +0xcf, 0x180097cff\nadd     [rbx+68h], rax                                                 ; +0xd2, 0x180097d02\nmov     edx, [rbx+5Ch]                                                 ; +0xd6, 0x180097d06\nadd     edx, r8d                                                       ; +0xd9, 0x180097d09\nmovd    xmm0, edx                                                      ; +0xdc, 0x180097d0c\ncvtdq2ps xmm0, xmm0                                                    ; +0xe0, 0x180097d10\nmulss   xmm0, cs:dword_1800EC358                                       ; +0xe3, 0x180097d13\ncvttss2si ecx, xmm0                                                    ; +0xeb, 0x180097d1b\nmov     [rbx+5Ch], ecx                                                 ; +0xef, 0x180097d1f\nmovsxd  rcx, dword ptr [rbx+58h]                                       ; +0xf2, 0x180097d22\nmov     rax, [rbx+68h]                                                 ; +0xf6, 0x180097d26\ncqo                                                                    ; +0xfa, 0x180097d2a\nidiv    rcx                                                            ; +0xfc, 0x180097d2c\nmov     [rbx+60h], eax                                                 ; +0xff, 0x180097d2f\nmov     eax, [rbx+74h]                                                 ; +0x102, 0x180097d32\ncmp     eax, r8d                                                       ; +0x105, 0x180097d35\ncmovle  eax, r8d                                                       ; +0x108, 0x180097d38\nmov     [rbx+74h], eax                                                 ; +0x10c, 0x180097d3c\nmov     eax, [rbx+70h]                                                 ; +0x10f, 0x180097d3f\ncmp     eax, r8d                                                       ; +0x112, 0x180097d42\ncmovge  eax, r8d                                                       ; +0x115, 0x180097d45\nmov     [rbx+70h], eax                                                 ; +0x119, 0x180097d49\nmov     rcx, [rsp+68h+var_10]                                          ; +0x11c, 0x180097d4c\nxor     rcx, rsp; StackCookie                                          ; +0x121, 0x180097d51\ncall    __security_check_cookie                                        ; +0x124, 0x180097d54\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x129, 0x180097d59\nadd     rsp, 60h                                                       ; +0x12e, 0x180097d5e\npop     rdi                                                            ; +0x132, 0x180097d62\nretn                                                                   ; +0x133, 0x180097d63", "xrefs": ["<???> @ 0x18014cf68", "<???> @ 0x1801c099c"], "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"}