{"type": "func", "start": 6442980432, "end": 6442980551, "name": "cocos2d::gettimeofday", "pseudocode": "// \n// cocos2d::gettimeofday from 0x180081450 to 0x1800814c7 (119 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCTime::gettimeofdayCocos2d @ 0x180074efb\n// > cocos2d::CCProfilingBeginTimingBlock @ 0x180097c0a\n// > cocos2d::CCProfilingEndTimingBlock @ 0x180097c53\n// > cocos2d::CCProfilingResetTimingBlock @ 0x180097e32\n// > <???> @ 0x18014cf68\n// > <???> @ 0x1801bf1cc\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:02 +0000\n// \n\n__int64 __fastcall cocos2d::gettimeofday(cocos2d *this, struct timeval *a2, struct cocos2d::timezone *a3)\n{\n  signed int LowPart; // r9d\n  int v5; // eax\n  double v6; // xmm3_8\n  LARGE_INTEGER PerformanceCount; // [rsp+30h] [rbp+8h] BYREF\n  LARGE_INTEGER Frequency; // [rsp+40h] [rbp+18h] BYREF\n\n  if ( this )\n  {\n    QueryPerformanceFrequency(&Frequency);\n    QueryPerformanceCounter(&PerformanceCount);\n    LowPart = Frequency.LowPart;\n    v5 = PerformanceCount.QuadPart / Frequency.QuadPart;\n    v6 = (double)(int)PerformanceCount.LowPart;\n    *(_DWORD *)this = v5;\n    *((_DWORD *)this + 1) = (int)(v6 * 1000000.0 / (double)LowPart - (double)v5 * 1000000.0);\n  }\n  return 0;\n}", "assembly": "; \n; cocos2d::gettimeofday from 0x180081450 to 0x1800814c7 (119 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCTime::gettimeofdayCocos2d @ 0x180074efb\n; > cocos2d::CCProfilingBeginTimingBlock @ 0x180097c0a\n; > cocos2d::CCProfilingEndTimingBlock @ 0x180097c53\n; > cocos2d::CCProfilingResetTimingBlock @ 0x180097e32\n; > <???> @ 0x18014cf68\n; > <???> @ 0x1801bf1cc\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:02 +0000\n; \npush    rbx                                                            ; +0x0, 0x180081450\nsub     rsp, 20h                                                       ; +0x2, 0x180081452\nmov     rbx, rcx                                                       ; +0x6, 0x180081456\ntest    rcx, rcx                                                       ; +0x9, 0x180081459\njz      short loc_1800814BF                                            ; +0xc, 0x18008145c\nlea     rcx, [rsp+28h+Frequency]; lpFrequency                          ; +0xe, 0x18008145e\ncall    cs:QueryPerformanceFrequency                                   ; +0x13, 0x180081463\nlea     rcx, [rsp+28h+PerformanceCount]; lpPerformanceCount            ; +0x19, 0x180081469\ncall    cs:QueryPerformanceCounter                                     ; +0x1e, 0x18008146e\nmov     r8, qword ptr [rsp+28h+PerformanceCount]                       ; +0x24, 0x180081474\nxorps   xmm3, xmm3                                                     ; +0x29, 0x180081479\nmov     r9, qword ptr [rsp+28h+Frequency]                              ; +0x2c, 0x18008147c\nmov     rax, r8                                                        ; +0x31, 0x180081481\ncqo                                                                    ; +0x34, 0x180081484\nxorps   xmm0, xmm0                                                     ; +0x36, 0x180081486\nidiv    r9                                                             ; +0x39, 0x180081489\ncvtsi2sd xmm3, r8                                                      ; +0x3c, 0x18008148c\nmov     [rbx], eax                                                     ; +0x41, 0x180081491\ncvtsi2sd xmm0, r9                                                      ; +0x43, 0x180081493\nmulsd   xmm3, cs:qword_180107940                                       ; +0x48, 0x180081498\nmovd    xmm1, eax                                                      ; +0x50, 0x1800814a0\ncvtdq2pd xmm1, xmm1                                                    ; +0x54, 0x1800814a4\ndivsd   xmm3, xmm0                                                     ; +0x58, 0x1800814a8\nmulsd   xmm1, cs:qword_180107940                                       ; +0x5c, 0x1800814ac\nsubsd   xmm3, xmm1                                                     ; +0x64, 0x1800814b4\ncvttsd2si eax, xmm3                                                    ; +0x68, 0x1800814b8\nmov     [rbx+4], eax                                                   ; +0x6c, 0x1800814bc\nxor     eax, eax                                                       ; +0x6f, 0x1800814bf\nadd     rsp, 20h                                                       ; +0x71, 0x1800814c1\npop     rbx                                                            ; +0x75, 0x1800814c5\nretn                                                                   ; +0x76, 0x1800814c6", "xrefs": ["cocos2d::CCTime::gettimeofdayCocos2d @ 0x180074efb", "cocos2d::CCProfilingBeginTimingBlock @ 0x180097c0a", "cocos2d::CCProfilingEndTimingBlock @ 0x180097c53", "cocos2d::CCProfilingResetTimingBlock @ 0x180097e32", "<???> @ 0x18014cf68", "<???> @ 0x1801bf1cc"], "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"}