client/data/dr_dll.c (8482B)
1 #include "guest_memory.h" 2 #include <stdlib.h> 3 #include <string.h> 4 5 /* Initial data at RVA 0x0. */ 6 static const unsigned char data_0[] = { 7 0x4d,0x5a,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 8 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 9 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 10 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xc8,0x00,0x00,0x00, 11 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 12 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 13 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 14 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 15 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 16 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 17 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 18 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 19 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x45,0x00,0x00,0x4c,0x01,0x04,0x00, 20 0x26,0xb7,0xdf,0x3e,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xe0,0x00,0x0e,0x21, 21 0x0b,0x01,0x06,0x00,0x00,0x10,0x00,0x00,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00, 22 0x6b,0x1c,0x00,0x00,0x00,0x10,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x2c, 23 0x00,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 24 0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x50,0x00,0x00,0x00,0x10,0x00,0x00, 25 0x00,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00, 26 0x00,0x00,0x10,0x00,0x00,0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0x00,0x00, 27 0xe0,0x20,0x00,0x00,0x79,0x00,0x00,0x00,0x1c,0x20,0x00,0x00,0x3c,0x00,0x00,0x00, 28 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 29 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 30 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 31 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 32 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 33 0x00,0x20,0x00,0x00,0x1c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 34 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 35 0x2e,0x74,0x65,0x78,0x74,0x00,0x00,0x00,0x2e,0x0d,0x00,0x00,0x00,0x10,0x00,0x00, 36 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 37 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x2e,0x72,0x64,0x61,0x74,0x61,0x00,0x00, 38 0x59,0x01,0x00,0x00,0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 39 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x40, 40 0x2e,0x64,0x61,0x74,0x61,0x00,0x00,0x00,0x64,0x02,0x00,0x00,0x00,0x30,0x00,0x00, 41 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 42 0x00,0x00,0x00,0x00,0x40,0x00,0x00,0xc0,0x2e,0x72,0x65,0x6c,0x6f,0x63,0x00,0x00, 43 0x5e,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 44 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x00,0x00,0x42, 45 }; 46 47 /* Initial data at RVA 0x2000. */ 48 static const unsigned char data_1[] = { 49 0xae,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x92,0x20,0x00,0x00,0x74,0x20,0x00,0x00, 50 0x88,0x20,0x00,0x00,0x7c,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x60,0x20,0x00,0x00, 51 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xa2,0x20,0x00,0x00,0x08,0x20,0x00,0x00, 52 0x58,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xca,0x20,0x00,0x00, 53 0x00,0x20,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 54 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xae,0x20,0x00,0x00,0x00,0x00,0x00,0x00, 55 0x92,0x20,0x00,0x00,0x74,0x20,0x00,0x00,0x88,0x20,0x00,0x00,0x7c,0x20,0x00,0x00, 56 0x00,0x00,0x00,0x00,0x5e,0x02,0x66,0x72,0x65,0x65,0x00,0x00,0x0f,0x01,0x5f,0x69, 57 0x6e,0x69,0x74,0x74,0x65,0x72,0x6d,0x00,0x91,0x02,0x6d,0x61,0x6c,0x6c,0x6f,0x63, 58 0x00,0x00,0x9d,0x00,0x5f,0x61,0x64,0x6a,0x75,0x73,0x74,0x5f,0x66,0x64,0x69,0x76, 59 0x00,0x00,0x4d,0x53,0x56,0x43,0x52,0x54,0x2e,0x64,0x6c,0x6c,0x00,0x00,0x5d,0x00, 60 0x44,0x69,0x73,0x61,0x62,0x6c,0x65,0x54,0x68,0x72,0x65,0x61,0x64,0x4c,0x69,0x62, 61 0x72,0x61,0x72,0x79,0x43,0x61,0x6c,0x6c,0x73,0x00,0x4b,0x45,0x52,0x4e,0x45,0x4c, 62 0x33,0x32,0x2e,0x64,0x6c,0x6c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 63 0x00,0x00,0x00,0x00,0x26,0xb7,0xdf,0x3e,0x00,0x00,0x00,0x00,0x30,0x21,0x00,0x00, 64 0x01,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x08,0x21,0x00,0x00, 65 0x18,0x21,0x00,0x00,0x28,0x21,0x00,0x00,0x30,0x11,0x00,0x00,0x40,0x10,0x00,0x00, 66 0x70,0x10,0x00,0x00,0x00,0x10,0x00,0x00,0x37,0x21,0x00,0x00,0x40,0x21,0x00,0x00, 67 0x48,0x21,0x00,0x00,0x52,0x21,0x00,0x00,0x00,0x00,0x01,0x00,0x02,0x00,0x03,0x00, 68 0x64,0x72,0x2e,0x64,0x6c,0x6c,0x00,0x4d,0x44,0x35,0x46,0x69,0x6e,0x61,0x6c,0x00, 69 0x4d,0x44,0x35,0x49,0x6e,0x69,0x74,0x00,0x4d,0x44,0x35,0x55,0x70,0x64,0x61,0x74, 70 0x65,0x00,0x75,0x70,0x64,0x63,0x72,0x63, 71 }; 72 73 /* Initial data at RVA 0x3000. */ 74 static const unsigned char data_2[] = { 75 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 76 0x00,0x00,0xc1,0xc0,0x81,0xc1,0x40,0x01,0x01,0xc3,0xc0,0x03,0x80,0x02,0x41,0xc2, 77 0x01,0xc6,0xc0,0x06,0x80,0x07,0x41,0xc7,0x00,0x05,0xc1,0xc5,0x81,0xc4,0x40,0x04, 78 0x01,0xcc,0xc0,0x0c,0x80,0x0d,0x41,0xcd,0x00,0x0f,0xc1,0xcf,0x81,0xce,0x40,0x0e, 79 0x00,0x0a,0xc1,0xca,0x81,0xcb,0x40,0x0b,0x01,0xc9,0xc0,0x09,0x80,0x08,0x41,0xc8, 80 0x01,0xd8,0xc0,0x18,0x80,0x19,0x41,0xd9,0x00,0x1b,0xc1,0xdb,0x81,0xda,0x40,0x1a, 81 0x00,0x1e,0xc1,0xde,0x81,0xdf,0x40,0x1f,0x01,0xdd,0xc0,0x1d,0x80,0x1c,0x41,0xdc, 82 0x00,0x14,0xc1,0xd4,0x81,0xd5,0x40,0x15,0x01,0xd7,0xc0,0x17,0x80,0x16,0x41,0xd6, 83 0x01,0xd2,0xc0,0x12,0x80,0x13,0x41,0xd3,0x00,0x11,0xc1,0xd1,0x81,0xd0,0x40,0x10, 84 0x01,0xf0,0xc0,0x30,0x80,0x31,0x41,0xf1,0x00,0x33,0xc1,0xf3,0x81,0xf2,0x40,0x32, 85 0x00,0x36,0xc1,0xf6,0x81,0xf7,0x40,0x37,0x01,0xf5,0xc0,0x35,0x80,0x34,0x41,0xf4, 86 0x00,0x3c,0xc1,0xfc,0x81,0xfd,0x40,0x3d,0x01,0xff,0xc0,0x3f,0x80,0x3e,0x41,0xfe, 87 0x01,0xfa,0xc0,0x3a,0x80,0x3b,0x41,0xfb,0x00,0x39,0xc1,0xf9,0x81,0xf8,0x40,0x38, 88 0x00,0x28,0xc1,0xe8,0x81,0xe9,0x40,0x29,0x01,0xeb,0xc0,0x2b,0x80,0x2a,0x41,0xea, 89 0x01,0xee,0xc0,0x2e,0x80,0x2f,0x41,0xef,0x00,0x2d,0xc1,0xed,0x81,0xec,0x40,0x2c, 90 0x01,0xe4,0xc0,0x24,0x80,0x25,0x41,0xe5,0x00,0x27,0xc1,0xe7,0x81,0xe6,0x40,0x26, 91 0x00,0x22,0xc1,0xe2,0x81,0xe3,0x40,0x23,0x01,0xe1,0xc0,0x21,0x80,0x20,0x41,0xe0, 92 0x01,0xa0,0xc0,0x60,0x80,0x61,0x41,0xa1,0x00,0x63,0xc1,0xa3,0x81,0xa2,0x40,0x62, 93 0x00,0x66,0xc1,0xa6,0x81,0xa7,0x40,0x67,0x01,0xa5,0xc0,0x65,0x80,0x64,0x41,0xa4, 94 0x00,0x6c,0xc1,0xac,0x81,0xad,0x40,0x6d,0x01,0xaf,0xc0,0x6f,0x80,0x6e,0x41,0xae, 95 0x01,0xaa,0xc0,0x6a,0x80,0x6b,0x41,0xab,0x00,0x69,0xc1,0xa9,0x81,0xa8,0x40,0x68, 96 0x00,0x78,0xc1,0xb8,0x81,0xb9,0x40,0x79,0x01,0xbb,0xc0,0x7b,0x80,0x7a,0x41,0xba, 97 0x01,0xbe,0xc0,0x7e,0x80,0x7f,0x41,0xbf,0x00,0x7d,0xc1,0xbd,0x81,0xbc,0x40,0x7c, 98 0x01,0xb4,0xc0,0x74,0x80,0x75,0x41,0xb5,0x00,0x77,0xc1,0xb7,0x81,0xb6,0x40,0x76, 99 0x00,0x72,0xc1,0xb2,0x81,0xb3,0x40,0x73,0x01,0xb1,0xc0,0x71,0x80,0x70,0x41,0xb0, 100 0x00,0x50,0xc1,0x90,0x81,0x91,0x40,0x51,0x01,0x93,0xc0,0x53,0x80,0x52,0x41,0x92, 101 0x01,0x96,0xc0,0x56,0x80,0x57,0x41,0x97,0x00,0x55,0xc1,0x95,0x81,0x94,0x40,0x54, 102 0x01,0x9c,0xc0,0x5c,0x80,0x5d,0x41,0x9d,0x00,0x5f,0xc1,0x9f,0x81,0x9e,0x40,0x5e, 103 0x00,0x5a,0xc1,0x9a,0x81,0x9b,0x40,0x5b,0x01,0x99,0xc0,0x59,0x80,0x58,0x41,0x98, 104 0x01,0x88,0xc0,0x48,0x80,0x49,0x41,0x89,0x00,0x4b,0xc1,0x8b,0x81,0x8a,0x40,0x4a, 105 0x00,0x4e,0xc1,0x8e,0x81,0x8f,0x40,0x4f,0x01,0x8d,0xc0,0x4d,0x80,0x4c,0x41,0x8c, 106 0x00,0x44,0xc1,0x84,0x81,0x85,0x40,0x45,0x01,0x87,0xc0,0x47,0x80,0x46,0x41,0x86, 107 0x01,0x82,0xc0,0x42,0x80,0x43,0x41,0x83,0x00,0x41,0xc1,0x81,0x81,0x80,0x40,0x40, 108 0x80, 109 }; 110 111 void game_data_dr_dll(void) { 112 if (!guest_map("dr.dll", 0x2C000000u, 0x5000u)) abort(); 113 memcpy((void *)guest_address(0x2C000000u), data_0, sizeof(data_0)); 114 memcpy((void *)guest_address(0x2C002000u), data_1, sizeof(data_1)); 115 memcpy((void *)guest_address(0x2C003000u), data_2, sizeof(data_2)); 116 }