Code: | Address |Command: |
---|---|
PXLATE CreateXlateObject(
HANDLE hcmXform,){ |
- no machine code - |
/*Allocates an xlate and sets it up.*/ |
// set up the frame pointer 000E216B|push ebp 000E216C|mov ebp, esp // save some registers 000E2174|push ebx 000E2175|push esi 000E2176|push edi |
ASSERTGDI(palDestDC.bValid(),); |
- no machine code - |
ULONG ulTemp; |
000E216E|sub esp, 0C |
// cEntry == 0 means the source palette is an |
000E2171|mov eax, dword ptr [ebp+10] 000E2177|test eax, eax 000E2179|je short 000E2180 000E217B|mov eax, dword ptr [eax+14] 000E217E|jmp short 000E2185 000E2180|mov eax, 100 000E2186|mov dword ptr [ebp-4], eax |
// Allocate room for the structure. |
000E2185|push eax 000E2189|call 0000EDC9 |
... |
|
// Ok, lets build the translate vector. |
000E221A|test edx, edx 000E221F|je 000E2482 000E2225|mov ecx, dword ptr [edx+10] 000E2228|test ch, 08 000E222B|je short 000E2240 000E222D|cmp dword ptr [ebp+0C], eax 000E2230|je 000E2482 000E2236|test byte ptr [ebp+2D], 40 000E223A|jne 000E2482 |
// The source is a compatible bitmap on a |
- no machine code - |
... |
|
ASSERTGDI(cEntry == 256,); |
- no machine code - |
// bug related note: This is a code snippet, |
000E249F|xor eax, eax 000E24A1|lea ecx, [esi+3C] 000E24A4|mov dword ptr [ecx], eax 000E24A6|inc eax 000E24A7|add ecx, 4 000E24AA|cmp eax, 100 000E24AF|jb short 000E24A4 |
if(!palDestSurf.bValid()){// Compatible bitmap to compatible bitmap |
000E24B1|test ebx, ebx 000E24B3|je short 000E24F2 000E24F2|... 000E24F6|jmp 000E2677 |
}else if(palDestSurf.bIsPalDibsection() &&){ |
000E24B5|test byte ptr [ebx+11], 80 000E24B9|je short 000E24DE 000E24BB|push edi 000E24BC|push ebx 000E24BD|call 00048E90 000E24C2|test eax, eax 000E24C4|jne short 000E24F2 000E24F2|... 000E24F6|jmp 000E2677 |
}else if(palDestSurf.bIsPalDibsection() &&){ |
000E24C6|test byte ptr [ebx+11], 80 000E24CD|je short 000E24DE 000E24CA|mov edx, dword ptr [ebp+10] 000E24CF|test edx, edx 000E24D1|je short 000E24DE 000E24D3|push edx 000E24D4|push ebx 000E24D5|call 00048E90 000E24DA|test eax, eax 000E24DC|jne short 000E24F2 000E24F2|... 000E24F6|jmp 000E2677 |
}else if(palDestSurf.bIsPalManaged()){// Compatible bitmap to the screen on a |
000E24DE|mov eax, dword ptr [ebx+10] 000E24E1|test ah, 08 000E24E4|je 000E257E |
if(ptransCurrent == ptransFore){// It's in the foreground or not |
000E24EA|mov eax, dword ptr [ebp+0C] 000E24ED|cmp dword ptr [ebp+8], eax 000E24F0|jne short 000E24FB 000E24F2|... 000E24F6|jmp 000E2677 |
}else{// It's foreground to current |
- no machine code - |
// bug related note: This is a code |
// if: palDestDC.cEntries <= 0, // then: jump to: end of the loop 000E24FB|cmp dword ptr [edi+14], 0 000E24FF|jbe short 000E2533 // ulTemp = ptransFore + 4 000E2501|mov ecx, dword ptr [ebp+0C] 000E250B|lea eax, [ecx+4] // [ebp+10] = ptransCurrent - ptransFore 000E2504|mov edx, dword ptr [ebp+8] 000E2509|sub edx, ecx 000E2512|mov dword ptr [ebp+10], edx // [ebp+1C] = -4 - ptransFore 000E2507|push -4 000E250E|pop ecx 000E250F|sub ecx, dword ptr [ebp+0C] 000E2515|mov dword ptr [ebp+1C], ecx ... // 000E251A|- beginning of the loop - // edx = ptransCurrent - ptransFore 000E251A|mov edx, dword ptr [ebp+10] // ecx = ptransCurrent->ajVector[ulTemp] 000E251D|movzx ecx, byte ptr [eax+edx] // edx = ptransFore->ajVector[ulTemp] 000E2521|movzx edx, byte ptr [eax] // pxlate->ai[edx] = ecx 000E2525|mov dword ptr [edx*4+esi+3C], ecx // ulTemp++ 000E2524|inc eax // ecx = -4 - ptransFore + ulTemp 000E2529|mov ecx, dword ptr [ebp+1C] 000E252C|add ecx, eax // if: ecx < palDestDC.cEntries, // then: jump to: 000E251A 000E252E|cmp ecx, dword ptr [edi+14] 000E2531|jb short 000E251A // 000E2533|- end of the loop - |
// Now map the default colors that |
000E2533|mov ebx, dword ptr [ebx+10] 000E2536|test bh, 10 000E2539|je short 000E254E |
// bug related note: This is a |
000E253B|and dword ptr [esi+3C], 00000000 000E253F|mov dword ptr [esi+3C+(FF*4)], FF 000E2549|jmp 000E2677 |
}else if(!palDestSurf.bIsNoStatic256()){ |
000E254E|test ebx, 00010000 000E2554|jne 000E2677 |
}// All the 20 holy colors are} |
|
}}else if(palDestSurf.bIsMonochrome()){pxlate->vCheckForTrivial();// bug related note: This is a code snippet, |
|
PXLATE pCreateXlate(
ULONG ulNumEntries){ /*This allocates an xlate object with ulNumEntries.*/ |
|
... |
|
return(pxlate);} |