Function at 0x4a2370
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 0x4a25e1
mov ebp, dword [esp + 0xb0]
cmp ebp, ebx
jle 0x4a25e1
mov esi, ebp
mov dword [0x5972cc], 4
shl esi, 4
add esi, ebp
mov dword [0x7dc82c], ebx
shl esi, 2
push esi
mov dword [0x7dc830], ebx
mov dword [0x7dc818], ebx
mov dword [0x7dc81c], ebx
mov dword [0x7dc820], ebx
mov dword [0x7dc824], ebx
mov dword [0x7dc828], ebx
mov dword [0x7dc838], ebx
call fcn.004ac979
mov edi, eax
add esp, 4
cmp edi, ebx
mov dword [0x7dc828], edi
jne 0x4a23fd
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 0x7dc81c
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 [0x7dc83c], 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 [0x7dc834], ecx
call sub.DSOUND.dll_DirectSoundCreate
test eax, eax
jne 0x4a24f3
mov eax, dword [0x7dc81c]
mov ecx, dword [0x7dc834]
push 3
push ecx
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
test eax, eax
jne 0x4a24de
mov eax, dword [0x7dc81c]
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 0x7dc820
push ecx
push eax
call dword [edx + 0xc]
test eax, eax
jne 0x4a24de
mov eax, dword [0x7dc820]
push 0x7dc824
push 0x56ffa0
push eax
mov edx, dword [eax]
call dword [edx]
test eax, eax
je 0x4a2529
mov eax, dword [0x7dc820]
cmp eax, ebx
je 0x4a24de
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov dword [0x7dc820], ebx
mov eax, dword [0x7dc81c]
cmp eax, ebx
je 0x4a24f3
mov edx, dword [eax]
push eax
call dword [edx + 8]
mov dword [0x7dc81c], ebx
mov eax, dword [0x7dc828]
cmp eax, ebx
je 0x4a250b
push eax
call fcn.004ac931
add esp, 4
mov dword [0x7dc828], ebx
push str.Not_Initialized_Sound_System__
mov dword [0x7dc834], 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 [0x7dc81c]
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 0x4a255b
cmp si, 0x10
jne 0x4a255b
mov esi, 8
test al, 2
mov eax, dword [esp + 0xb8]
jne 0x4a2571
cmp ax, 2
jne 0x4a2571
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 [0x7dc820]
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 [0x7dc81c]
mov dword [0x7dc838], 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