Function at 0x1003c750
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x20
push ebx
push ebp
push 0x1007afa4
push eax
xor ebp, ebp
call sym.alleg40.dll_pack_fopen
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x1003c775
pop ebp
pop ebx
add esp, 0x20
ret
push esi
push edi
push ebx
lea ecx, [esp + 0x14]
push 0x16
push ecx
call sym.alleg40.dll_pack_fread
add esp, 0xc
mov ecx, 0x13
mov edi, str.Creative_Voice_File
lea esi, [esp + 0x10]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x1003c9c9
push ebx
call sym.alleg40.dll_pack_igetw
add esp, 4
cmp eax, 0x10a
je 0x1003c7ba
cmp eax, 0x114
jne 0x1003c9c9
push ebx
call sym.alleg40.dll_pack_igetw
add esp, 4
cmp eax, 0x1129
je 0x1003c7d5
cmp eax, 0x111f
jne 0x1003c9c9
mov ecx, dword [ebx + 0xc]
dec ecx
mov eax, ecx
mov dword [ebx + 0xc], ecx
test eax, eax
jle 0x1003c7f1
mov eax, dword [ebx + 8]
xor ecx, ecx
mov cl, byte [eax]
inc eax
mov edi, ecx
mov dword [ebx + 8], eax
jmp 0x1003c7fc
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
mov edi, eax
cmp edi, 1
je 0x1003c80a
cmp edi, 9
jne 0x1003c9c9
push ebx
call sym.alleg40.dll_pack_igetw
mov ecx, dword [ebx + 0xc]
add esp, 4
dec ecx
mov esi, eax
mov eax, ecx
mov dword [ebx + 0xc], ecx
test eax, eax
jle 0x1003c82f
mov ecx, dword [ebx + 8]
xor eax, eax
mov al, byte [ecx]
inc ecx
mov dword [ebx + 8], ecx
jmp 0x1003c838
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
shl eax, 0x10
add esi, eax
cmp edi, 1
jne 0x1003c8d1
mov ecx, dword [ebx + 0xc]
sub esi, 2
dec ecx
mov eax, ecx
mov dword [ebx + 0xc], ecx
test eax, eax
jle 0x1003c863
mov ecx, dword [ebx + 8]
xor eax, eax
mov al, byte [ecx]
inc ecx
mov dword [ebx + 8], ecx
jmp 0x1003c86c
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
mov ecx, 0x100
sub ecx, eax
mov eax, 0xf4240
cdq
idiv ecx
mov ecx, dword [ebx + 0xc]
dec ecx
mov dword [ebx + 0xc], ecx
mov edi, eax
mov eax, ecx
test eax, eax
jle 0x1003c88f
inc dword [ebx + 8]
jmp 0x1003c898
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
push esi
push edi
push 0
push 8
call sym.alleg40.dll_create_sample
mov ebp, eax
add esp, 0x10
test ebp, ebp
je 0x1003c9c9
mov edx, dword [ebp + 0x20]
push ebx
push esi
push edx
call sym.alleg40.dll_pack_fread
mov eax, dword [sym.alleg40.dll_allegro_errno]
add esp, 0xc
cmp dword [eax], 0
je 0x1003c9c9
jmp 0x1003c9be
push ebx
sub esi, 0xc
call sym.alleg40.dll_pack_igetw
push ebx
mov dword [esp + 0x3c], eax
call sym.alleg40.dll_pack_igetw
mov ecx, dword [ebx + 0xc]
add esp, 8
dec ecx
mov eax, ecx
mov dword [ebx + 0xc], ecx
test eax, eax
jle 0x1003c903
mov eax, dword [ebx + 8]
xor ecx, ecx
mov cl, byte [eax]
inc eax
mov edi, ecx
mov dword [ebx + 8], eax
jmp 0x1003c90e
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
mov edi, eax
cmp edi, 8
je 0x1003c91c
cmp edi, 0x10
jne 0x1003c9c9
mov ecx, dword [ebx + 0xc]
dec ecx
mov eax, ecx
mov dword [ebx + 0xc], ecx
test eax, eax
jle 0x1003c936
mov ecx, dword [ebx + 8]
xor eax, eax
mov al, byte [ecx]
inc ecx
mov dword [ebx + 8], ecx
jmp 0x1003c93f
push ebx
call sym.alleg40.dll__sort_out_getc
add esp, 4
cmp eax, 1
jne 0x1003c9c9
push ebx
lea edx, [esp + 0x14]
push 6
push edx
call sym.alleg40.dll_pack_fread
lea eax, [esi*8]
cdq
idiv edi
push eax
mov eax, dword [esp + 0x44]
push eax
push 0
push edi
call sym.alleg40.dll_create_sample
mov ebp, eax
add esp, 0x1c
test ebp, ebp
je 0x1003c9c9
cmp edi, 8
jne 0x1003c98b
mov ecx, dword [ebp + 0x20]
push ebx
push esi
push ecx
call sym.alleg40.dll_pack_fread
add esp, 0xc
jmp 0x1003c9b4
mov eax, esi
xor esi, esi
cdq
sub eax, edx
mov edi, eax
sar edi, 1
test edi, edi
jle 0x1003c9b4
push ebx
call sym.alleg40.dll_pack_igetw
mov edx, dword [ebp + 0x20]
xor eax, 0xffff8000
add esp, 4
mov word [edx + esi*2], ax
inc esi
cmp esi, edi
jl 0x1003c99a
mov eax, dword [sym.alleg40.dll_allegro_errno]
cmp dword [eax], 0
je 0x1003c9c9
push ebp
call sym.alleg40.dll_destroy_sample
add esp, 4
xor ebp, ebp
push ebx
call sym.alleg40.dll_pack_fclose
add esp, 4
mov eax, ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret