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_000a0ad9
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
MOV EDI,EAX
MOV ESI,EDX
PUSH ECX
PUSH dword ptr [EBP + Stack[0x4]]
PUSH EBX
CALL FUN_000a0f39
PUSH 0x17
CALL FUN_000a34b8
CALL FUN_000a3477
TEST AL,AL
JZ LAB_000a0b27
PUSH ESI
PUSH dword ptr [PTR_s_source_0018d687] = "source"
PUSH 0x0
CALL FUN_000a88cd
TEST EAX,EAX
JNZ LAB_000a0b27
PUSH EDI
PUSH ESI
MOV EAX,ESI
CALL strlen
INC EAX
PUSH EAX
PUSH 0x4
PUSH 0x8017
PUSH 0x0
CALL FUN_000a89e8
LAB_000a0b27
MOV EDX,ESI
MOV EAX,EDI
CALL strcpy__0
MOV ESI,EAX
CALL FUN_000a351e
MOV EAX,ESI
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET 0x4

FUN_000a0f39
PUSH EBP
MOV EBP,ESP
PUSH dword ptr [EBP + param_7]
PUSH dword ptr [EBP + param_6]
CALL FUN_000a0ed9
CMP byte ptr [DAT_00188aad],0x1
JNZ LAB_000a0f58
MOV param_1,dword ptr [EBP + param_5]
MOV [DAT_00188aba],param_1
LAB_000a0f58
POP EBP
RET 0xc

FUN_000a34b8
PUSH EBP
MOV EBP,ESP
CMP dword ptr [DAT_0018d754],0x0
JZ LAB_000a34dc
CMP dword ptr [DAT_0018d758],0x0
SETZ AL
MOVZX EAX,AL
TEST EAX,EAX
JZ LAB_000a34dc
PUSH 0x0
CALL FUN_000a8db9
LAB_000a34dc
MOV AL,byte ptr [EBP + Stack[0x4]]
MOV [DAT_00188aa3],AL
INC byte ptr [DAT_00188acc]
CMP byte ptr [DAT_00188acb],0x0
JZ LAB_000a351a
CMP byte ptr [DAT_00188acc],0x1
JNZ LAB_000a351a
MOV [DAT_00188aac],AL
MOV dword ptr [DAT_00188abe],0x0
MOV dword ptr [DAT_00188ac7],0x0
CALL FUN_000a3350
LAB_000a351a
POP EBP
RET 0x4

FUN_000a3440
CMP byte ptr [DAT_00188acb],0x0
JZ LAB_000a3474
CMP byte ptr [DAT_00188acc],0x1
JNZ LAB_000a3474
LAB_000a3452
TEST byte ptr [DAT_00188a43],0x4
JZ LAB_000a3464
CMP byte ptr [DAT_00188aad],0x0
JZ LAB_000a3470
LAB_000a3464
MOV EAX,0x1
LAB_000a3469
TEST EAX,EAX
JZ LAB_000a3474
MOV AL,0x1
RET
LAB_000a3470
XOR EAX,EAX
JMP LAB_000a3469
LAB_000a3474
XOR AL,AL
RET

FUN_000a3477
CMP byte ptr [DAT_00188acb],0x0
JZ LAB_000a3474
CMP byte ptr [DAT_00188acc],0x1
JNZ LAB_000a3474
TEST byte ptr [DAT_00188a42],0x2
SETZ AL
MOVZX EAX,AL
TEST EAX,EAX
JZ LAB_000a3474
JMP LAB_000a3452

FUN_000a351e
CMP byte ptr [DAT_00188acb],0x0
JZ LAB_000a3557
CMP byte ptr [DAT_00188acc],0x1
JNZ LAB_000a3557
CMP byte ptr [DAT_00188aad],0x0
JZ LAB_000a353f
DEC byte ptr [DAT_00188aad]
LAB_000a353f
CMP byte ptr [DAT_00188aad],0x0
JNZ LAB_000a3552
MOV dword ptr [DAT_00188aba],0x0
LAB_000a3552
CALL FUN_000a338e
LAB_000a3557
CMP byte ptr [DAT_00188acc],0x0
JZ LAB_000a3566
DEC byte ptr [DAT_00188acc]
LAB_000a3566
CMP byte ptr [DAT_00188acc],0x0
JNZ LAB_000a357f
CMP dword ptr [DAT_0018d754],0x0
JZ LAB_000a357f
PUSH 0x1
CALL FUN_000a8db9
LAB_000a357f
RET

FUN_000a88cd(void)
PUSH EBP
MOV EBP,ESP
PUSH ESI
CMP dword ptr [EBP + Stack[0xc]],0x10
SETC AL
MOVZX EAX,AL
MOV ESI,EAX
TEST EAX,EAX
JZ LAB_000a8902
PUSH 0xe
CALL FUN_000a926c
PUSH dword ptr [EBP + Stack[0xc]]
PUSH dword ptr [EBP + Stack[0x8]]
CALL FUN_000a915f
PUSH EAX
PUSH dword ptr [PTR_s_%s:_invalid_%s_ptr_0x%p_(GPF)_0018d70f] = address of string "%s: invalid %s ptr 0x%p (GPF)"
CALL FUN_000a375b
ADD ESP,0x10
LAB_000a8902
MOV EAX,ESI
POP ESI
POP EBP
RET 0xc

FUN_000a89e8
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
SUB ESP,0x30
MOV EDI,dword ptr [EBP + Stack[0x10]]
MOV ESI,dword ptr [EBP + Stack[0x18]]
XOR EBX,EBX
MOV AL,byte ptr [EBP + Stack[0x8]]
MOV byte ptr [EBP + local_10],AL
CMP dword ptr [DAT_0018d73c],0x0
JNZ LAB_000a8cf2
MOV dword ptr [DAT_0018d73c],0x1
MOV dword ptr [DAT_00188aae],EBX
CMP dword ptr [EBP + Stack[0x4]],0x0
JNZ LAB_000a8a27
LEA EAX=>local_3c,[EBP + -0x38]
MOV dword ptr [EBP + Stack[0x4]],EAX
LAB_000a8a27
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX]=>local_3c,0x0
TEST EDI,EDI
JZ LAB_000a8a6f
PUSH ESI
PUSH dword ptr [PTR_s_destination_0018d68b] = address of string "destination"
PUSH 0x1
CALL FUN_000a88cd
TEST EAX,EAX
JNZ LAB_000a8a59
LEA EAX,[EDI + -0x1]
ADD EAX,ESI
PUSH EAX
PUSH dword ptr [PTR_s_destination_0018d68b]
PUSH 0x1
CALL FUN_000a88cd
LAB_000a8a59
CMP dword ptr [EBP + Stack[0x14]],-0x6
JZ LAB_000a8a6f
PUSH dword ptr [EBP + Stack[0x14]]
PUSH dword ptr [PTR_s_source_0018d687] = address of string "source"
PUSH 0x0
CALL FUN_000a88cd
LAB_000a8a6f
TEST byte ptr [EBP + Stack[0x9]],0x80
JZ LAB_000a8ac2
MOV EAX,ESI
SUB EAX,dword ptr [EBP + Stack[0x14]]
TEST EAX,EAX
JLE LAB_000a8ac2
CMP EAX,EDI
JGE LAB_000a8ac2
PUSH 0xa
CALL FUN_000a926c
MOV byte ptr [DAT_00188ace],0x2
PUSH EDI
CALL FUN_000a915f
PUSH EAX
PUSH dword ptr [PTR_s_%s,len=%lu:_source_overlaps_dest_0018d6f3] = address of string "%s,len=%lu: source overlaps dest..."
CALL FUN_000a375b
ADD ESP,0xc
PUSH dword ptr [EBP + Stack[0x14]]
PUSH ESI
MOVZX EAX,byte ptr [EBP + local_10]
PUSH dword ptr [EAX*0x4 + PTR_s_mc_startcheck_00188f01] = address of array of function name strings
PUSH dword ptr [PTR_s__%s_dest_is_0x%p,_source_is_0x%p_0018d6f7] = address of string "  %s dest is 0x%p, source is 0x%p"
CALL FUN_000a375b
ADD ESP,0x10
LAB_000a8ac2
CMP byte ptr [DAT_00188aad],0x1
JNZ LAB_000a8aed
CMP dword ptr [DAT_00188aba],0x0
JZ LAB_000a8aed
CMP dword ptr [DAT_00188aba],0x2
JZ LAB_000a8aed
CMP dword ptr [DAT_00188aba],0x4
JZ LAB_000a8aed
MOV EAX,0x1
JMP LAB_000a8aef
LAB_000a8aed
XOR EAX,EAX
LAB_000a8aef
MOV dword ptr [EBP + local_20],EAX
TEST EAX,EAX
JZ LAB_000a8b20
CMP EDI,dword ptr [DAT_00188aba]
JBE LAB_000a8b20
PUSH 0xc
CALL FUN_000a926c
PUSH dword ptr [DAT_00188aba]
PUSH EDI
CALL FUN_000a915f
PUSH EAX
PUSH dword ptr [PTR_s_%s,len=%lu:_overwrites_dest,_siz_0018d6ff] = address of string "%s,len=%lu: overwrites dest, size=%u"
CALL FUN_000a375b
ADD ESP,0x10
LAB_000a8b20
TEST byte ptr [DAT_00188a42],0x20
JZ LAB_000a8c39
MOV EAX,ESI
CALL FUN_000a8909
MOVZX EAX,AL
MOV dword ptr [EBP + local_24],EAX
TEST EAX,EAX
JNZ LAB_000a8b4e
MOV EAX,dword ptr [EBP + Stack[0x14]]
CALL FUN_000a8909
TEST AL,AL
JZ LAB_000a8c39
LAB_000a8b4e
PUSH dword ptr [EBP + Stack[0xc]]
CALL FUN_000bb1c2
MOV dword ptr [EBP + local_1c],EAX
MOV dword ptr [EBP + local_14],0x0
CMP dword ptr [EBP + local_24],0x0
JZ LAB_000a8b75
CMP ESI,EAX
SETC AL
MOVZX EAX,AL
MOV dword ptr [EBP + local_14],EAX
TEST EAX,EAX
JNZ LAB_000a8b8b
LAB_000a8b75
CMP dword ptr [EBP + local_24],0x0
JNZ LAB_000a8c01
MOV EAX,dword ptr [EBP + Stack[0x14]]
CMP EAX,dword ptr [EBP + local_1c]
JNC LAB_000a8c01
LAB_000a8b8b
PUSH 0x7
CALL FUN_000a926c
MOV byte ptr [DAT_00188ace],0x2
CMP dword ptr [EBP + local_14],0x0
JZ LAB_000a8ba6
MOV EAX=>s_destination_0018d1b4,[PTR_s_destination_0018d68b]
JMP LAB_000a8bab
LAB_000a8ba6 XREF[1]
MOV EAX=>s_source_0018d1ad,[PTR_s_source_0018d687]
LAB_000a8bab
PUSH EAX
PUSH EDI
CALL FUN_000a915f
PUSH EAX
PUSH dword ptr [PTR_s_%s,len=%lu:_invalid_stack_%s..._0018d6e7] = address of string "%s,len=%lu: invalid stack %s..."
CALL FUN_000a375b
ADD ESP,0x10
CMP dword ptr [EBP + local_14],0x0
JZ LAB_000a8bcb
MOV EAX,ESI
JMP LAB_000a8bce
LAB_000a8bcb
MOV EAX,dword ptr [EBP + Stack[0x14]]
LAB_000a8bce
MOV EBX,dword ptr [EBP + local_1c]
SUB EBX,EAX
PUSH EBX
CMP dword ptr [EBP + local_14],0x0
JZ LAB_000a8bde
MOV EAX,ESI
JMP LAB_000a8be1
LAB_000a8bde
MOV EAX,dword ptr [EBP + Stack[0x14]]
LAB_000a8be1
PUSH EAX
JZ LAB_000a8beb
MOV EAX,[PTR_s_destination_0018d68b]
JMP LAB_000a8bf0
LAB_000a8beb
MOV EAX=>s_source_0018d1ad,[PTR_s_source_0018d687]
LAB_000a8bf0
PUSH EAX
PUSH dword ptr [PTR_s__%s_pointer_0x%p_is_%u_bytes_bel_0018d6eb] = address of string "  %s pointer 0x%p is %u bytes below stack top"
CALL FUN_000a375b
ADD ESP,0x10
JMP LAB_000a8c39
LAB_000a8c01
CMP dword ptr [EBP + local_24],0x0
JZ LAB_000a8c39
CMP EDI,0xffff
JA LAB_000a8c1d
PUSH ESI
PUSH EDI
PUSH -0x1
CALL FUN_000bb1ea
TEST AX,AX
JZ LAB_000a8c39
LAB_000a8c1d
PUSH 0x8
CALL FUN_000a926c
PUSH EDI
CALL FUN_000a915f
PUSH EAX
PUSH dword ptr [PTR_s_%s,len=%lu:_overwrites_stack_fra_0018d6ef] = address of string "%s,len=%lu: overwrites stack frame"
CALL FUN_000a375b
ADD ESP,0xc
LAB_000a8c39
CMP dword ptr [EBP + local_20],0x0
JNZ LAB_000a8c6c
TEST byte ptr [DAT_00188a42],0x2
SETZ AL
MOVZX EAX,AL
TEST EAX,EAX
JZ LAB_000a8c6c
PUSH ESI
PUSH dword ptr [EBP + Stack[0x4]]
CALL FUN_000a9075
TEST EAX,EAX
JZ LAB_000a8c6c
MOVZX EAX,byte ptr [EBP + local_10]
PUSH EAX
PUSH dword ptr [EBP + Stack[0x4]]
PUSH EDI
PUSH ESI
CALL FUN_000a8928
LAB_000a8c6c
TEST EDI,EDI
JZ LAB_000a8ca8
CMP dword ptr [DAT_00188aae],0x0
JNZ LAB_000a8ca8
MOVZX EAX,byte ptr [EBP + local_10]
MOV dword ptr [EBP + local_18],EAX
PUSH EAX
PUSH ESI
PUSH dword ptr [PTR_s_destination_0018d68b]
CALL FUN_000b2ba3
TEST EAX,EAX
JNZ LAB_000a8ca8
CMP dword ptr [EBP + Stack[0x14]],-0x6
JZ LAB_000a8ca8
PUSH dword ptr [EBP + local_18]
PUSH dword ptr [EBP + Stack[0x14]]
PUSH dword ptr [PTR_s_source_0018d687]
CALL FUN_000b2ba3
LAB_000a8ca8
MOV EBX,dword ptr [DAT_00188aae]
MOV EAX,dword ptr [EBP + Stack[0x14]]
MOV [DAT_00188ac7],EAX
CMP dword ptr [->FUN_000b7690],0x0
JZ LAB_000a8ce8
TEST byte ptr [DAT_00188a42],0x2
SETZ AL
MOVZX EAX,AL
TEST EAX,EAX
JZ LAB_000a8ce8
PUSH EDI
PUSH ESI
PUSH EBX
INC byte ptr [DAT_00188ac2]
CALL dword ptr [->FUN_000b7690]
ADD ESP,0xc
DEC byte ptr [DAT_00188ac2]
LAB_000a8ce8
MOV dword ptr [DAT_0018d73c],0x0
LAB_000a8cf2
MOV EAX,EBX
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET 0x18