Function at 0x638ec0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a6eb2
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x71a00c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x44], ebx
mov eax, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp + 0xc]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [ebx], vtable.kiwi::CDirectSoundBuffer.0
mov dword [ebx + 4], 1
mov dword [ebx + 8], 0
mov dword [ebx + 0x14], eax
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 1
mov dword [ebx + 0x24], 0xffffffff
mov dword [ebx + 0x28], 0xffffffff
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x30], 0
mov dword [ebp - 0x48], ebx
mov dword [ebx + 0x34], vtable.thread::CThread.0
mov dword [ebx + 0x38], 0
mov dword [ebp - 4], 0
mov dword [ebx + 0x3c], vtable.thread::CEvent.0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], vtable.thread::CEvent.0
mov dword [ebx + 0x48], 0
lea edi, [ebx + 0x4c]
mov byte [ebp - 4], 2
push 0x1c
mov dword [ebp - 0x44], edi
mov dword [edi], vtable.thread::CCriticalSection.0
call fcn.0066bc56
mov esi, eax
add esp, 4
mov dword [ebp - 0x44], esi
lea eax, [esi + 4]
mov dword [esi], vtable.thread::CCriticalSection::CImpl.0
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [edi + 4], esi
lea eax, [ebx + 0x54]
mov dword [eax + 0x14], 0xf
mov dword [eax + 0x10], 0
cmp dword [eax + 0x14], 0x10
jb 0x638fc6
mov eax, dword [eax]
mov byte [eax], 0
mov dword [ebx + 0x6c], vtable.kiwi::CWaveFormat.0
mov dword [ebx + 0x70], 1
mov dword [ebx + 0x74], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
mov dword [ebx + 0x88], 0
mov byte [ebp - 4], 5
mov eax, dword [ebx + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_ResetEvent]
test eax, eax
je 0x63902e
push eax
call esi
push dword [ebx + 0x40]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x40], 0
mov edi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 0
push 0
push 0
call edi
mov dword [ebx + 0x40], eax
test eax, eax
je 0x63909e
push eax
call esi
mov eax, dword [ebx + 0x48]
test eax, eax
je 0x639062
push eax
call esi
push dword [ebx + 0x48]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x48], 0
push 0
push 0
push 0
push 0
call edi
mov dword [ebx + 0x48], eax
test eax, eax
je 0x639078
push eax
call esi
jmp 0x6390e1
push str.CDirectSoundBuffer::_n
lea ecx, [ebp - 0x40]
call fcn.004022b0
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 7
call fcn.00467a70
mov edx, dword [ebp - 0x2c]
cmp edx, 0x10
jb 0x6390e1
mov ecx, dword [ebp - 0x40]
jmp 0x6390d6
push 0x36
push 0x6c2444
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.004023e0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 6
call fcn.00467a70
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x6390e1
mov ecx, dword [ebp - 0x28]
push 1
inc edx
call fcn.004020c0
add esp, 4
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0066bc45
mov esp, ebp
pop ebp
ret 0xc