# 80×86 Architecture: Windows Portable Executable Format

Assembler code

```
.text:00401236
.text:00401236 ; =============== S U B R O U T I N E =======================================
.text:00401236
.text:00401236 ; Attributes: bp-based frame
.text:00401236
.text:00401236 ; void __cdecl sub_401236()
.text:00401236 sub_401236      proc near               ; DATA XREF: start+DB↑o
.text:00401236
.text:00401236 var_1C          = dword ptr -1Ch
.text:00401236 ms_exc          = CPPEH_RECORD ptr -18h
.text:00401236
.text:00401236 ; __unwind { // __SEH_prolog
.text:00401236                 push    0Ch
.text:00401238                 push    offset stru_402078
.text:0040123D                 call    __SEH_prolog
.text:00401242                 mov     [ebp+var_1C], offset unk_4020E0
.text:00401249
.text:00401249 loc_401249:                             ; CODE XREF: sub_401236+3C↓j
.text:00401249                 cmp     [ebp+var_1C], offset unk_4020E0
.text:00401250                 jnb     short loc_401274
.text:00401252 ;   __try { // __except at loc_401267
.text:00401252                 and     [ebp+ms_exc.registration.TryLevel], 0
.text:00401256                 mov     eax, [ebp+var_1C]
.text:00401259                 mov     eax, [eax]
.text:0040125B                 test    eax, eax
.text:0040125D                 jz      short loc_40126A
.text:0040125F                 call    eax
.text:00401261                 jmp     short loc_40126A
.text:00401263 ; ---------------------------------------------------------------------------
.text:00401263
.text:00401263 loc_401263:                             ; DATA XREF: .rdata:stru_402078↓o
.text:00401263 ;   __except filter // owned by 401252
.text:00401263                 xor     eax, eax
.text:00401265                 inc     eax
.text:00401266                 retn
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hex-rays.com/8.4/user-guide/disassembler/disassembly-gallery/80-86-architecture-windows-portable-executable-format.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
