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. FUN_00050069 is a function that exits the game with an error message.

FUN_0008dce3
PUSH EBP
MOV EBP,ESP
PUSH ECX
PUSH ESI
PUSH EDI
SUB ESP,0x18
MOV dword ptr [EBP + local_28],EAX
MOV dword ptr [EBP + local_24],EDX
MOV dword ptr [EBP + local_20],EBX
MOV EBX,dword ptr [EBP + local_20]
MOV EDX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + local_28]
MOV EAX,dword ptr [EAX + 0x3f]
CALL FUN_0008db21
MOV dword ptr [EBP + local_1c],EAX
MOV EAX,dword ptr [EBP + local_28]
MOV EDX,dword ptr [EBP + local_1c]
MOV dword ptr [EDX + 0x43],EAX
MOV EAX,dword ptr [EBP + local_1c]
MOV dword ptr [EBP + local_18],EAX
LAB_0008dd1b
CMP dword ptr [EBP + local_18],0x0
JZ LAB_0008dd35
MOV EAX,dword ptr [EBP + local_18]
MOV EDX,dword ptr [EBP + local_28]
MOV dword ptr [EDX + 0x3f],EAX
MOV EAX,dword ptr [EBP + local_18]
MOV EAX,dword ptr [EAX + 0x3b]
MOV dword ptr [EBP + local_18],EAX
JMP LAB_0008dd1b
LAB_0008dd35
MOV EAX,dword ptr [EBP + local_1c]
MOV dword ptr [EBP + local_14],EAX
MOV EAX,dword ptr [EBP + local_14]
LEA ESP=>local_10,[EBP + -0xc]
POP EDI
POP ESI
POP ECX
POP EBP
RET

FUN_0008db21
PUSH EBP
MOV EBP,ESP
PUSH ECX
PUSH ESI
PUSH EDI
SUB ESP,0x18
MOV dword ptr [EBP + local_28],EAX
MOV dword ptr [EBP + local_24],EDX
MOV dword ptr [EBP + local_20],EBX
MOV EAX,dword ptr [EBP + local_20]
ADD EAX,0x47
MOV dword ptr [EBP + local_1c],EAX
MOV EAX,dword ptr [EBP + local_1c]
ADD EAX,0x12
SUB dword ptr [DAT_001a9b38],EAX
MOV EDX,dword ptr [EBP + local_1c]
MOV EAX,DAT_00195e18
CALL FUN_00069f8a
MOV dword ptr [EBP + local_18],EAX
CMP dword ptr [EBP + local_18],0x0
JNZ LAB_0008db6b
MOV EAX,s_Unable_to_allocate_OBJECT_memory_00176e70 = "Unable to allocate OBJECT memory."
CALL FUN_00050069
LAB_0008db6b
CMP dword ptr [EBP + local_24],0x0
JZ LAB_0008dbd0
PUSH 0x4
PUSH 0xa3
MOV ECX,s_object.c_00176e44 = "object.c"
MOV EBX,0x37
MOV EDX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + local_18]
CALL FUN_000a1023
PUSH 0x4
PUSH 0xa4
MOV ECX,s_object.c_00176e44 = "object.c"
MOV EBX,dword ptr [EBP + local_1c]
SUB EBX,0x47
MOV EDX,dword ptr [EBP + local_24]
ADD EDX,0x47
MOV EAX,dword ptr [EBP + local_18]
ADD EAX,0x47
CALL FUN_000a1023
PUSH 0x4
PUSH 0xa5
MOV ECX,s_object.c_00176e44 = "object.c"
MOV EBX,0x10
XOR EDX,EDX
MOV EAX,dword ptr [EBP + local_18]
ADD EAX,0x37
CALL FUN_000a0040
JMP LAB_0008dbfb
LAB_0008dbd0
PUSH 0x4
PUSH 0xa9
MOV ECX,s_object.c_00176e44 = "object.c"
MOV EBX,dword ptr [EBP + local_1c]
XOR EDX,EDX
MOV EAX,dword ptr [EBP + local_18]
CALL FUN_000a0040
MOV EAX,0x1
CALL FUN_0008eb88
MOV EDX,EAX
MOV EAX,dword ptr [EBP + local_18]
MOV dword ptr [EAX + 0x1f],EDX
LAB_0008dbfb
CMP dword ptr [EBP + local_28],0x0
JZ LAB_0008dc0c
MOV EDX,dword ptr [EBP + local_18]
MOV EAX,dword ptr [EBP + local_28]
CALL FUN_0008e09a
LAB_0008dc0c
MOV EAX,dword ptr [EBP + local_18]
MOV dword ptr [EBP + local_14],EAX
MOV EAX,dword ptr [EBP + local_14]
LEA ESP=>local_10,[EBP + -0xc]
POP EDI
POP ESI
POP ECX
POP EBP
RET

FUN_00069f8a
PUSH EBP
MOV EBP,ESP
PUSH EBX
PUSH ECX
PUSH ESI
PUSH EDI
SUB ESP,0x18
MOV dword ptr [EBP + local_2c],EAX
MOV dword ptr [EBP + local_28],EDX
MOV EAX,dword ptr [EBP + local_28]
INC EAX
AND AL,0xfe
MOV dword ptr [EBP + local_1c],EAX
ADD dword ptr [EBP + local_1c],0x12
MOV EAX,dword ptr [EBP + local_2c]
MOV EAX,dword ptr [EAX + 0x4]
MOV dword ptr [EBP + local_24],EAX
LAB_00069fb3
CMP dword ptr [EBP + local_24],0x0
JZ LAB_00069fea
MOV EAX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EAX + 0xc]
CMP EAX,dword ptr [EBP + local_1c]
JL LAB_00069fd5
MOV EAX,dword ptr [EBP + local_24]
MOV AX,word ptr [EAX + 0x10]
AND EAX,0x1
CWDE
TEST EAX,EAX
JZ LAB_00069fe6
LAB_00069fd5
MOV EAX,dword ptr [EBP + local_24]
MOV dword ptr [EBP + local_20],EAX
MOV EAX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EAX + 0x4]
MOV dword ptr [EBP + local_24],EAX
JMP LAB_00069fe8
LAB_00069fe6
JMP LAB_00069fea
LAB_00069fe8
JMP LAB_00069fb3
LAB_00069fea
CMP dword ptr [EBP + local_24],0x0
JNZ LAB_00069ffc
MOV dword ptr [EBP + local_18],0x0
JMP LAB_0006a098
LAB_00069ffc
MOV EAX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EAX + 0xc]
CMP EAX,dword ptr [EBP + local_1c]
JZ LAB_0006a05d
MOV EAX,dword ptr [EBP + local_24]
ADD EAX,dword ptr [EBP + local_1c]
MOV dword ptr [EBP + local_20],EAX
MOV EAX,dword ptr [EBP + local_24]
MOV EDX,dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EBP + local_20]
MOV dword ptr [EAX + 0x4],EDX
MOV EAX,dword ptr [EBP + local_24]
MOV EDX,dword ptr [EBP + local_20]
MOV dword ptr [EDX + 0x8],EAX
MOV EAX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EAX + 0xc]
SUB EAX,dword ptr [EBP + local_1c]
MOV EDX,dword ptr [EBP + local_20]
MOV dword ptr [EDX + 0xc],EAX
MOV EAX,dword ptr [EBP + local_20]
MOV word ptr [EAX + 0x10],0x0
MOV EAX,dword ptr [EBP + local_20]
MOV dword ptr [EAX],0x69696969
MOV EAX,dword ptr [EBP + local_20]
CMP dword ptr [EAX + 0x4],0x0
JZ LAB_0006a05b
MOV EAX,dword ptr [EBP + local_20]
MOV EDX,dword ptr [EAX + 0x4]
MOV EAX,dword ptr [EBP + local_20]
MOV dword ptr [EDX + 0x8],EAX
LAB_0006a05b
JMP LAB_0006a06a
LAB_0006a05d
MOV EAX,dword ptr [EBP + local_24]
MOV EAX,dword ptr [EAX + 0x4]
MOV dword ptr [EBP + local_20],EAX
ADD dword ptr [EBP + local_1c],0x12
LAB_0006a06a
MOV EAX,dword ptr [EBP + local_20]
MOV EDX,dword ptr [EBP + local_24]
MOV dword ptr [EDX + 0x4],EAX
MOV EAX,dword ptr [EBP + local_1c]
SUB EAX,0x12
MOV EDX,dword ptr [EBP + local_24]
MOV dword ptr [EDX + 0xc],EAX
MOV EAX,dword ptr [EBP + local_24]
OR byte ptr [EAX + 0x10],0x1
MOV EAX,dword ptr [EBP + local_24]
MOV dword ptr [EAX],0x69696969
MOV EAX,dword ptr [EBP + local_24]
ADD EAX,0x12
MOV dword ptr [EBP + local_18],EAX
LAB_0006a098
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_000a1023
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
PUSH EAX
MOV EDI,EAX
MOV dword ptr [EBP + local_10],EDX
MOV ESI,EBX
PUSH ECX
PUSH dword ptr [EBP + Stack[0x4]]
PUSH dword ptr [EBP + Stack[0x8]]
CALL FUN_000a0f39
MOV EBX,ESI
MOV EDX,dword ptr [EBP + local_10]
MOV EAX,EDI
CALL FUN_000a71e9
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET 0x8

FUN_000a0f39
PUSH EBP
MOV EBP,ESP
PUSH dword ptr [EBP + Stack[0xc]]
PUSH dword ptr [EBP + Stack[0x8]]
CALL FUN_000a0ed9
CMP byte ptr [DAT_00188aad],0x1
JNZ LAB_000a0f58
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV [DAT_00188aba],EAX
LAB_000a0f58
POP EBP
RET 0xc

FUN_000a71e9 
PUSH EBP
MOV EBP,ESP
PUSH ECX
PUSH ESI
PUSH EDI
PUSH EAX
MOV ESI,EAX
MOV EDI,EDX
MOV dword ptr [EBP + local_14],EBX
MOV EAX,0x11
CALL FUN_000a3580
CALL FUN_000a3477
TEST AL,AL
JZ LAB_000a721d
PUSH ESI
PUSH EDI
PUSH dword ptr [EBP + local_14]
PUSH 0x4
PUSH 0x8011
PUSH 0x0
CALL FUN_000a89e8
LAB_000a721d
MOV EBX,dword ptr [EBP + local_14]
MOV EDX,EDI
MOV EAX,ESI
CALL memcpy
MOV ESI,EAX
CALL FUN_000a3594
MOV EAX,ESI
LEA ESP=>local_10,[EBP + -0xc]
POP EDI
POP ESI
POP ECX
POP EBP
RET