Function at 0x489860
Capabilities:
Create thread
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xac
mov eax, dword [0x5153d4]
xor eax, esp
mov dword [esp + 0xa8], eax
cmp dword [0x7732a0], 0
push ebx
push esi
push edi
mov byte [0x7b7477], 0
je 0x489cd6
cmp dword [0x6f45c4], 0
je 0x489cd6
push 0
push 0
push 0x489020
call dword [sym.imp.MSACM32.dll_acmDriverEnum]
mov eax, dword [0x7c2a84]
test eax, eax
je 0x489cd6
push 0
push eax
push 0x7c2a80
call dword [sym.imp.MSACM32.dll_acmDriverOpen]
test eax, eax
jne 0x489cd6
mov ax, word [0x50f9c0]
movups xmm0, xmmword [str.audiocdaudio.wad]
push 0x3e
mov word [esp + 0x74], ax
lea eax, [esp + 0x76]
push 0
push eax
movups xmmword [esp + 0x6c], xmm0
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x7c2a8c]
add esp, 0xc
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x489914
push eax
call ebx
mov dword [0x7c2a8c], 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
lea eax, [esp + 0x60]
push 0
push 0x8000080
push 3
push 0
push 0
push DirectSoundEnumerateA
push eax
call esi
mov dword [0x7c2a8c], eax
cmp eax, 0xffffffff
jne 0x489989
lea eax, [esp + 0x60]
push eax
push 0x50f46c
push 0x7d1178
call dword [sym.imp.USER32.dll_wsprintfA]
mov eax, dword [0x7c2a8c]
add esp, 0xc
test eax, eax
je 0x48996b
push eax
call ebx
mov dword [0x7c2a8c], 0
push 0
push 0x8000080
push 3
push 0
push 0
push DirectSoundEnumerateA
push 0x7d1178
call esi
mov dword [0x7c2a8c], eax
push 0x16040
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, dword [sym.imp.KERNEL32.dll_ReadFile]
push 0
push 0x7c2aa8
push 0x8818
mov dword [0x7c2a98], eax
add eax, 0x20
push 0x7ba110
push dword [0x7c2a8c]
and eax, 0xffffffe0
mov dword [0x7c2a9c], eax
call edi
xor ecx, ecx
cmp dword [0x7ba214], ecx
jne 0x4899e0
mov eax, 0x7ba214
lea eax, [eax + 0x10c]
inc ecx
cmp dword [eax], 0
je 0x4899d4
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
imul eax, ecx, 0x10c
push 0
push 0
push dword [eax + 0x7ba218]
push dword [0x7c2a8c]
call esi
push 1
push 0
push 0x14
push dword [0x7c2a8c]
call esi
push 0
push 0x7c2aa8
push 0x32
push 0x7ccd14
push dword [0x7c2a8c]
call edi
mov eax, 1
mov word [0x7ccd48], ax
lea eax, [esp + 0x30]
push eax
push 0x32
push 0
call dword [sym.imp.MSACM32.dll_acmMetrics]
push 0x10000
push dword [esp + 0x34]
push 0x7ccd48
push 0x7ccd14
push dword [0x7c2a80]
call dword [sym.imp.MSACM32.dll_acmFormatSuggest]
mov eax, dword [0x6f45c4]
lea edx, [esp + 0xc]
push 0
push 0x7c2928
mov dword [esp + 0x1c], 0x577c0
mov dword [esp + 0x20], 0
mov dword [esp + 0x14], 0x24
mov dword [esp + 0x18], 0x101e8
mov dword [esp + 0x24], 0x7ccd48
mov ecx, dword [eax]
push edx
push eax
mov dword [0x7c2ab8], 0x577c0
mov dword [0x7c2ac0], 0x15df0
call dword [ecx + 0xc]
mov eax, dword [0x7c2928]
push 0x7c292c
push 0x4b73b0
push eax
mov ecx, dword [eax]
call dword [ecx]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 0
push 0
call esi
push 0
push 0
push 0
push 0
mov dword [0x7c2a90], eax
call esi
mov edx, dword [0x7c2ac0]
mov edi, eax
mov esi, dword [0x7c2a90]
mov dword [0x7c2a94], edi
mov dword [esp + 0x38], edx
lea ecx, [edx + edx]
mov dword [esp + 0x3c], esi
lea eax, [ecx + edx]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x48], eax
add eax, edx
dec eax
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x50], eax
mov dword [esp + 0x58], 0xffffffff
lea eax, [esp + 0x34]
mov dword [esp + 0x5c], edi
push eax
push 0
push 0
push 0x4894d0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov eax, dword [0x7c292c]
lea edx, [esp + 0x38]
push edx
push 5
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
test eax, eax
je 0x489b7c
push dword [0x7c2a90]
call ebx
push dword [0x7c2a94]
call ebx
mov dword [0x7c2a94], 0
mov dword [0x7c2a90], 0
push 0
push 0
push 0
push 0
push 0x7ccd48
push 0x7ccd14
push dword [0x7c2a80]
push 0x7c2a88
call dword [sym.imp.MSACM32.dll_acmStreamOpen]
mov byte [0x7b7477], 1
mov eax, dword [0x7c2928]
push 0
push 0
push 0
mov ecx, dword [eax]
push 0x7c2aa4
push 0x7c2aa0
push dword [0x7c2ab8]
push 0
push eax
call dword [ecx + 0x2c]
test eax, eax
jne 0x489ba6
push eax
push 0x7c2ab4
push 0x5800
push dword [0x7c2a88]
call dword [sym.imp.MSACM32.dll_acmStreamSize]
push dword [0x7c2ab8]
push 0
push dword [0x7c2aa0]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov esi, 0x7c2940
xor ebx, ebx
push 0x54
lea edi, [esi - 0x10]
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov eax, dword [0x7c2a9c]
add esp, 0xc
mov dword [esi - 4], eax
mov eax, dword [0x7c2ab4]
mov dword [esi + 0x10], eax
mov eax, dword [0x7c2ac0]
imul eax, ebx
push 0
push edi
push dword [0x7c2a88]
mov dword [edi], 0x54
add eax, dword [0x7c2aa0]
mov dword [esi], 0x5800
mov dword [esi + 0xc], eax
call dword [sym.imp.MSACM32.dll_acmStreamPrepareHeader]
add esi, 0x54
inc ebx
cmp esi, 0x7c2a90
jl 0x489c01
mov eax, dword [0x7c2928]
push 0
push 0
push dword [0x7c2ab8]
mov ecx, dword [eax]
push dword [0x7c2aa0]
push eax
call dword [ecx + 0x4c]
movsx eax, word [0x515480]
imul ecx, eax, 0x19
add ecx, 5
call fcn.004ab690
mov ax, word [0x51548c]
test ax, ax
je 0x489cb8
cwde
lea eax, [eax + eax*2]
lea eax, [eax*2 + 4]
mov dword [0x7cc8c8], eax
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
xor eax, eax
mov dword [0x7cc8c8], eax
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xa8]
xor ecx, esp
call fcn.004b557b
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0xb4]
xor al, al
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004b557b
mov esp, ebp
pop ebp
ret