else if
(software_info.plateform check_software+Ej
mov cl, [ebp+software_info] and ecx, PC or MAC test cl, MAC
jz short not_MAC
mov dl, [ebp+software_info] & MAC) {
if (!
(software_info.plateform & PC)
&&
((software_info.os & WINDOWS)
||
(software_info.os
& DOS)))
valid = false; }
else
valid = false;
return valid; } and edx, PC or MAC test dl, PC jnz short end
mov cl, [ebp+software_info] shr ecx, 2
and ecx, (WINDOWS or DOS or OS_X) >> 2 test cl, WINDOWS >> 2 jnz short not_windows
mov dl, [ebp+software_info] shr edx, 2
and edx, (WINDOWS or DOS or OS_X) >> 2 test dl, DOS >> 2 jz short end
not_windows: ; CODE XREF: check_software+4Fj xor eax, eax jmp short end
; --------------------------------------------------------------
not_MAC: ; CODE XREF: check_software+36j xor eax, eax
end: ; CODE XREF: check_software+19j ... xor edx, edx mov dl, al mov eax, edx pop ebp retn
check_software endp
; -------------------------------------------------------------- align 4
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||| ; Attributes: bp-based frame int ; int __cdecl
check_product(product_catcheck_product(product_category_t egory_t product_category) product_category) check_product proc near ; CODE XREF: { print_product+Ap main+D8p product_category= dword ptr 8 push ebp bool valid = true; mov ebp, esp if (product_category == push ebx HARDWARE) mov bl, 1 { cmp [ebp+product_category], HARDWARE valid = false; jnz short not_hardware printf(\ xor ebx, ebx hardware push offset aWeDonTSellHardwareForThe ; for the format moment...\\n\ call _printf } pop ecx not_hardware: ; CODE XREF: check_product+Aj xor eax, eax mov al, bl pop ebx return valid; pop ebp } retn check_product endp
; ||||||||||||||| S U B R O U T I N E |||||||||||||||||||||||||| ; Attributes: bp-based frame void ; void __cdecl print_customer(customer_t print_customer(customer_t *customer) *customer) print_customer proc near ; CODE XREF:
{ main+19p
customer= dword ptr 8
push ebp
mov ebp, esp
printf(\%s (%c)\\n\
customer->id, customer->name, customer->sex); }
void print_book(book_t *book) {
printf(\book->title); }
mov eax, [ebp+customer]
movsx edx, byte ptr [eax+customer_t.sex] push edx
lea ecx, [eax+customer_t.name] push ecx
push [eax+customer_t.id]
push offset aCustomer04xSC ; format call _printf add esp, 10h pop ebp retn
print_customer endp
; ||||||||||||||| S U B R O U T I N E ||||||||||||||||||||||||||
; Attributes: bp-based frame
; void __cdecl print_book(book_t *book) print_book proc near ; CODE XREF: print_product+38p
book= dword ptr 8
push ebp
mov ebp, esp push [ebp+book]
push offset aBookS ; format call _printf add esp, 8 pop ebp retn
print_book endp
; ------------------------------------------------------------- align 4
; ||||||||||||||| S U B R O U T I N E ||||||||||||||||||||||||| ; Attributes: bp-based frame void ; void __cdecl print_software(software_t print_software(software_t *software) *software) print_software proc near ; CODE XREF: { print_product+44p software= dword ptr 8 push ebp mov ebp, esp push ebx push esi mov ebx, [ebp+software] mov esi, offset aWeDonTSellHardwareForThe
printf(\ lea eax, [ebx+software_t.name] software->name); push eax lea edx, (aSoftwareS - aWeDonTSellHardwareForThe)[esi] push edx ; format call _printf if (software- add esp, 8
>info.plateform & PC) mov cl, byte ptr [ebx+software_t.info] and ecx, PC or MAC test cl, PC printf(\ jz short not_pc lea eax, (aPc - aWeDonTSellHardwareForThe)[esi] push eax ; format call _printf pop ecx if (software-not_pc:
>info.plateform & MAC) mov dl, byte ptr [ebx+software_t.info] and edx, PC or MAC test dl, MAC printf(\ jz short not_mac lea ecx, (aMac -
aWeDonTSellHardwareForThe)[esi] push ecx ; format call _printf pop ecx printf(\ not_mac: lea eax, (asc_40A31B - aWeDonTSellHardwareForThe)[esi] push eax ; format call _printf if (software->info.os & pop ecx WINDOWS) mov dl, byte ptr [ebx+software_t.info] shr edx, 2 and edx, (WINDOWS or DOS or OS_X) >> 2 printf(\ test dl, WINDOWS >> 2 jz short not_windows lea ecx, (aWindows - aWeDonTSellHardwareForThe)[esi] push ecx ; format call _printf pop ecx
if (software->info.os & not_windows: DOS) mov al, byte ptr [ebx+software_t.info] shr eax, 2 and eax, (WINDOWS or DOS or OS_X) >> 2 printf(\ test al, DOS >> 2 jz short not_dos lea edx, (aDos - aWeDonTSellHardwareForThe)[esi] push edx ; format call _printf pop ecx
if (software->info.os & not_dos: OS_X) mov cl, byte ptr [ebx+software_t.info] shr ecx, 2 and ecx, (WINDOWS or DOS or OS_X) >> 2 printf(\ test cl, OS_X >> 2 jz short not_os_x lea eax, (aOsX - aWeDonTSellHardwareForThe)[esi] push eax ; format
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说教育文库IDA简易教程(7)在线全文阅读。
相关推荐: