77范文网 - 专业文章范例文档资料分享平台

IDA简易教程(7)

来源:网络收集 时间:2019-08-28 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

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)在线全文阅读。

IDA简易教程(7).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/jiaoyu/688581.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: