OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "sandbox/win/src/service_resolver.h" | 5 #include "sandbox/win/src/service_resolver.h" |
6 | 6 |
7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
8 #include "sandbox/win/src/win_utils.h" | 8 #include "sandbox/win/src/sandbox_nt_util.h" |
rvargas (doing something else)
2013/11/26 20:42:12
Looks like the only thing from win_utils that requ
robertshield
2013/11/27 20:28:01
Ah, that's a much better idea that what I did :) D
| |
9 | 9 |
10 namespace { | 10 namespace { |
11 #pragma pack(push, 1) | 11 #pragma pack(push, 1) |
12 | 12 |
13 const BYTE kMovEax = 0xB8; | 13 const BYTE kMovEax = 0xB8; |
14 const BYTE kMovEdx = 0xBA; | 14 const BYTE kMovEdx = 0xBA; |
15 const USHORT kMovEdxEsp = 0xD48B; | 15 const USHORT kMovEdxEsp = 0xD48B; |
16 const USHORT kCallPtrEdx = 0x12FF; | 16 const USHORT kCallPtrEdx = 0x12FF; |
17 const USHORT kCallEdx = 0xD2FF; | 17 const USHORT kCallEdx = 0xD2FF; |
18 const BYTE kCallEip = 0xE8; | 18 const BYTE kCallEip = 0xE8; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
411 return false; | 411 return false; |
412 } | 412 } |
413 | 413 |
414 // Save the verified code | 414 // Save the verified code |
415 memcpy(local_thunk, &function_code, sizeof(function_code)); | 415 memcpy(local_thunk, &function_code, sizeof(function_code)); |
416 | 416 |
417 return true; | 417 return true; |
418 } | 418 } |
419 | 419 |
420 } // namespace sandbox | 420 } // namespace sandbox |
OLD | NEW |