#include <precomp.h>
#include <debug.h>
Go to the source code of this file.
|
PeSect * | pesection (Pe *pe, const char *name) |
|
u16int | peget2 (const unsigned char *ptr) |
|
u32int | peget4 (const unsigned char *ptr) |
|
u64int | peget8 (const unsigned char *ptr) |
|
int | readn (void *filectx, char *buffer, ulong size) |
|
int | seek (void *filectx, ulong position, int origin) |
|
static int | readblock (void *fd, DwarfBlock *b, ulong off, ulong len) |
|
int | loaddisksection (Pe *pe, char *name, DwarfBlock *b) |
|
int | loadmemsection (Pe *pe, char *name, DwarfBlock *b) |
|
void * | RosSymAllocMemZero (ulong size, ulong count) |
|
int | GetStrnlen (const char *string, int maxlen) |
|
void | pefree (Pe *pe) |
|
void | xfree (void *v) |
|
ulong | pefindrva (struct _IMAGE_SECTION_HEADER *SectionHeaders, int NumberOfSections, ulong TargetPhysical) |
|
◆ NDEBUG
Definition at line 3 of file pe.c.
◆ GetStrnlen()
Definition at line 94 of file pe.c.
94 {
96 for (
i = 0;
i < maxlen &&
string[
i];
i++);
98}
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
◆ loaddisksection()
Definition at line 63 of file pe.c.
64{
67 return -1;
68 return readblock(pe->
fd,
b,
s->PointerToRawData,
s->SizeOfRawData);
69}
GLboolean GLboolean GLboolean b
PeSect * pesection(Pe *pe, const char *name)
static int readblock(void *fd, DwarfBlock *b, ulong off, ulong len)
◆ loadmemsection()
Definition at line 72 of file pe.c.
73{
75
77 return -1;
78 werrstr(
"Loading section %s (ImageBase %x RVA %x)\n",
name, pe->
fd,
s->VirtualAddress);
80 b->len =
s->SizeOfRawData;
81 PCHAR DataSource = ((
char *)pe->
fd) +
s->VirtualAddress;
82 werrstr(
"Copying to %x from %x (%x)\n", DataSource,
b->data,
b->len);
84
85 return s->SizeOfRawData;
86}
#define RosSymAllocMem(Size)
#define RtlCopyMemory(Destination, Source, Length)
◆ pefindrva()
Definition at line 113 of file pe.c.
113 {
115 werrstr(
"Finding RVA for Physical %x\n", TargetPhysical);
116 for (
i = 0;
i < NumberOfSections;
i++) {
117 werrstr(
"Section %d name %s Raw %x Virt %x\n",
120 SectionHeaders[
i].PointerToRawData,
122 if (TargetPhysical >= SectionHeaders[
i].PointerToRawData &&
123 TargetPhysical < SectionHeaders[
i].PointerToRawData + SectionHeaders[
i].SizeOfRawData) {
126 }
127 }
129}
#define ANSI_NAME_STRING(s)
_Must_inspect_result_ _In_ WDFDMATRANSACTION _In_ PFN_WDF_PROGRAM_DMA _In_ WDF_DMA_DIRECTION _In_ PMDL _In_ PVOID VirtualAddress
◆ pefree()
Definition at line 100 of file pe.c.
100 {
104 }
107}
NTSYSAPI VOID NTAPI RtlFreeAnsiString(PANSI_STRING AnsiString)
struct _IMAGE_SECTION_HEADER * sect
◆ peget2()
Definition at line 26 of file pe.c.
◆ peget4()
Definition at line 30 of file pe.c.
◆ peget8()
Definition at line 34 of file pe.c.
34 {
36}
unsigned long long u64int
◆ pesection()
Definition at line 6 of file pe.c.
7{
18 pe->
sect[
i].SizeOfRawData);
20 }
21 }
24}
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
◆ readblock()
Definition at line 48 of file pe.c.
49{
52 return -1;
56 return -1;
57 }
59 return 0;
60}
int seek(void *filectx, ulong position, int origin)
int readn(void *filectx, char *buffer, ulong size)
◆ readn()
Definition at line 38 of file pe.c.
38 {
40}
#define RosSymReadFile(FileContext, Buffer, Size)
◆ RosSymAllocMemZero()
Definition at line 88 of file pe.c.
88 {
92}
GLuint GLuint GLsizei count
◆ seek()
Definition at line 42 of file pe.c.
42 {
45}
#define RosSymSeekFile(FileContext, Position)
Referenced by all_renderers_seek(), BmpDecoder_ReadHeaders(), check_bom(), ConvertFromREFTIME(), ConvertToREFTIME(), fdi_decomp(), found_getposition(), found_setposition(), FoundCapabilities(), FoundDuration(), GdipLoadImageFromStream(), get_decoder_info(), GifDecoder_Initialize(), has_png_transparency_chunk(), IcoDecoder_GetFrame(), IcoDecoder_Initialize(), ImagingFactory_CreateDecoderFromStream(), load_emf(), load_wmf(), MCICDA_Seek(), MediaSeekingPassThru_CheckCapabilities(), MediaSeekingPassThru_ConvertTimeFormat(), MediaSeekingPassThru_GetAvailable(), MediaSeekingPassThru_GetCapabilities(), MediaSeekingPassThru_GetCurrentPosition(), MediaSeekingPassThru_GetDuration(), MediaSeekingPassThru_GetPositions(), MediaSeekingPassThru_GetPreroll(), MediaSeekingPassThru_GetRate(), MediaSeekingPassThru_GetStopPosition(), MediaSeekingPassThru_GetTimeFormat(), MediaSeekingPassThru_IsFormatSupported(), MediaSeekingPassThru_IsUsingTimeFormat(), MediaSeekingPassThru_QueryPreferredFormat(), MediaSeekingPassThru_SetPositions(), MediaSeekingPassThru_SetRate(), MediaSeekingPassThru_SetTimeFormat(), PropertyStorage_ReadFromStream(), PropertyStorage_WriteDictionaryToStream(), PropertyStorage_WriteHeadersToStream(), PropertyStorage_WritePropertyToStream(), PropertyStorage_WriteToStream(), ReadIcoDib(), TgaDecoder_Frame_CopyPalette(), TgaDecoder_Initialize(), and TgaDecoder_ReadImage().
◆ xfree()
Definition at line 109 of file pe.c.
109 {
111}
#define RosSymFreeMem(Area)
Referenced by _rdpdr_check_fds(), cache_put_brush_data(), cache_put_text(), cliprdr_send_native_format_announce(), free_key_translation(), licence_process_request(), lspci_process(), NotifyInfo(), QMyMainWindow::paintEvent(), printercache_load_blob(), printercache_mkdir(), printercache_rename_blob(), printercache_save_blob(), printercache_unlink_blob(), process_bitmap_updates(), process_bmpcache(), process_bmpcache2(), process_colcache(), process_palette(), process_polygon(), process_polygon2(), process_polyline(), process_raw_bmpcache(), pstcache_load_bitmap(), rdpdr_process_irp(), rdpdr_remove_iorequest(), rdpdr_send_available(), rdssl_sign_ok(), seamless_process(), seamless_process_line(), sec_connect(), sw_remove_window(), tcp_disconnect(), tcp_recv(), tcp_reset_state(), ui_clip_format_announce(), ui_create_bitmap(), ui_create_colourmap(), ui_create_cursor(), ui_destroy_colourmap(), ui_paint_bitmap(), ui_set_colourmap(), vncDeleteBuffer(), xclip_handle_PropertyNotify(), xclip_send_data_with_convert(), xkeymap_from_locale(), and xkeymap_open().