|
发表于 2024-5-24 21:19:18
|
显示全部楼层
广东省韶关市
举个栗子,GetSystemTime本体在 kernelbase.dll 里,kernel32大部分都在这,我直接把ida里复制过来
void __stdcall GetSystemTime(LPSYSTEMTIME lpSystemTime)
{
union _LARGE_INTEGER Time; // [rsp+20h] [rbp-28h] BYREF
struct _TIME_FIELDS TimeFields; // [rsp+28h] [rbp-20h] BYREF
Time.QuadPart = MEMORY[0x7FFE0014];
RtlTimeToTimeFields(&Time, &TimeFields);
lpSystemTime->wYear = TimeFields.Year;
lpSystemTime->wMonth = TimeFields.Month;
lpSystemTime->wDayOfWeek = TimeFields.Weekday;
lpSystemTime->wDay = TimeFields.Day;
lpSystemTime->wHour = TimeFields.Hour;
lpSystemTime->wMinute = TimeFields.Minute;
lpSystemTime->wSecond = TimeFields.Second;
lpSystemTime->wMilliseconds = TimeFields.Milliseconds;
}
是不是一目了然了 |
|