Function at 0x4a1040
Capabilities:
Print debug messages

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x98
push ebx
xor ebx, ebx
push ebp
push esi
cmp eax, ebx
push edi
je 0x4a12b1
mov ebp, dword [esp + 0xb0]
cmp ebp, ebx
jle 0x4a12b1
mov esi, ebp
mov dword [0x596f84], 4
shl esi, 4
add esi, ebp
mov dword [0x7de3f4], ebx
shl esi, 2
push esi
mov dword [0x7de3f8], ebx
mov dword [0x7de3e0], ebx
mov dword [0x7de3e4], ebx
mov dword [0x7de3e8], ebx
mov dword [0x7de3ec], ebx
mov dword [0x7de3f0], ebx
mov dword [0x7de400], ebx
call fcn.004ab3b8
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [0x7de3f0], edi
jne 0x4a10cd
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x98
ret
mov ecx, esi
xor eax, eax
mov edx, ecx
push ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0x7de3e4
and ecx, 3
push ebx
rep stosb byte es:[edi], al
xor eax, eax
mov ecx, 9
mov dword [esp + 0x1c], eax
lea edi, [esp + 0x30]
mov dword [esp + 0x20], eax
mov dword [0x7de404], ebp
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
rep stosd dword es:[edi], eax
mov ecx, 0x18
lea edi, [esp + 0x54]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0xb8]
mov word [esp + 0x2c], ax
mov dword [0x7de3fc], ecx
call sub.DSOUND.dll_DirectSoundCreate
test eax, eax
jne 0x4a11c3
mov eax, dword [0x7de3e4]
mov ecx, dword [0x7de3fc]
push 3
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
test eax, eax
jne 0x4a11ae
mov eax, dword [0x7de3e4]
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], 0x24
mov dword [esp + 0x2c], 0x11
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
mov edx, dword [eax]
push 0x7de3e8
push ecx
push eax
call dword [edx + 0xc]
test eax, eax
jne 0x4a11ae
mov eax, dword [0x7de3e8]
push 0x7de3ec
push 0x570018
push eax
mov edx, dword [eax]
call dword [edx]
test eax, eax
je 0x4a11f9
mov eax, dword [0x7de3e8]
cmp eax, ebx
je 0x4a11ae
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x7de3e8], ebx
mov eax, dword [0x7de3e4]
cmp eax, ebx
je 0x4a11c3
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [0x7de3e4], ebx
mov eax, dword [0x7de3f0]
cmp eax, ebx
je 0x4a11db
push eax
call fcn.004ab2cf
add esp, 4
mov dword [0x7de3f0], ebx
push str.Not_Initialized_Sound_System__
mov dword [0x7de3fc], ebx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x98
ret
mov eax, dword [0x7de3e4]
lea edx, [esp + 0x48]
mov dword [esp + 0x48], 0x60
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
mov al, byte [esp + 0x4c]
mov esi, dword [esp + 0xbc]
test al, 8
jne 0x4a122b
cmp si, 0x10
jne 0x4a122b
mov esi, 8
test al, 2
mov eax, dword [esp + 0xb8]
jne 0x4a1241
cmp ax, 2
jne 0x4a1241
mov eax, 1
mov edx, esi
mov word [esp + 0x12], ax
and eax, 0xffff
and edx, 0xffff
imul eax, edx
mov ecx, dword [esp + 0xb4]
mov edx, eax
imul edx, ecx
shr edx, 3
mov dword [esp + 0x18], edx
mov word [esp + 0x10], 1
cdq
and edx, 7
mov dword [esp + 0x14], ecx
add eax, edx
lea edx, [esp + 0x10]
sar eax, 3
mov word [esp + 0x1c], ax
mov eax, dword [0x7de3e8]
mov word [esp + 0x1e], si
mov word [esp + 0x20], bx
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x38]
mov eax, dword [0x7de3e4]
mov dword [0x7de400], 0x80000000
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x98
ret