




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































































Based on the search results, I have identified the core knowledge domains for eCRE. However, the search results do not contain complete, verifiable content for all 250 questions with proper citations. What I found includes:
I will generate the first 50 questions based on verified topics from the search results, with correct answers, explanations, and references. This will give you a high-quality foundation. You can then confirm if you want me to continue to 250.
Question 1 Which register in IA-32 architecture typically holds the return address after a CALL instruction?
D) OF (Overflow Flag) Answer 2: B Explanation: ZF is set when the result of the last operation is zero, allowing conditional jumps like JZ/JE. Reference: x86 Instruction Set Reference, EFLAGS Register Description
Question 3 Which flag is set when a subtraction operation results in a borrow? A) CF B) ZF C) PF D) OF Answer 3: A Explanation: The Carry Flag (CF) is set when an arithmetic operation generates a carry out of the most significant bit (for addition) or a borrow (for subtraction).
Reference: IA-32 Intel Architecture Software Developer's Manual, Volume 1, Chapter 3.4.
Question 4 Which flag is set when an arithmetic operation produces a signed overflow? A) CF B) ZF C) SF D) OF Answer 4: D Explanation: OF (Overflow Flag) indicates that the signed result cannot be represented in the destination size. Reference: x86 Instruction Set Reference, EFLAGS Register
Question 5
Answer 6: C Explanation: ESP (Extended Stack Pointer) points to the top of the current stack frame. Reference: IA-32 Architecture Basics, Register Set
Question 7 What is the size of a general-purpose register in IA-32 architecture? A) 8 bits B) 16 bits C) 32 bits D) 64 bits Answer 7: C Explanation: IA-32 (Intel Architecture, 32-bit) uses 32-bit general- purpose registers including EAX, EBX, ECX, EDX, ESI, EDI, EBP, and ESP. Reference: IA-32 Intel Architecture Software Developer's Manual, Volume 1, Chapter 3
Question 8 Which register is traditionally used as the base pointer for stack frames? A) ESP B) EBP C) EIP D) ECX Answer 8: B Explanation: EBP (Extended Base Pointer) is used as the frame pointer, providing a stable reference for accessing function parameters and local variables. Reference: x86 Calling Conventions, Stack Frame Layout
Question 9 The EIP register in IA-32 contains: A) The current stack top
Explanation: PUSH decrements the stack pointer (ESP) by the operand size and then writes the operand to the new top of the stack . Reference: x86 Instruction Set Reference, PUSH
(Questions 11-20) Question 11 In a typical function prologue, which instruction sequence correctly establishes a stack frame? A) push ebp; mov ebp, esp; sub esp, n B) mov ebp, esp; push ebp; sub esp, n C) sub esp, n; push ebp; mov ebp, esp D) push ebx; mov ebp, esp; sub esp, n Answer 11: A Explanation: The standard prologue saves the old base pointer (push ebp), sets EBP to the current ESP (mov ebp, esp), then allocates space for local variables (sub esp, n).
Question 12 Which instruction sequence correctly restores the stack frame in a function epilogue? A) mov esp, ebp; pop ebp; ret B) pop ebp; mov esp, ebp; ret C) leave; ret D) add esp, n; pop ebp; ret Answer 12: C Explanation: The LEAVE instruction performs "mov esp, ebp; pop ebp", followed by RET to return to the caller. Reference: x86 Instruction Set Reference, LEAVE
Question 13
Answer 14: C Explanation: The fastcall convention uses ECX and EDX for the first two integer arguments; remaining arguments are passed on the stack. Reference: Microsoft x64 Calling Convention, fastcall
Question 15 What does the fastcall convention use to return a value? A) ECX B) EDX C) EAX D) ESP Answer 15: C Explanation: Return values are placed in EAX for most calling conventions, including fastcall. Reference: x86 Calling Conventions, Return Values
Question 16 What does the instruction "RET 0x10" do? A) Returns and pops 0x10 bytes from the stack B) Returns and adds 0x10 to EAX C) Jumps to address 0x D) Returns without modifying the stack Answer 16: A Explanation: RET imm16 pops the return address from the stack and adds the immediate value to ESP, cleaning additional parameters from the stack. Reference: x86 Instruction Set Reference, RET
Question 17 In the stdcall calling convention, who cleans the stack? A) The caller B) The callee
Question 19 How are arguments typically passed in the cdecl calling convention? A) In registers only B) On the stack, from right to left C) On the stack, from left to right D) In global variables Answer 19: B Explanation: cdecl pushes arguments onto the stack from right to left, allowing variable-argument functions like printf. Reference: x86 Calling Conventions, cdecl Argument Passing
Question 20 In a function with the prologue "push ebp; mov ebp, esp; sub esp, 0x20", how much space is allocated for local variables? A) 0x10 bytes
B) 0x20 bytes C) 32 bytes D) Both B and C Answer 20: D Explanation: sub esp, 0x20 allocates 0x20 (32 decimal) bytes on the stack for local variables. Reference: x86 Stack Frame Layout
Question 21 What is the primary purpose of the .idata section in a PE file? A) Store executable code B) Store initialized global variables C) Store import table entries D) Store resource data
Question 23 When converting a virtual address (VA) to a file offset, which value must be subtracted from the VA? A) Image Base B) Section's VirtualAddress C) Section's PointerToRawData D) Section's SizeOfRawData Answer 23: B Explanation: VA - Section.VirtualAddress + Section.PointerToRawData yields the file offset. Reference: PE File Format, RVA to Offset Conversion
Question 24 In a PE file, the "SizeOfImage" field specifies: A) Size of the file on disk
B) Size of the headers only C) Total memory size the image occupies when loaded D) Size of the .text section Answer 24: C Explanation: SizeOfImage is the amount of virtual memory required for the image, including all sections aligned to page boundaries. Reference: Microsoft PE/COFF Specification, IMAGE_OPTIONAL_HEADER
Question 25 Which PE header field indicates the entry point of the executable? A) ImageBase B) AddressOfEntryPoint C) BaseOfCode D) SectionAlignment Answer 25: B