… | |
… | |
1173 | |
1173 | |
1174 | # return a binary windows FILETIME struct |
1174 | # return a binary windows FILETIME struct |
1175 | sub filetime_now { |
1175 | sub filetime_now { |
1176 | my ($s, $ms) = Time::HiRes::gettimeofday; |
1176 | my ($s, $ms) = Time::HiRes::gettimeofday; |
1177 | |
1177 | |
1178 | pack "Q<", $s = ($s * 1_000_000 + $ms) * 10 + 116_444_736_000_000_000 |
1178 | pack "Q<", ($s * 1_000_000 + $ms) * 10 + 116_444_736_000_000_000 |
1179 | } |
1179 | } |
1180 | |
1180 | |
1181 | # encode a registry hive |
1181 | # encode a registry hive |
1182 | sub regf_encode($) { |
1182 | sub regf_encode($) { |
1183 | my ($hive) = @_; |
1183 | my ($hive) = @_; |