Function at 0x667170
Capabilities:
Access peb ldr_data
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6fa327
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x766480]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x50], esi
mov eax, dword [ebp + 8]
lea edi, [esi + 4]
mov byte [esi + 8], 0
mov dword [edi], 0
mov dword [esi + 0xa0], 0
mov dword [esi + 0xc4], 0
mov dword [esi + 0xf8], 0
mov dword [esi + 0xc8], 0
mov dword [esi + 0xf4], 0x3f800000
movups xmm0, xmmword [eax]
push 0
movups xmmword [esi + 0xc], xmm0
movups xmm0, xmmword [eax + 0x10]
movups xmmword [esi + 0x1c], xmm0
movups xmm0, xmmword [eax + 0x20]
movups xmmword [esi + 0x2c], xmm0
mov eax, dword [eax + 0x30]
mov dword [esi + 0x3c], eax
cmp dword [esi + 0x10], 0
jne 0x66721d
push str.CSoundMgr::Init
push str.Not_Init_hWnd__
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x667344
push edi
push 0
call sub.DSOUND.dll_DirectSoundCreate8
test eax, eax
jns 0x66723a
push 0
push str.DirectSound_Device_Error
push str.Failed_to_initialize_DirectSound.__n_CSoundMgr::Init
jmp 0x66732a
mov eax, dword [edi]
push 3
push dword [esi + 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
push 0
test eax, eax
jns 0x66725c
push str.DirectSound_Device_Error
push str.Failed_to_set_the_DirectSound_cooperative_levels.__n_CSoundMgr::Init
jmp 0x66732a
mov eax, dword [esi + 0x30]
lea edx, [ebp - 0x4c]
mov dword [ebp - 0x54], eax
xorps xmm0, xmm0
mov eax, dword [esi + 0x28]
mov dword [ebp - 0x5c], eax
mov eax, dword [esi + 0x2c]
mov dword [ebp - 0x58], eax
mov eax, dword [edi]
push edx
mov dword [ebp - 0x4c], 0
lea edx, [ebp - 0x48]
mov dword [ebp - 0x3c], 0
movlpd qword [ebp - 0x34], xmm0
movlpd qword [ebp - 0x2c], xmm0
mov dword [ebp - 0x48], 0x24
mov dword [ebp - 0x44], 1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x38], 0
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x66731e
mov ecx, dword [ebp - 0x54]
xor eax, eax
mov edx, dword [ebp - 0x5c]
mov word [ebp - 0x14], ax
mov eax, 1
movzx ecx, cx
mov word [ebp - 0x24], ax
mov eax, dword [ebp - 0x58]
mov word [ebp - 0x16], cx
movzx eax, ax
shr cx, 3
movzx ecx, cx
imul ecx, eax
mov word [ebp - 0x22], ax
mov dword [ebp - 0x20], edx
movzx eax, cx
imul eax, edx
lea edx, [ebp - 0x24]
mov word [ebp - 0x18], cx
push edx
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x4c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x38]
mov ecx, dword [ebp - 0x4c]
test eax, eax
jns 0x667363
test ecx, ecx
je 0x66731e
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [ebp - 0x4c], 0
push 0
push str.DirectSound_Device_Error
push str.Failed_to_create_DirectSound_buffer.__n_CSoundMgr::Init
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov ecx, dword [edi]
test ecx, ecx
je 0x667344
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [edi], 0
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.006dfb52
mov esp, ebp
pop ebp
ret 4
test ecx, ecx
je 0x667374
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp - 0x50]
add esi, 0x40
push 0x5c
add eax, 0x44
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [edi]
add esp, 0xc
mov dword [esi], 0x60
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x10]
test eax, eax
jns 0x6673b1
push 0
push str.DirectSound_Device_Error
push str.Failed_to_initialize_sound_driver.__n_CSoundMgr::Init
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0x8c
call fcn.006df8c3
add esp, 4
mov dword [ebp - 0x54], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x6673d7
push dword [edi]
mov ecx, eax
call fcn.006656d0
jmp 0x6673d9
xor eax, eax
mov esi, dword [ebp - 0x50]
mov dword [esi + 0xa0], eax
lea eax, [esi + 0xc8]
push eax
push 0
push 0
push 0x667d00
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0xc4], eax
xorps xmm0, xmm0
lea eax, [esi + 0xdc]
movups xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [esi + 8], 1
mov al, 1
jmp 0x667346