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. Also suggest names for global values when you have enough context to do so. As I provide more information, please revise your explanations and suggestions as necessary.

FUN_00011a6b
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
SUB ESP,0x8
PUSH 0x4d
MOV ECX,s_profile.c_00170129 = "profile.c"
MOV EBX,0x4
MOV EDX,dword ptr [EBP + Stack[0x8]]
MOV EAX,dword ptr [EBP + Stack[0x4]]
ADD EAX,0x4
CALL FUN_000a0ad9
PUSH 0x200
MOV EAX,dword ptr [EBP + Stack[0x8]]
PUSH EAX
CALL open
ADD ESP,0x8
MOV dword ptr [EBP + local_14],EAX
CMP dword ptr [EBP + local_14],-0x1
JNZ LAB_00011ab6
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011c1a
LAB_00011ab6
MOV EBX,0x2
XOR EDX,EDX
MOV EAX,dword ptr [EBP + local_14]
CALL lseek
MOV EDX,EAX
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x88],EDX
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x88]
ADD EAX,0x400
MOV EDX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EDX + 0x8c],EAX
XOR EBX,EBX
XOR EDX,EDX
MOV EAX,dword ptr [EBP + local_14]
CALL lseek
MOV EBX,0x5e
MOV EDX,s_profile.c_00170129 = "profile.c"
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x8c]
CALL FUN_000a00af
MOV EDX,EAX
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x84],EDX
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x84]
TEST EAX,EAX
JNZ LAB_00011b37
MOV EAX,dword ptr [EBP + local_14]
CALL __close
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011c1a
LAB_00011b37
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EBX,dword ptr [EAX + 0x88]
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EDX,dword ptr [EAX + 0x84]
MOV EAX,dword ptr [EBP + local_14]
CALL read
MOV EDX,EAX
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP EDX,dword ptr [EAX + 0x88]
JZ LAB_00011bb1
MOV EAX,dword ptr [EBP + local_14]
CALL __close
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x0
JZ LAB_00011b81
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x97979797
JNZ LAB_00011b83
LAB_00011b81
JMP LAB_00011ba8
LAB_00011b83
MOV EBX,0x6e
MOV EDX,s_profile.c_00170129 = "profile.c"
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x84]
CALL FUN_000a0024
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x84],0x97979797
LAB_00011ba8
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011c1a
LAB_00011bb1
MOV EAX,dword ptr [EBP + local_14]
CALL __close
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EDX,dword ptr [EAX + 0x84]
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x90],EDX
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x94],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0xa0],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0xa4],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x9c],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0xa8],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
AND byte ptr [EAX + 0x1],0x7f
MOV dword ptr [EBP + local_10],0x1
LAB_00011c1a
MOV EAX,dword ptr [EBP + local_10]
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET

FUN_00011c24
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
SUB ESP,0x8
MOV EAX,dword ptr [EBP + Stack[0x4]]
TEST byte ptr [EAX + 0x1],0x80
JZ LAB_00011cc8
PUSH 0x0
PUSH 0x262
MOV EAX,dword ptr [EBP + Stack[0x4]]
ADD EAX,0x4
PUSH EAX
CALL open
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
CMP dword ptr [EBP + local_14],-0x1
JNZ LAB_00011ca6
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x0
JZ LAB_00011c76
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x97979797
JNZ LAB_00011c78
LAB_00011c76
JMP LAB_00011c9d
LAB_00011c78
MOV EBX,0xab
MOV EDX,s_profile.c_00170129 = "profile.c"
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x84]
CALL FUN_000a0024
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x84],0x97979797
LAB_00011c9d
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011d11
LAB_00011ca6
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EBX,dword ptr [EAX + 0x88]
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EDX,dword ptr [EAX + 0x84]
MOV EAX,dword ptr [EBP + local_14]
CALL write
MOV EAX,dword ptr [EBP + local_14]
CALL __close
LAB_00011cc8
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x0
JZ LAB_00011ce3
MOV EAX,dword ptr [EBP + Stack[0x4]]
CMP dword ptr [EAX + 0x84],0x97979797
JNZ LAB_00011ce5
LAB_00011ce3
JMP LAB_00011d0a
LAB_00011ce5
MOV EBX,0xb9
MOV EDX,s_profile.c_00170129 = "profile.c"
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x84]
CALL FUN_000a0024
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EAX + 0x84],0x97979797
LAB_00011d0a
MOV dword ptr [EBP + local_10],0x1
LAB_00011d11
MOV EAX,dword ptr [EBP + local_10]
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET

FUN_00011d1b
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
SUB ESP,0x18
MOV dword ptr [EBP + local_14],0x0
MOV EAX,dword ptr [EBP + Stack[0x4]]
MOV EAX,dword ptr [EAX + 0x84]
MOV dword ptr [EBP + local_24],EAX
MOV dword ptr [EBP + local_18],0x0
LAB_00011d40
MOV EAX,dword ptr [EBP + local_24]
MOV AL,byte ptr [EAX]
AND EAX,0xff
CMP EAX,0x5b
JNZ LAB_00011e02
MOV EAX,dword ptr [EBP + local_24]
MOV dword ptr [EBP + local_20],EAX
MOV EAX,dword ptr [EBP + local_24]
INC dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + Stack[0x8]]
MOV dword ptr [EBP + local_1c],EAX
LAB_00011d65
MOV EAX,dword ptr [EBP + local_24]
MOV DL,byte ptr [EAX]
MOV EAX,dword ptr [EBP + local_1c]
CMP DL,byte ptr [EAX]
JNZ LAB_00011d7f
MOV EAX,dword ptr [EBP + local_18]
MOV EDX,dword ptr [EBP + Stack[0x4]]
CMP EAX,dword ptr [EDX + 0x88]
JC LAB_00011d81
LAB_00011d7f
JMP LAB_00011d95
LAB_00011d81
MOV EAX,dword ptr [EBP + local_1c]
INC dword ptr [EBP + local_1c]
MOV EAX,dword ptr [EBP + local_24]
INC dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + local_18]
INC dword ptr [EBP + local_18]
JMP LAB_00011d65
LAB_00011d95
MOV EAX,dword ptr [EBP + local_24]
MOV AL,byte ptr [EAX]
AND EAX,0xff
CMP EAX,0x5d
JNZ LAB_00011dac
MOV EAX,dword ptr [EBP + local_1c]
CMP byte ptr [EAX],0x0
JZ LAB_00011dae
LAB_00011dac
JMP LAB_00011e02
LAB_00011dae
MOV dword ptr [EBP + local_14],0x1
LAB_00011db5
MOV EAX,dword ptr [EBP + local_24]
MOV AL,byte ptr [EAX]
AND EAX,0xff
CMP EAX,0xa
JZ LAB_00011dcc
MOV EAX,dword ptr [EBP + local_24]
INC dword ptr [EBP + local_24]
JMP LAB_00011db5
LAB_00011dcc
MOV EAX,dword ptr [EBP + local_24]
INC dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + local_24]
MOV EDX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EDX + 0xa8],EAX
MOV EAX,dword ptr [EBP + local_24]
MOV EDX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EDX + 0x90],EAX
MOV EAX,dword ptr [EBP + local_18]
MOV EDX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EDX + 0x94],EAX
MOV EAX,dword ptr [EBP + local_20]
MOV EDX,dword ptr [EBP + Stack[0x4]]
MOV dword ptr [EDX + 0x98],EAX
LAB_00011e02
MOV EAX,dword ptr [EBP + local_24]
INC dword ptr [EBP + local_24]
MOV EAX,dword ptr [EBP + local_18]
INC dword ptr [EBP + local_18]
CMP dword ptr [EBP + local_14],0x0
JNZ LAB_00011e26
MOV EAX,dword ptr [EBP + local_18]
MOV EDX,dword ptr [EBP + Stack[0x4]]
CMP EAX,dword ptr [EDX + 0x88]
JC LAB_00011d40
LAB_00011e26
MOV EAX,dword ptr [EBP + local_14]
MOV dword ptr [EBP + local_10],EAX
MOV EAX,dword ptr [EBP + local_10]
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET

FUN_0001149a
PUSH EBP
MOV EBP,ESP
PUSH ESI
PUSH EDI
SUB ESP,0xb4
PUSH 0x4
PUSH 0xd9
MOV ECX,s_sosez.c_001700d5 = "sosez.c"
MOV EBX,0x10c
XOR EDX,EDX
MOV EAX,DAT_0018dc38
CALL FUN_000a0040
PUSH 0x4
PUSH 0xda
MOV ECX,s_sosez.c_001700d5 = "sosez.c"
MOV EBX,0x2e
XOR EDX,EDX
MOV EAX,DAT_0018dd64
CALL FUN_000a0040
MOV EAX,dword ptr [EBP + Stack[0x4]]
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011a6b
ADD ESP,0x8
TEST AX,AX
JNZ LAB_00011503
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011675
LAB_00011503
MOV EAX,s_DIGITAL_001700dd = "DIGITAL"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011d1b
ADD ESP,0x8
TEST AX,AX
JNZ LAB_00011538
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011c24
ADD ESP,0x4
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011675
LAB_00011538
MOV EAX,DAT_0018dd5c
PUSH EAX=>DAT_0018dd5c
MOV EAX,s_DeviceID_001700e5 = "DeviceID"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
MOV EAX,DAT_0018dc94
PUSH EAX
MOV EAX,s_DevicePort_001700ee = "DevicePort"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
MOV EAX,DAT_0018dc9c
PUSH EAX=>DAT_0018dc9c
MOV EAX,s_DeviceDMA_001700f9 = "DeviceDMA"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
MOV EAX,DAT_0018dc98
PUSH EAX=>DAT_0018dc98
MOV EAX,s_DeviceIRQ_00170103 = "DeviceIRQ"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
CMP word ptr [EBP + local_14],0x0
JNZ LAB_000115d2
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011c24
ADD ESP,0x4
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011675
LAB_000115d2
MOV EAX,s_MIDI_0017010d = "MIDI"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011d1b
ADD ESP,0x8
TEST AX,AX
JNZ LAB_00011604
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011c24
ADD ESP,0x4
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011675
LAB_00011604
MOV EAX,DAT_0018dd54
PUSH EAX
MOV EAX,s_DeviceID_001700e5 = "DeviceID"
PUSH EAX
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
MOV EAX,DAT_0018dd86
PUSH EAX=>DAT_0018dd86
MOV EAX,s_DevicePort_001700ee = "DevicePort"
PUSH EAX=>s_DevicePort_001700ee = "DevicePort"
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_000126b4
ADD ESP,0xc
MOV dword ptr [EBP + local_14],EAX
CMP word ptr [EBP + local_14],0x0
JNZ LAB_0001165f
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011c24
ADD ESP,0x4
MOV dword ptr [EBP + local_10],0x0
JMP LAB_00011675
LAB_0001165f
LEA EAX=>local_c0,[EBP + 0xffffff44]
PUSH EAX
CALL FUN_00011c24
ADD ESP,0x4
MOV dword ptr [EBP + local_10],0x1
LAB_00011675
MOV EAX,dword ptr [EBP + local_10]
LEA ESP=>local_c,[EBP + -0x8]
POP EDI
POP ESI
POP EBP
RET