Function at 0x67c18670
Capabilities:
Access peb ldr_data
Check os version
Get ntdll base address
Get process heap flags
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x9c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
mov eax, dword [edi + 0xcc]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x5c], eax
test byte [0x67c213b0], 8
jne 0x67c18cb0
mov eax, dword [edi + 0x204]
lea ecx, [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp + 0x10], ecx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x67c28614
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x14
mov esi, eax
test eax, eax
js 0x67c18c98
mov ebx, dword [ebp - 0x58]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x68], ebx
test eax, eax
jne 0x67c18830
mov eax, dword [ebx]
lea edx, [ebp - 0x48]
mov dword [esp], ebx
mov dword [esp + 4], edx
call dword [eax + 0x20]
sub esp, 8
mov esi, eax
test eax, eax
js 0x67c18e71
mov eax, dword [ebp - 0x48]
mov edx, dword [edi + 0x100]
movzx esi, word [eax + 2]
test edx, edx
je 0x67c18da0
movzx ecx, si
cmp edx, ecx
jg 0x67c18da0
jl 0x67c19058
mov ecx, dword [0x67c29604]
cmp dword [eax + 0x18], ecx
je 0x67c18fd0
mov edx, dword [eax]
mov ebx, dword [ebp - 0x68]
lea esi, [ebp - 0x40]
mov dword [ebp - 0x40], edx
mov edx, dword [eax + 4]
mov dword [ebp - 0x3c], edx
mov ecx, dword [eax + 8]
mov dword [ebp - 0x38], ecx
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x34], ecx
mov ecx, dword [eax + 0x10]
mov dword [ebp - 0x30], ecx
mov ecx, dword [eax + 0x14]
mov dword [ebp - 0x2c], ecx
mov ecx, dword [eax + 0x18]
mov dword [ebp - 0x28], ecx
mov ecx, dword [eax + 0x1c]
mov eax, dword [0x67c29604]
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x28], eax
mov eax, dword [0x67c29608]
mov dword [ebp - 0x24], eax
mov eax, dword [0x67c2960c]
mov dword [ebp - 0x20], eax
mov eax, dword [0x67c29610]
mov dword [ebp - 0x1c], eax
mov eax, 0x20
mov word [ebp - 0x32], ax
mov eax, 0x20
mov word [ebp - 0x2e], ax
movzx eax, word [ebp - 0x3e]
shl eax, 2
mov word [ebp - 0x34], ax
movzx eax, ax
imul eax, edx
lea edx, [ebp - 0x4c]
mov dword [ebp - 0x38], eax
mov eax, dword [ebx]
mov dword [esp + 0xc], edx
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [eax + 0x1c]
sub esp, 0x10
test eax, eax
js 0x67c191b0
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x67c19238
mov dword [esp], eax
call fcn.67c18540
mov ebx, eax
mov eax, dword [ebp - 0x4c]
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
mov dword [esp], eax
call esi
mov dword [ebp - 0x4c], 0
sub esp, 4
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call esi
sub esp, 4
jmp 0x67c18850
mov esi, dword [edi + 0x80]
movzx eax, word [esi]
and eax, 0xfffffffd
cmp ax, 1
je 0x67c18ce8
mov dword [esp], esi
call fcn.67c18540
mov ebx, eax
test ebx, ebx
je 0x67c19565
mov ecx, dword [ebp - 0x68]
lea edx, [ebp - 0x4c]
mov eax, dword [ecx]
mov dword [esp + 0xc], edx
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], ecx
call dword [eax + 0x1c]
mov esi, eax
mov eax, dword [ebp - 0x4c]
sub esp, 0x10
test eax, eax
je 0x67c188a8
movzx edx, word [eax + 0x10]
mov dword [esp + 4], eax
mov dword [esp], ebx
add edx, 0x12
mov dword [esp + 8], edx
call sub.ucrtbase.dll_memcpy
mov eax, dword [ebp - 0x4c]
mov dword [esp], eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
sub esp, 4
test esi, esi
js 0x67c18e40
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp + 0x20], 0
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0xc], 0xc3500
mov dword [esp + 0x10], 0
mov dword [esp + 8], 0xc0000
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0xc]
sub esp, 0x24
mov esi, eax
test eax, eax
js 0x67c18ec8
mov eax, dword [ebp - 0x58]
mov ecx, dword [edi + 0x214]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x34]
sub esp, 8
mov esi, eax
test eax, eax
js 0x67c18f90
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x54]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x67c285e4
mov dword [esp], eax
call dword [edx + 0x38]
sub esp, 0xc
mov esi, eax
test eax, eax
js 0x67c18f10
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x50]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0x67c28584
mov dword [esp], eax
call dword [edx + 0x38]
sub esp, 0xc
mov esi, eax
test eax, eax
js 0x67c18f10
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 0x28]
sub esp, 4
mov esi, eax
test eax, eax
js 0x67c191f8
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x40]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 8
mov esi, eax
test eax, eax
js 0x67c192f0
mov eax, dword [ebp - 0x58]
lea ecx, [ebp - 0x44]
mov edx, dword [eax]
mov dword [esp + 4], ecx
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 8
mov esi, eax
test eax, eax
js 0x67c19018
mov eax, dword [ebp - 0x40]
mov edx, dword [ebp - 0x3c]
mov dword [esp + 8], 0x2710
mov dword [esp + 0xc], 0
mov dword [ebp - 0x68], eax
add eax, 0x270f
mov dword [ebp - 0x64], edx
adc edx, 0
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.67c1fe30
mov dword [esp + 8], 0x989680
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x68]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_MulDiv]
lea edx, [eax + eax*2]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x44]
sub esp, 0xc
cmp edx, eax
cmovbe eax, edx
mov dword [ebp - 0x68], eax
test byte [0x67c213b0], 8
jne 0x67c193c0
mov eax, dword [edi + 0xa8]
mov dword [ebp - 0x70], eax
mov esi, dword [edi + 0x8c]
movzx ecx, word [ebx + 0xc]
xor edx, edx
mov eax, esi
div ecx
movzx eax, word [ebx]
sub esi, edx
cmp ax, 3
je 0x67c19370
cmp ax, 0xfffe
je 0x67c1932a
mov ecx, dword [ebp + 0xc]
mov eax, dword [edi + 0x84]
test ecx, ecx
jne 0x67c19522
movzx ecx, word [ebx + 2]
imul ecx, dword [ebp - 0x68]
lea esi, [ecx*4]
test eax, eax
je 0x67c1952e
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov ecx, eax
test ecx, ecx
je 0x67c1956f
xor eax, eax
cmp word [ebx + 0xe], 8
mov dword [ebp - 0x5c], ecx
sete al
mov dword [esp], ecx
shl eax, 7
mov dword [esp + 8], esi
mov dword [esp + 4], eax
call dword [sym.imp.ucrtbase.dll_memset]
mov edx, dword [sym.imp.kernel32.dll_HeapFree]
mov ecx, dword [ebp - 0x5c]
mov dword [edi + 0x84], ecx
mov ecx, dword [edi + 0x7c]
mov dword [edi + 0x8c], esi
mov eax, dword fs:[0x18]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call edx
mov edx, 0x51eb851f
mov dword [edi + 0x7c], ebx
mov eax, edx
mul dword [ebx + 4]
movzx eax, word [ebx + 0xc]
sub esp, 0xc
shr edx, 5
imul edx, eax
mov dword [edi + 0x88], edx
test byte [0x67c213b0], 8
jne 0x67c19440
mov edx, dword [ebp + 0xc]
xor eax, eax
test edx, edx
jne 0x67c18b64
movzx eax, word [ebx + 0xe]
shr ax, 3
movzx eax, ax
mov eax, dword [eax*4 + 0x67c2614c]
mov dword [edi + 0x140], eax
mov eax, dword [edi + 0xa4]
xor ebx, ebx
mov dword [edi + 0x98], 0
mov esi, dword [sym.imp.kernel32.dll_ReleaseSRWLockExclusive]
test eax, eax
jle 0x67c18bcb
mov dword [ebp + 8], edi
mov edi, ebx
mov ebx, dword [ebp - 0x70]
nop
mov eax, dword [ebx + edi*4]
lea edx, [eax + 0x2c]
mov dword [esp], edx
call dword [sym.imp.kernel32.dll_AcquireSRWLockExclusive]
mov edx, dword [ebx + edi*4]
sub esp, 4
mov dword [esp], edx
call fcn.67c141a0
mov eax, dword [ebx + edi*4]
add edi, 1
lea edx, [eax + 0x2c]
mov dword [esp], edx
call esi
mov eax, dword [ebp + 8]
sub esp, 4
cmp edi, dword [eax + 0xa4]
jl 0x67c18b90
mov edi, eax
mov eax, dword [edi + 0x208]
test eax, eax
je 0x67c18bea
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [edi + 0x208], 0
sub esp, 4
mov eax, dword [edi + 0x210]
test eax, eax
je 0x67c18c09
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [edi + 0x210], 0
sub esp, 4
mov eax, dword [edi + 0x20c]
test eax, eax
je 0x67c18c28
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov dword [edi + 0x20c], 0
sub esp, 4
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x67c18c50
add eax, dword [edi + 0x98]
xor edx, edx
mov dword [edi + 0x9c], 0
div dword [edi + 0x8c]
mov dword [edi + 0x98], edx
mov eax, dword [ebp - 0x58]
cmp dword [ebp - 0x60], 2
mov dword [edi + 0x208], eax
mov eax, dword [ebp - 0x54]
mov dword [edi + 0x210], eax
mov eax, dword [ebp - 0x50]
mov dword [edi + 0x20c], eax
mov eax, dword [ebp - 0x6c]
mov dword [edi + 0x94], eax
mov eax, dword [ebp - 0x68]
mov dword [edi + 0x90], eax
ja 0x67c19510
mov dword [edi + 0x78], 5
xor esi, esi
jmp 0x67c18ca5
test byte [0x67c213b0], 4
jne 0x67c18e90
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], str.__p___d__n
mov dword [esp + 0x14], eax
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 3
call fcn.67c16440
jmp 0x67c186aa
mov dword [esp + 8], 0x28
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ebx, eax
test eax, eax
je 0x67c19565
mov eax, dword [esi]
mov dword [ebx], eax
mov edx, dword [esi + 4]
mov dword [ebx + 4], edx
mov eax, dword [esi + 8]
mov dword [ebx + 8], eax
mov eax, dword [esi + 0xc]
mov dword [ebx + 0x14], 0
mov dword [ebx + 0xc], eax
mov eax, 0xfffffffe
movzx ecx, word [ebx + 0xe]
mov word [ebx], ax
mov eax, 0x16
mov word [ebx + 0x10], ax
movzx eax, word [ebx + 2]
mov dword [ebp - 0x60], eax
movzx eax, cx
imul eax, dword [ebp - 0x60]
sar eax, 3
mov word [ebx + 0xc], ax
movzx eax, ax
imul eax, edx
mov dword [ebx + 8], eax
cmp word [esi], 3
je 0x67c19128
mov eax, dword [0x67c29614]
mov dword [ebx + 0x18], eax
mov eax, dword [0x67c29618]
mov dword [ebx + 0x1c], eax
mov eax, dword [0x67c2961c]
mov dword [ebx + 0x20], eax
mov eax, dword [0x67c29620]
mov dword [ebx + 0x24], eax
mov word [ebx + 0x12], cx
jmp 0x67c18858
mov eax, dword [edi + 0x204]
lea ecx, [ebp - 0x44]
mov edx, dword [eax]
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov dword [esp], eax
call dword [edx + 0x10]
sub esp, 0xc
test eax, eax
js 0x67c19190
mov eax, dword [ebp - 0x44]
lea ebx, [ebp - 0x40]
mov edx, dword [eax]
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x67c3d748
mov dword [esp], eax
call dword [edx + 0x14]
sub esp, 0xc
test eax, eax
js 0x67c19250
movzx eax, word [ebp - 0x40]
cmp ax, 0x13
je 0x67c19290
test byte [0x67c213b0], 4
jne 0x67c19090
mov dword [esp], ebx
call sub.ole32.dll_PropVariantClear
sub esp, 4
mov eax, dword [ebp - 0x44]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, 0x140004
sub esp, 4
mov dword [edi + 0xcc], eax
mov eax, edi
call fcn.67c17c50
mov eax, dword [ebp - 0x48]
jmp 0x67c1873e
test byte [0x67c213b0], 4
jne 0x67c19160
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
mov eax, esi
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Activate_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
lea esp, [ebp - 0xc]
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
test byte [0x67c213b0], 2
je 0x67c18ca5
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.Initialize_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 1
call fcn.67c16440
jmp 0x67c18ca5
test byte [0x67c213b0], 4
jne 0x67c191c8
mov eax, dword [ebp - 0x5c]
mov dword [edi + 0xcc], eax
mov eax, edi
call fcn.67c17c50
mov eax, dword [ebp - 0x50]
test eax, eax
je 0x67c18f3f
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x54]
test eax, eax
je 0x67c18f51
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov eax, dword [ebp - 0x58]
mov edx, dword [eax]
mov dword [esp], eax
call dword [edx + 8]
sub esp, 4
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, esi
sub esp, 0xc
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x67c213b0], 4
je 0x67c18f1d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.SetEventHandle_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18f1d
mov esi, dword [0x67c29608]
cmp dword [eax + 0x1c], esi
jne 0x67c1874d
mov esi, dword [0x67c2960c]
cmp dword [eax + 0x20], esi
jne 0x67c1874d
mov esi, dword [0x67c29610]
cmp dword [eax + 0x24], esi
jne 0x67c1874d
mov dword [esp], eax
call fcn.67c18540
mov esi, dword [sym.imp.ole32.dll_CoTaskMemFree]
mov ebx, eax
jmp 0x67c1881b
test byte [0x67c213b0], 4
je 0x67c18f1d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.GetBufferSize_failed_with__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18f1d
mov word [eax + 2], dx
mov esi, dword [ebp - 0x48]
movzx edx, word [esi + 0xe]
movzx eax, word [esi + 2]
imul eax, edx
sar eax, 3
mov word [esi + 0xc], ax
movzx eax, ax
imul eax, dword [esi + 4]
mov dword [esi + 8], eax
mov edx, dword [edi + 0xcc]
movzx eax, dl
cmp dl, 6
ja case.0x67c19089.0
jmp dword [eax*4 + 0x67c33344]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.PKEY_AudioEndpoint_PhysicalSpeakers_is_not_a_ULONG:_0x_x_n
mov dword [esp + 8], str.DSOUND_FindSpeakerConfig
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18e08
mov eax, esi
mov ebx, 3
mov dword [esi + 0x14], ebx
jmp 0x67c1873e
mov eax, esi
mov ebx, 0x33
jmp 0x67c190c4
mov eax, esi
mov ebx, 0x3f
jmp 0x67c190c4
mov eax, esi
mov ebx, 1
jmp 0x67c190c4
mov eax, esi
mov ebx, 3
test byte [0x67c213b0], 4
je 0x67c190c4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], str.unknown_speaker_config__lu_n
mov dword [esp + 8], str.speaker_config_to_channel_mask
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
mov eax, dword [ebp - 0x48]
jmp 0x67c190c4
mov eax, dword [0x67c29604]
mov ecx, 0x20
mov word [ebx + 0xe], cx
mov ecx, 0x20
mov dword [ebx + 0x18], eax
mov eax, dword [0x67c29608]
mov dword [ebx + 0x1c], eax
mov eax, dword [0x67c2960c]
mov dword [ebx + 0x20], eax
mov eax, dword [0x67c29610]
mov dword [ebx + 0x24], eax
jmp 0x67c18d94
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.IsFormatSupported_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_WaveFormat
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18e4d
test byte [0x67c213b0], 4
jne 0x67c194d8
mov eax, 0x140004
jmp 0x67c18e26
mov eax, dword [ebp - 0x48]
mov dword [esp], eax
call fcn.67c18540
mov ebx, eax
jmp 0x67c18803
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], str.GetService_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18f1d
test byte [0x67c213b0], 4
je 0x67c18f1d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Start_failed_with__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18f1d
mov dword [esp], esi
call fcn.67c18540
mov ebx, eax
jmp 0x67c18803
test byte [0x67c213b0], 4
je 0x67c18e13
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.IPropertyStore_GetValue_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_FindSpeakerConfig
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18e13
mov dword [esp], ebx
mov edx, dword [ebp - 0x38]
mov dword [ebp - 0x60], edx
call sub.ole32.dll_PropVariantClear
mov eax, dword [ebp - 0x44]
sub esp, 4
mov ecx, dword [eax]
mov dword [esp], eax
call dword [ecx + 8]
lea eax, [esi - 1]
mov edx, dword [ebp - 0x60]
sub esp, 4
cmp ax, 4
ja 0x67c19480
cmp ax, 2
ja 0x67c194ac
cmp si, 1
jne 0x67c194bf
and edx, 4
mov eax, 2
je 0x67c1919d
jmp 0x67c18e26
test byte [0x67c213b0], 4
je 0x67c18f1d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.GetStreamLatency_failed_with__08lx_n
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
jmp 0x67c18f1d
mov ecx, dword [0x67c29604]
cmp dword [ebx + 0x18], ecx
jne 0x67c18a6b
mov ecx, dword [0x67c29608]
cmp dword [ebx + 0x1c], ecx
jne 0x67c18a6b
mov ecx, dword [0x67c2960c]
cmp dword [ebx + 0x20], ecx
jne 0x67c18a6b
mov ecx, dword [0x67c29610]
cmp dword [ebx + 0x24], ecx
jne 0x67c18a6b
lea esi, [esi]
lea esi, [esi]
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0x84]
test edx, edx
jne 0x67c19559
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov edx, dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [eax + 0x18]
mov dword [ebp - 0x5c], edx
mov dword [esp], eax
call edx
mov dword [ebp + 0xc], 1
mov edx, dword [ebp - 0x5c]
xor ecx, ecx
sub esp, 0xc
jmp 0x67c18af0
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x6c]
mov dword [esp + 0xc], str.period__lu_ms_frag_frames__lu_buf_frames__u_n
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x60]
mov dword [esp + 8], str.DSOUND_ReopenDevice
mov dword [esp + 0x10], eax
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 3
call fcn.67c16440
mov eax, dword [edi + 0xa8]
mov dword [ebp - 0x70], eax
test byte [0x67c213b0], 8
je 0x67c18a42
mov dword [esp + 0x10], edi
mov dword [esp + 0xc], 0x67c32f74
mov dword [esp + 8], str.DSOUND_PrimaryOpen
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 3
call fcn.67c16440
jmp 0x67c18a42
mov eax, dword [ebp - 0x68]
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x8c]
mov dword [esp + 0xc], str.buflen:__lu__frames__lu_n
mov dword [esp + 0x10], eax
mov dword [esp + 8], str.DSOUND_PrimaryOpen
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 3
call fcn.67c16440
jmp 0x67c18b49
mov ecx, edx
mov eax, 6
and ecx, 0x3f
cmp ecx, 0x3f
je 0x67c18e26
mov ecx, edx
mov eax, 9
and ecx, 0x60f
cmp ecx, 0x60f
je 0x67c18e26
mov ecx, edx
mov eax, 3
and ecx, 0x33
cmp ecx, 0x33
je 0x67c18e26
mov eax, edx
and eax, 3
cmp eax, 3
jne 0x67c192d3
jmp 0x67c1919d
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.IMMDevice_OpenPropertyStore_failed:__08lx_n
mov dword [esp + 8], str.DSOUND_FindSpeakerConfig
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 2
call fcn.67c16440
mov eax, 0x140004
jmp 0x67c18e26
mov eax, dword [ebp - 0x60]
xor esi, esi
lea eax, [eax + eax*4]
shr eax, 1
mov dword [edi + 0x78], eax
jmp 0x67c18ca5
mov dword [ebp + 0xc], 0
jmp 0x67c18a8b
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov ecx, eax
jmp 0x67c18abe
mov dword [ebp + 0xc], 1
jmp 0x67c18a8b
mov esi, 0x8007000e
jmp 0x67c18e71
mov esi, 0x8007000e
test byte [0x67c213b0], 2
je 0x67c18f1d
mov dword [esp + 0xc], str.failed_to_allocate_primary_buffer_n
mov dword [esp + 8], str.DSOUND_PrimaryOpen
mov dword [esp + 4], 0x67c213b0
mov dword [esp], 1
call fcn.67c16440
jmp 0x67c18f1d