{"type": "func", "start": 6442968176, "end": 6442968295, "name": "cocos2d::gettimeofday", "pseudocode": "// \n// cocos2d::gettimeofday from 0x18007e470 to 0x18007e4e7 (119 bytes)\n// \n// 6 xrefs:\n// > cocos2d::CCTime::gettimeofdayCocos2d @ 0x1800729bb\n// > cocos2d::CCProfilingBeginTimingBlock @ 0x1800944e7\n// > cocos2d::CCProfilingEndTimingBlock @ 0x180094533\n// > cocos2d::CCProfilingResetTimingBlock @ 0x1800946e1\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801b4ee4\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__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 0x18007e470 to 0x18007e4e7 (119 bytes)\n; \n; 6 xrefs:\n; > cocos2d::CCTime::gettimeofdayCocos2d @ 0x1800729bb\n; > cocos2d::CCProfilingBeginTimingBlock @ 0x1800944e7\n; > cocos2d::CCProfilingEndTimingBlock @ 0x180094533\n; > cocos2d::CCProfilingResetTimingBlock @ 0x1800946e1\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801b4ee4\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\npush    rbx                                                            ; +0x0, 0x18007e470\nsub     rsp, 20h                                                       ; +0x2, 0x18007e472\nmov     rbx, rcx                                                       ; +0x6, 0x18007e476\ntest    rcx, rcx                                                       ; +0x9, 0x18007e479\njz      short loc_18007E4DF                                            ; +0xc, 0x18007e47c\nlea     rcx, [rsp+28h+Frequency]; lpFrequency                          ; +0xe, 0x18007e47e\ncall    cs:QueryPerformanceFrequency                                   ; +0x13, 0x18007e483\nlea     rcx, [rsp+28h+PerformanceCount]; lpPerformanceCount            ; +0x19, 0x18007e489\ncall    cs:QueryPerformanceCounter                                     ; +0x1e, 0x18007e48e\nmov     r8, qword ptr [rsp+28h+PerformanceCount]                       ; +0x24, 0x18007e494\nxorps   xmm3, xmm3                                                     ; +0x29, 0x18007e499\nmov     r9, qword ptr [rsp+28h+Frequency]                              ; +0x2c, 0x18007e49c\nmov     rax, r8                                                        ; +0x31, 0x18007e4a1\ncqo                                                                    ; +0x34, 0x18007e4a4\nxorps   xmm0, xmm0                                                     ; +0x36, 0x18007e4a6\nidiv    r9                                                             ; +0x39, 0x18007e4a9\ncvtsi2sd xmm3, r8                                                      ; +0x3c, 0x18007e4ac\nmov     [rbx], eax                                                     ; +0x41, 0x18007e4b1\ncvtsi2sd xmm0, r9                                                      ; +0x43, 0x18007e4b3\nmulsd   xmm3, cs:qword_180101270                                       ; +0x48, 0x18007e4b8\nmovd    xmm1, eax                                                      ; +0x50, 0x18007e4c0\ncvtdq2pd xmm1, xmm1                                                    ; +0x54, 0x18007e4c4\ndivsd   xmm3, xmm0                                                     ; +0x58, 0x18007e4c8\nmulsd   xmm1, cs:qword_180101270                                       ; +0x5c, 0x18007e4cc\nsubsd   xmm3, xmm1                                                     ; +0x64, 0x18007e4d4\ncvttsd2si eax, xmm3                                                    ; +0x68, 0x18007e4d8\nmov     [rbx+4], eax                                                   ; +0x6c, 0x18007e4dc\nxor     eax, eax                                                       ; +0x6f, 0x18007e4df\nadd     rsp, 20h                                                       ; +0x71, 0x18007e4e1\npop     rbx                                                            ; +0x75, 0x18007e4e5\nretn                                                                   ; +0x76, 0x18007e4e6", "xrefs": ["cocos2d::CCTime::gettimeofdayCocos2d @ 0x1800729bb", "cocos2d::CCProfilingBeginTimingBlock @ 0x1800944e7", "cocos2d::CCProfilingEndTimingBlock @ 0x180094533", "cocos2d::CCProfilingResetTimingBlock @ 0x1800946e1", "<???> @ 0x1801438a8", "<???> @ 0x1801b4ee4"], "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"}