Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
5098 | clevermous | 1 | pop esi |
2 | push esi |
||
3 | loader_patch4: |
||
4 | mov ecx, 0 ; will be patched: number of calltrick entries |
||
5 | ctrloop: |
||
6 | lodsb |
||
7 | @@: |
||
8 | cmp al, 0xF |
||
9 | jnz .f |
||
10 | lodsb |
||
11 | cmp al, 80h |
||
12 | jb @b |
||
13 | cmp al, 90h |
||
14 | jb @f |
||
15 | .f: |
||
16 | sub al, 0E8h |
||
17 | cmp al, 1 |
||
18 | ja ctrloop |
||
19 | @@: |
||
20 | cmp byte [esi], 0 ; will be patched: code in calltrick entries |
||
21 | loader_patch5: |
||
22 | jnz ctrloop |
||
23 | lodsd |
||
24 | ; "bswap eax" is not supported on i386 |
||
25 | ; mov al,0/bswap eax = 4 bytes, following instructions = 9 bytes |
||
26 | shr ax, 8 |
||
27 | ror eax, 16 |
||
28 | xchg al, ah |
||
29 | sub eax, esi |
||
30 | add eax, [esp] |
||
31 | mov [esi-4], eax |
||
32 | loop ctrloop |