I will provide you disassembly from a computer game that runs in MS-DOS. The game was written in C with a Watcom compiler. Some library function calls are already identified. Explain the functions I give to you and suggest names and C-language function signatures for them, including which parameters map to which registers or stack values. Also suggest names for global values if you have enough context to do so.

Within FUN_000a0040 is a call to another function that calls memset.
The documentation for int386 is:
"int int386( int inter_no,
	 const union REGS *in_regs,
	 union REGS *out_regs );

The int386 function causes the computer's central processor (CPU) to
be interrupted with an interrupt whose number is given by "inter_no".
This function is present in the 386 C libraries and may be executed on
80386/486 systems. Before the interrupt, the CPU registers are loaded
from the structure located by "in_regs". Following the interrupt, the
structure located by "out_regs" is filled with the contents of the CPU
registers. These structures	may be located at the same location in
memory.

You should consult the technical documentation for the computer that
you are using to determine the expected register contents before and
after the interrupt in question."

The documentation for int386x is:
"int int386x( int inter_no,
	 const union REGS *in_regs,
	 union REGS *out_regs,
	 struct SREGS *seg_regs );

The int386x function causes the computer's central processor (CPU) to
be interrupted with an interrupt whose number is given by "inter_no".
This function is present in the 386 C libraries and may be executed on
80386/486 systems. Before the interrupt, the CPU registers are loaded
from the structure located by "in_regs" and the DS, ES, FS and GS
segment registers are loaded from the structure located by "seg_regs".
Following the interrupt, the structure located by "out_regs" is filled
with the contents of the CPU registers. The "in_regs" and "out_regs"
structures may be located at the same location in memory. The
original values of the DS, ES, FS and GS registers are restored. The
structure "seg_regs" is updated with the values of the segment
registers following the interrupt.

You should consult the technical documentation for the computer that
you are using to determine the expected register contents before and
after the interrupt in question."

The documentation for segread is:
"void segread( struct SREGS *seg_regs );

The segread  function  places the values of the segment registers into
the structure located by "seg_regs"."

FUN_00099490
PUSH EBP
MOV EBP,ESP
PUSH EBX
PUSH ECX
PUSH EDX
PUSH ESI
PUSH EDI
SUB ESP,0x2c
MOV dword ptr [EBP + local_1c],EAX
PUSH 0x4
PUSH 0x27
MOV ECX,s_int.c_00177348 = "int.c"
MOV EBX,0xc
XOR EDX,EDX
LEA EAX=>local_28,[EBP + -0x24]
CALL FUN_000a0040
MOV dword ptr [EBP + local_44],0x500
MOV EAX,dword ptr [EBP + local_1c]
MOV dword ptr [EBP + local_30],EAX
MOV AX,DS
MOV EBX,dword ptr [EBP + local_1c]
MOV EDX,EAX
MOV EAX,EBX
MOV word ptr [EBP + local_28],DX
LEA ECX=>local_28,[EBP + -0x24]
LEA EBX=>local_44,[EBP + -0x40]
LEA EDX=>local_44,[EBP + -0x40]
MOV EAX,0x31
CALL int386x
LEA ESP=>local_18,[EBP + -0x14]
POP EDI
POP ESI
POP EDX
POP ECX
POP EBX
POP EBP
RET

FUN_000994f0
PUSH EBP
MOV EBP,ESP
PUSH EBX
PUSH ECX
PUSH ESI
PUSH EDI
SUB ESP,0x28
MOV dword ptr [EBP + local_1c],EAX
MOV dword ptr [EBP + local_20],EDX
CMP dword ptr [EBP + local_1c],0x0
JZ LAB_0009950f
CMP dword ptr [EBP + local_20],0x0
JNZ LAB_00099518
LAB_0009950f
MOV dword ptr [EBP + local_18],0x0
JMP LAB_00099571
LAB_00099518
PUSH 0x4
PUSH 0x42
MOV ECX,s_int.c_00177348 = "int.c"
MOV EBX,0x1c
XOR EDX,EDX
LEA EAX=>local_3c,[EBP + -0x38]
CALL FUN_000a0040
MOV word ptr [EBP + local_3c],0x600
MOV EAX,dword ptr [EBP + local_1c]
SAR EAX,0x10
MOV word ptr [EBP + local_38],AX
MOV EAX,dword ptr [EBP + local_1c]
MOV word ptr [EBP + local_34],AX
MOV EAX,dword ptr [EBP + local_20]
SAR EAX,0x10
MOV word ptr [EBP + local_2c],AX
MOV EAX,dword ptr [EBP + local_20]
MOV word ptr [EBP + local_28],AX
LEA EBX=>local_3c,[EBP + -0x38]
LEA EDX=>local_3c,[EBP + -0x38]
MOV EAX,0x31
CALL int386
MOV EAX,dword ptr [EBP + local_24]
AND EAX,0x1
MOV dword ptr [EBP + local_18],EAX
LAB_00099571
MOV EAX,dword ptr [EBP + local_18]
LEA ESP=>local_14,[EBP + -0x10]
POP EDI
POP ESI
POP ECX
POP EBX
POP EBP
RET

FUN_0009957d
PUSH EBP
MOV EBP,ESP
PUSH EBX
PUSH ECX
PUSH ESI
PUSH EDI
SUB ESP,0x28
MOV dword ptr [EBP + local_1c],EAX
MOV dword ptr [EBP + local_20],EDX
CMP dword ptr [EBP + local_1c],0x0
JZ LAB_0009959c
CMP dword ptr [EBP + local_20],0x0
JNZ LAB_000995a5
LAB_0009959c
MOV dword ptr [EBP + local_18],0x0
JMP LAB_000995fe
LAB_000995a5
PUSH 0x4
PUSH 0x56
MOV ECX,s_int.c_00177348 = "int.c"
MOV EBX,0x1c
XOR EDX,EDX
LEA EAX=>local_3c,[EBP + -0x38]
CALL FUN_000a0040
MOV word ptr [EBP + local_3c],0x601
MOV EAX,dword ptr [EBP + local_1c]
SAR EAX,0x10
MOV word ptr [EBP + local_38],AX
MOV EAX,dword ptr [EBP + local_1c]
MOV word ptr [EBP + local_34],AX
MOV EAX,dword ptr [EBP + local_20]
SAR EAX,0x10
MOV word ptr [EBP + local_2c],AX
MOV EAX,dword ptr [EBP + local_20]
MOV word ptr [EBP + local_28],AX
LEA EBX=>local_3c,[EBP + -0x38]
LEA EDX=>local_3c,[EBP + -0x38]
MOV EAX,0x31
CALL int386
MOV EAX,dword ptr [EBP + local_24]
AND EAX,0x1
MOV dword ptr [EBP + local_18],EAX
LAB_000995fe
MOV EAX,dword ptr [EBP + local_18]
LEA ESP=>local_14,[EBP + -0x10]
POP EDI
POP ESI
POP ECX
POP EBX
POP EBP
RET

FUN_0009960a
PUSH EBP
MOV EBP,ESP
PUSH EBX
PUSH ECX
PUSH EDX
PUSH ESI
PUSH EDI
SUB ESP,0x28
LEA EAX=>local_24,[EBP + -0x20]
CALL FUN_000a3327
MOV byte ptr [EBP + local_38],0x0
MOV word ptr [EBP + local_40],0xff30
LEA ECX=>local_24,[EBP + -0x20]
LEA EBX=>local_40,[EBP + -0x3c]
LEA EDX=>local_40,[EBP + -0x3c]
MOV EAX,0x31
CALL int386x
LEA ESP=>local_18,[EBP + -0x14]
POP EDI
POP ESI
POP EDX
POP ECX
POP EBX
POP EBP
RET