Function at 0x57cb84
Capabilities:
Create thread
Resolve function by parsing pe exports
Resume thread

Disassembly:
jmp 0x61f8c0
sub esp, 0x3fc
push ebp
xor ebp, ebp
cmp dword [0xb323b4], ebp
je 0x61f8dc
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
push ebx
push esi
push edi
push 0xb32390
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, dword [0xb32408]
sub eax, ebp
je 0x61fba8
mov ebx, 1
sub eax, ebx
jne 0x61fd81
push str.DirectSound8
call fcn.0057a587
mov esi, dword [sym.imp.ole32.dll_CoCreateInstance]
add esp, 4
push 0xb323a8
push 0x8c822c
push 3
push ebp
push 0x8c81ec
call esi
test eax, eax
jge 0x61f95c
push str.DirectMusicLoader8
call fcn.0057a587
push 0x88474c
call fcn.0057a587
add esp, 8
mov dword [0xb32408], ebp
call fcn.0057cb84
pop edi
pop esi
pop ebx
pop ebp
add esp, 0x3fc
ret
push 0xb323ac
push 0x8c823c
push 3
push ebp
push 0x8c81dc
call esi
test eax, eax
jge 0x61f994
push str.DirectMusicPerformance
call fcn.0057a587
add esp, 4
call fcn.0057d1ce
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
lea eax, [esp + 0x10]
push eax
push 0x8c821c
push ebx
push ebp
push 0x8c81cc
call esi
test eax, eax
jge 0x61f9cb
push str.DirectMusic
call fcn.0057a587
add esp, 4
call fcn.0057d1ce
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
lea edx, [esp + 0x14]
push edx
push 0x8c824c
push eax
mov eax, dword [ecx]
call eax
test eax, eax
jge 0x61fa10
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push str.DirectMusic8
call fcn.0057a587
add esp, 4
call fcn.0057d1ce
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
push 0x134
lea eax, [esp + 0xd4]
push ebp
push eax
call fcn.0057f8f2
mov eax, dword [esp + 0x20]
add esp, 0xc
lea edx, [esp + 0xd0]
push edx
mov dword [esp + 0xd4], 0x134
mov ecx, dword [eax]
push ebp
push eax
mov eax, dword [ecx + 0xc]
xor esi, esi
call eax
cmp eax, ebx
je 0x61fae8
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov ebp, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea esp, [esp]
lea ecx, [esp + 0x104]
push ecx
lea edx, [esp + 0x208]
push edx
call edi
push 0
push 0
push 0x100
lea eax, [esp + 0x318]
push eax
push 0xffffffffffffffff
lea ecx, [esp + 0x218]
push ecx
push 0
push 0
mov word [esp + 0x324], 0
call ebp
cmp dword [esp + 0xe8], ebx
mov eax, 0x884688
je 0x61fab0
mov eax, 0x884678
lea edx, [esp + 0x30c]
push edx
push esi
push eax
push str._s__Device_d:_s
call fcn.0057a2e9
mov eax, dword [esp + 0x24]
mov ecx, dword [eax]
add esp, 0x10
lea edx, [esp + 0xd0]
push edx
add esi, ebx
push esi
push eax
mov eax, dword [ecx + 0xc]
call eax
cmp eax, ebx
jne 0x61fa60
xor ebp, ebp
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
mov eax, dword [esp + 0x10]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
call edx
push 0x28
lea eax, [esp + 0x38]
push ebp
push eax
call fcn.0057f8f2
mov eax, dword [0xb323ac]
add esp, 0xc
lea edx, [esp + 0x34]
push edx
push 0x3f
push 0x40
push ebx
push ebp
push 0xb323b4
lea edx, [esp + 0x28]
mov dword [esp + 0x4c], 0x28
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], 5
mov dword [esp + 0x60], 0xac44
mov dword [esp + 0x58], 0x3f
mov dword [0xb323b4], ebp
mov dword [esp + 0x28], ebp
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xb0]
call eax
test eax, eax
je 0x61fb87
push 0x88461c
call fcn.0057a587
add esp, 4
call fcn.0057d1ce
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
mov eax, dword [0xb323ac]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x84]
push 4
push 0xb5a424
push 0x8c818c
push eax
call edx
jmp 0x61fd81
push str.DirectSound
call fcn.0057a587
push 0x8845b4
call fcn.0057a587
add esp, 8
push 0xb323b4
push 0x8c820c
push 7
push ebp
push 0x8c81bc
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x6201a9
push 0x8805cc
call fcn.0057a587
push 0x884580
call fcn.0057a587
mov eax, dword [0xb323b4]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x28]
add esp, 8
push ebp
push eax
call edx
test eax, eax
jge 0x61fc36
push 0x884564
call fcn.0057a587
mov eax, dword [0xb323b4]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
add esp, 4
push eax
call edx
pop edi
pop esi
pop ebx
mov dword [0xb323b4], ebp
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret
push 0x8805cc
call fcn.0057a587
mov eax, dword [0xb323b4]
mov esi, dword [eax]
add esp, 4
push 2
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov ecx, dword [0xb323b4]
mov edx, dword [esi + 0x18]
push eax
push ecx
call edx
test eax, eax
je 0x61fc6a
push 0x88452c
jmp 0x61fc0d
push 0x24
lea eax, [esp + 0x38]
push ebp
push eax
call fcn.0057f8f2
mov ecx, dword [0xb5a428]
mov eax, dword [0xb323b4]
add esp, 0xc
neg ecx
sbb ecx, ecx
and ecx, 8
mov ebx, 1
or ecx, ebx
push ebp
mov dword [esp + 0x3c], ecx
push 0xb323b8
lea ecx, [esp + 0x3c]
mov dword [esp + 0x3c], 0x24
mov edx, dword [eax]
mov edx, dword [edx + 0xc]
push ecx
push eax
call edx
test eax, eax
je 0x61fcc0
push 0x8844e0
jmp 0x61fc0d
push 0x60
lea eax, [esp + 0x74]
push ebp
push eax
call fcn.0057f8f2
mov eax, dword [0xb323b4]
add esp, 0xc
lea edx, [esp + 0x70]
mov dword [esp + 0x70], 0x60
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
mov eax, dword [esp + 0x74]
mov edi, dword [esp + 0x7c]
mov ecx, eax
and cl, 2
neg cl
sbb ecx, ecx
neg ecx
add ecx, ebx
cmp edi, 0xac44
mov esi, ecx
jb 0x61fd0e
mov edi, 0xac44
and al, 8
neg al
push 0x12
lea edx, [esp + 0x60]
push 0
push edx
sbb eax, eax
neg eax
add eax, ebx
mov ebp, eax
call fcn.0057f8f2
lea eax, [ebp*8]
mov word [esp + 0x76], ax
shr ax, 3
imul ax, si
mov word [esp + 0x74], ax
movzx eax, ax
imul eax, edi
mov dword [esp + 0x70], eax
mov eax, dword [0xb323b8]
add esp, 0xc
lea edx, [esp + 0x5c]
mov word [esp + 0x5c], bx
mov word [esp + 0x5e], si
mov dword [esp + 0x60], edi
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x38]
call eax
test eax, eax
je 0x61fd7f
push 0x884488
call fcn.0057a587
add esp, 4
xor ebp, ebp
push 0x12
lea ecx, [esp + 0x24]
push ebp
push ecx
call fcn.0057f8f2
push 0x24
lea edx, [esp + 0x44]
push ebp
mov esi, 2
push edx
mov word [esp + 0x38], bx
mov word [esp + 0x3a], si
mov dword [esp + 0x3c], 0xac44
mov word [esp + 0x46], 0x10
mov word [esp + 0x44], 4
mov dword [esp + 0x40], 0x2b110
call fcn.0057f8f2
mov eax, dword [0xb5a428]
movzx ecx, word [esp + 0x44]
add esp, 0x18
neg eax
sbb eax, eax
imul ecx, ecx, 0x64
and eax, 6
add eax, esi
or eax, 0x8000
push ebp
lea edx, [esp + 0x24]
mov dword [esp + 0x3c], eax
mov eax, dword [0xb323b4]
mov dword [esp + 0x48], edx
push 0xb32404
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], 0x24
mov dword [esp + 0x44], ecx
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0xc]
call eax
test eax, eax
je 0x61fe32
push 0x884460
call fcn.0057a587
add esp, 4
mov dword [0xb32404], ebp
jmp 0x61fee1
mov eax, dword [0xb32404]
mov ecx, dword [eax]
push ebp
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x28]
push edx
mov edx, dword [esp + 0x50]
push edx
push ebp
push eax
mov eax, dword [ecx + 0x2c]
call eax
test eax, eax
je 0x61fe7e
push 0x884434
call fcn.0057a587
mov eax, dword [0xb32404]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
add esp, 4
push eax
call edx
mov dword [0xb32404], ebp
mov ecx, dword [esp + 0x1c]
shr ecx, 1
je 0x61fe95
mov edi, dword [esp + 0x18]
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [esp + 0x14]
cmp edi, ebp
je 0x61feb4
mov ecx, dword [esp + 0x10]
shr ecx, 1
je 0x61feb4
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov edi, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov eax, dword [0xb32404]
mov ecx, dword [eax]
push edx
mov edx, dword [esp + 0x20]
push edi
push edx
mov edx, dword [esp + 0x24]
push edx
push eax
mov eax, dword [ecx + 0x4c]
call eax
mov eax, dword [0xb32404]
mov ecx, dword [eax]
mov edx, dword [ecx + 0x30]
push ebx
push ebp
push ebp
push eax
call edx
push 0xb323d0
push 0xb323c0
mov dword [0xb5a43c], ebp
mov dword [0xb5a444], esi
call fcn.0057dbb5
push 0xb323f0
push 0xb323e0
call fcn.0057dbb5
add esp, 0x10
cmp dword [0xb323b4], ebp
je 0x62014c
call fcn.0057bc57
push 0x60
lea eax, [esp + 0x74]
push ebp
push eax
call fcn.0057f8f2
mov eax, dword [0xb323b4]
add esp, 0xc
lea edx, [esp + 0x70]
mov dword [esp + 0x70], 0x60
mov ecx, dword [eax]
push edx
push eax
mov eax, dword [ecx + 0x10]
call eax
push 0x88440c
call fcn.0057a587
add esp, 4
call fcn.0057bc57
push str.DSOUND.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
jne 0x61ff83
push 0x8843d0
call fcn.0057a587
add esp, 4
call fcn.0057ef29
jmp 0x62014c
push str.DirectSoundEnumerateA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebp
jne 0x61ffb1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x884368
call fcn.0057a587
add esp, 4
call fcn.0057ef29
jmp 0x62014c
push ebp
push 0x57fa14
call eax
call fcn.0057ef29
fild dword [esp + 0x78]
mov ecx, dword [esp + 0x78]
test ecx, ecx
jge 0x61ffd0
fadd qword [0x879f40]
fld qword [0x87aa98]
mov edx, dword [esp + 0x7c]
fdiv st(1), st(0)
sub esp, 0x10
test edx, edx
fxch st(1)
fstp qword [esp + 8]
fild dword [esp + 0x8c]
jge 0x61fff6
fadd qword [0x879f40]
fdivrp st(1)
fstp qword [esp]
push 0x88431c
call fcn.0057a2e9
fild dword [esp + 0xcc]
mov eax, dword [esp + 0xcc]
test eax, eax
jge 0x62001d
fadd qword [0x879f40]
fld qword [0x883430]
mov ecx, dword [esp + 0xc8]
fmul st(1), st(0)
add esp, 4
test ecx, ecx
fxch st(1)
fstp qword [esp + 8]
fild dword [esp + 0xc4]
jge 0x620046
fadd qword [0x879f40]
fmulp st(1)
fstp qword [esp]
push 0x8842d4
call fcn.0057a2e9
push 0x8842b4
call fcn.0057a587
mov al, byte [esp + 0x8c]
add esp, 0x18
test al, 4
mov ecx, 0x8842b0
jne 0x620077
mov ecx, 0x8842ac
test al, 8
mov eax, 0x8842b0
jne 0x620085
mov eax, 0x8842ac
push ecx
push eax
push 0x88427c
call fcn.0057a2e9
mov eax, dword [esp + 0x80]
add esp, 0xc
test eax, 0x400
mov ecx, 0x8842b0
jne 0x6200ac
mov ecx, 0x8842ac
test eax, 0x800
mov eax, 0x8842b0
jne 0x6200bd
mov eax, 0x8842ac
push ecx
push eax
push 0x88424c
call fcn.0057a2e9
push 0x884234
call fcn.0057a587
mov al, byte [esp + 0x84]
add esp, 0x10
test al, 2
mov ecx, 0x8842b0
jne 0x6200eb
mov ecx, 0x8842ac
test bl, al
mov eax, 0x8842b0
jne 0x6200f9
mov eax, 0x8842ac
push ecx
push eax
push 0x884208
call fcn.0057a2e9
mov eax, dword [esp + 0x80]
add esp, 0xc
test eax, 0x200
mov ecx, 0x8842b0
jne 0x620120
mov ecx, 0x8842ac
test eax, 0x100
mov eax, 0x8842b0
jne 0x620131
mov eax, 0x8842ac
push ecx
push eax
push 0x8841dc
call fcn.0057a2e9
add esp, 0xc
call fcn.0057ef29
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push ebp
call fcn.0057cc97
add esp, 4
call fcn.0057c6bb
call fcn.0057ab59
push 0xb5a450
push 4
push ebp
push 0x61da80
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
push 0xf
push eax
mov dword [0xb5a44c], eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov edx, dword [0xb5a44c]
push edx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x8841a8
call fcn.0057a587
add esp, 4
pop edi
pop esi
pop ebx
xor eax, eax
pop ebp
add esp, 0x3fc
ret
push 0x88416c
mov dword [0xb323b4], ebp
call fcn.0057a587
add esp, 4
pop edi
pop esi
pop ebx
or eax, 0xffffffff
pop ebp
add esp, 0x3fc
ret