- static const uint8_t p7[7] = { 0x8d, 0xa4, 0x24, 0x00, 0x00, 0x00, 0x00 };
- static const uint8_t p6[6] = { 0x8d, 0x9b, 0x00, 0x00, 0x00, 0x00 };
- static const uint8_t p5[5] = { 0x05, 0x00, 0x00, 0x00, 0x00 }; // add eax, 0
- static const uint8_t p4[4] = { 0x8d, 0x64, 0x24, 0x00 }; // lea
- static const uint8_t p3[3] = { 0x8d, 0x49, 0x00 }; // lea ecx, [ecx]
- static const uint8_t p2[2] = { 0x8b, 0xff }; // mov edi, edi
- static const uint8_t p1[1] = { 0x90 }; // nop
+ static const uint8_t aligns[8][7] = {
+ { }, // [0] not used
+ { 0x90 }, // [1] nop
+ { 0x8b, 0xff }, // mov edi, edi
+ { 0x8d, 0x49, 0x00 }, // lea ecx, [ecx]
+ { 0x8d, 0x64, 0x24, 0x00 }, // lea
+ { 0x05, 0x00, 0x00, 0x00, 0x00 }, // add eax, 0
+ { 0x8d, 0x9b, 0x00, 0x00, 0x00, 0x00 },
+ { 0x8d, 0xa4, 0x24, 0x00, 0x00, 0x00, 0x00 },
+ };
+ int j = 0;