INTERFACE:00A1 Store_m1b_Segs proc near

INTERFACE:00A1 Store_m1b_Segs  proc near               ; CODE XREF: RAM_MAP+1Ep
INTERFACE:00A1                 pushad
INTERFACE:00A3                 push    es
INTERFACE:00A4                 push    ds
INTERFACE:00A5                 mov     bp, sp
INTERFACE:00A7                 mov     ax, ds
INTERFACE:00A9                 movzx   eax, ax
INTERFACE:00AD                 shl     eax, 4
INTERFACE:00B1                 add     esi, eax
INTERFACE:00B4                 push    0
INTERFACE:00B6                 pop     ds
INTERFACE:00B7                 movzx   ecx, word ptr [esi+2] ; LEN_m1b_header
INTERFACE:00BD                 mov     edx, ecx
INTERFACE:00C0                 sub     sp, cx
INTERFACE:00C2                 mov     bx, sp
INTERFACE:00C4                 push    ss
INTERFACE:00C5                 pop     es
INTERFACE:00C6                 movzx   edi, sp
INTERFACE:00CA                 push    esi
INTERFACE:00CC                 cld
INTERFACE:00CD                 rep movs byte ptr es:[edi], byte ptr [esi] ; Store m1b_header in stack
INTERFACE:00D0                 pop     esi
INTERFACE:00D2                 push    ds
INTERFACE:00D3                 pop     es
INTERFACE:00D4                 movzx   ecx, word ptr ss:[bx+0] ; Количество сегментов
INTERFACE:00D9                 add     esi, edx        ; ESI =
INTERFACE:00DC
INTERFACE:00DC
INTERFACE:00DC
INTERFACE:00DC loc_135FC:                              ; CODE XREF: Store_m1b_Segs+8Dj
INTERFACE:00DC                 add     bx, 4
INTERFACE:00DF                 push    ecx
INTERFACE:00E1                 mov     edi, ss:[bx+0]
INTERFACE:00E5                 cmp     edi, 0E0000h
INTERFACE:00EC                 jb      short loc_1361C
INTERFACE:00EE                 cmp     edi, cs:dword_13679
INTERFACE:00F4                 jnb     short loc_1361C
INTERFACE:00F6                 mov     cs:dword_13679, edi
INTERFACE:00FC
INTERFACE:00FC loc_1361C:                              ; CODE XREF: Store_m1b_Segs+4Bj
INTERFACE:00FC                                         ; Store_m1b_Segs+53j
INTERFACE:00FC                 add     bx, 4
INTERFACE:00FF                 mov     ecx, ss:[bx+0]
INTERFACE:0103                 test    ecx, 80000000h
INTERFACE:010A                 jz      short skip
INTERFACE:010C                 and     ecx, 7FFFFFFFh
INTERFACE:0113                 mov     edx, ecx
INTERFACE:0116                 shr     ecx, 2
INTERFACE:011A                 jz      short loc_13640
INTERFACE:011C                 rep movs dword ptr es:[edi], dword ptr [esi] ; move dd
INTERFACE:0120
INTERFACE:0120 loc_13640:                              ; CODE XREF: Store_m1b_Segs+79j
INTERFACE:0120                 mov     ecx, edx
INTERFACE:0123                 and     ecx, 3
INTERFACE:0127                 jz      short skip
INTERFACE:0129                 rep movs byte ptr es:[edi], byte ptr [esi] ; move last db
INTERFACE:012C
INTERFACE:012C skip:                                   ; CODE XREF: Store_m1b_Segs+69j
INTERFACE:012C                                         ; Store_m1b_Segs+86j
INTERFACE:012C                 pop     ecx
INTERFACE:012E                 loop    loc_135FC