{"type": "func", "start": 6443058224, "end": 6443058441, "name": "cocos2d::CCProfilingBeginTimingBlock", "pseudocode": "// \n// cocos2d::CCProfilingBeginTimingBlock from 0x180094430 to 0x180094509 (217 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b66f0\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\n// Hidden C++ exception states: #wind=1\nvoid __fastcall cocos2d::CCProfilingBeginTimingBlock(cocos2d *this, const char *a2)\n{\n  struct cocos2d::CCProfiler *v3; // rsi\n  struct cocos2d::CCProfilingTimer *v4; // rbx\n  struct cocos2d::timezone *v5; // r8\n  void *v6; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __m128i si128; // [rsp+30h] [rbp-28h]\n\n  v3 = cocos2d::CCProfiler::sharedProfiler();\n  sub_180005910(Block, this);\n  v4 = (struct cocos2d::CCProfilingTimer *)cocos2d::CCDictionary::objectForKey(\n                                             (__int64)v3[1].__vftable,\n                                             (unsigned __int8 *)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        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free_0(v6);\n  }\n  si128 = _mm_load_si128((const __m128i *)&xmmword_1800E7160);\n  LOBYTE(Block[0]) = 0;\n  if ( !v4 )\n    v4 = cocos2d::CCProfiler::createAndAddTimerWithName(v3, (const char *)this);\n  ++v4[1].m_uIndexInArray;\n  cocos2d::gettimeofday((cocos2d *)&v4[2].m_uID, nullptr, v5);\n}", "assembly": "; \n; cocos2d::CCProfilingBeginTimingBlock from 0x180094430 to 0x180094509 (217 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b66f0\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x180094430\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x180094435\npush    rdi                                                            ; +0xa, 0x18009443a\nsub     rsp, 50h                                                       ; +0xb, 0x18009443b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x18009443f\nxor     rax, rsp                                                       ; +0x16, 0x180094446\nmov     [rsp+58h+var_18], rax                                          ; +0x19, 0x180094449\nmov     rdi, rcx                                                       ; +0x1e, 0x18009444e\ncall    ?sharedProfiler@CCProfiler@cocos2d@@SAPEAV12@XZ; cocos2d::CCProfiler::sharedProfiler(void) ; +0x21, 0x180094451\nmov     rsi, rax                                                       ; +0x26, 0x180094456\nmov     rdx, rdi                                                       ; +0x29, 0x180094459\nlea     rcx, [rsp+58h+Block]                                           ; +0x2c, 0x18009445c\ncall    sub_180005910                                                  ; +0x31, 0x180094461\nnop                                                                    ; +0x36, 0x180094466\nlea     rdx, [rsp+58h+Block]                                           ; +0x37, 0x180094467\nmov     rcx, [rsi+38h]                                                 ; +0x3c, 0x18009446c\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 &) ; +0x40, 0x180094470\nmov     rbx, rax                                                       ; +0x45, 0x180094475\nmov     rdx, [rsp+58h+var_20]                                          ; +0x48, 0x180094478\ncmp     rdx, 0Fh                                                       ; +0x4d, 0x18009447d\njbe     short loc_1800944B8                                            ; +0x51, 0x180094481\ninc     rdx                                                            ; +0x53, 0x180094483\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x56, 0x180094486\nmov     rax, rcx                                                       ; +0x5b, 0x18009448b\ncmp     rdx, 1000h                                                     ; +0x5e, 0x18009448e\njb      short loc_1800944B3                                            ; +0x65, 0x180094495\nadd     rdx, 27h ; '''                                                 ; +0x67, 0x180094497\nmov     rcx, [rcx-8]                                                   ; +0x6b, 0x18009449b\nsub     rax, rcx                                                       ; +0x6f, 0x18009449f\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x72, 0x1800944a2\ncmp     rax, 1Fh                                                       ; +0x76, 0x1800944a6\njbe     short loc_1800944B3                                            ; +0x7a, 0x1800944aa\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x7c, 0x1800944ac\ndb 0CCh                                                                ; +0x82, 0x1800944b2\ncall    j_j_free_0                                                     ; +0x83, 0x1800944b3\nmovdqa  xmm0, cs:xmmword_1800E7160                                     ; +0x88, 0x1800944b8\nmovdqu  xmmword ptr [rsp+30h], xmm0                                    ; +0x90, 0x1800944c0\nmov     byte ptr [rsp+58h+Block], 0                                    ; +0x96, 0x1800944c6\ntest    rbx, rbx                                                       ; +0x9b, 0x1800944cb\njnz     short loc_1800944DE                                            ; +0x9e, 0x1800944ce\nmov     rdx, rdi; char *                                               ; +0xa0, 0x1800944d0\nmov     rcx, rsi; this                                                 ; +0xa3, 0x1800944d3\ncall    ?createAndAddTimerWithName@CCProfiler@cocos2d@@QEAAPEAVCCProfilingTimer@2@PEBD@Z; cocos2d::CCProfiler::createAndAddTimerWithName(char const *) ; +0xa6, 0x1800944d6\nmov     rbx, rax                                                       ; +0xab, 0x1800944db\ninc     dword ptr [rbx+58h]                                            ; +0xae, 0x1800944de\nlea     rcx, [rbx+78h]; this                                           ; +0xb1, 0x1800944e1\nxor     edx, edx; struct timeval *                                     ; +0xb5, 0x1800944e5\ncall    ?gettimeofday@cocos2d@@YAHPEAUtimeval@@PEAUtimezone@1@@Z; cocos2d::gettimeofday(timeval *,cocos2d::timezone *) ; +0xb7, 0x1800944e7\nmov     rcx, [rsp+58h+var_18]                                          ; +0xbc, 0x1800944ec\nxor     rcx, rsp; StackCookie                                          ; +0xc1, 0x1800944f1\ncall    __security_check_cookie                                        ; +0xc4, 0x1800944f4\nmov     rbx, [rsp+58h+arg_8]                                           ; +0xc9, 0x1800944f9\nmov     rsi, [rsp+58h+arg_10]                                          ; +0xce, 0x1800944fe\nadd     rsp, 50h                                                       ; +0xd3, 0x180094503\npop     rdi                                                            ; +0xd7, 0x180094507\nretn                                                                   ; +0xd8, 0x180094508", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801b66f0"], "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"}