C ++ disassembly eleven (array parameters)

Source: Internet
Author: User
45: arrayparam (ARR, arrsize); 004019e8 Push 5 // function parameter 2 (array length) into Stack 004019ea Lea ECx, [ebp-18h] // get the first address of the array put ecx004019ed push ECx // The first address of the array into the stack 004019ee call @ ILT + 350 (arrayparam) (00401163) // call the function 004019f3 add ESP, 826: void arrayparam (int * Parr, int arrlen) 27: {004018c0 push ebp004018c1 mov EBP, esp004018c3 sub ESP, 44h004018c6 push ebx004018c7 push edi004018c9 Lea EDI, [ebp-44h] 004018cc mov ECx, 11h004018d1 mov eax, 0cccccccch004018d6 rep STOs dword ptr [EDI] 28: For (INT I = 0; I <arrlen; I ++) 004018d8 mov dword ptr [ebp-4], 0004018df JMP arrayparam + 2ah (004018ea) 004018e1 mov eax, dword ptr [ebp-4] 004018e4 add eax, 1004018e7 mov dword ptr [ebp-4], eax004018ea mov ECx, dword ptr [ebp-4] 004018ed CMP ECx, dword ptr [EBP + 0ch] 004018f0 jge arrayparam + 54 h (00401914) 29: {30: STD :: cout <Parr [I] <STD: Endl; 004018f2 push offset @ ILT + 200 (STD: Endl) (004010cd) 004018f7 edX, dword ptr [ebp-4] 004018fa mov eax, dword ptr [EBP + 8] 004018fd mov ECx, dword ptr [eax + EDX * 4] 00401900 push ecx00401901 mov ECx, offset STD :: cout (0047be98) 00401906 call @ ILT + 255 (STD: basic_ostream <char, STD: char_traits <char >:: operator <) (00401104) 00401_ B mov ECx, eax00401_d call @ ILT + 485 (STD: basic_ostream <char, STD: char_traits <char >:: operator <) (004011ea) 31 :} 00401912 JMP arrayparam + 21 H (004018e1) 32:} 00401914 pop edi00401915 pop quit pop ebx00401917 add ESP, 44h0040191a cmp ebp, esp0040191c call _ chkesp (00420720) 00401921 mov ESP, ebp00401923 pop ebp00401924 RET

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.