Function at 0x54c3b6
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x6c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
xor edi, edi
xor ecx, ecx
mov dword [esp + 0x38], edi
mov dword [esp + 0x6c], ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x70], ecx
lea eax, [ebp + 0x30]
mov dword [esp + 0x74], ecx
mov dword [esp + 0x78], ecx
mov ecx, 4
mov word [eax - 2], di
mov word [eax], di
mov dword [eax + 2], edi
add eax, 8
dec ecx
jne 0x54c3e3
mov eax, dword [ebp + 0xa]
mov edx, dword [eax + 0x9ea]
mov ebx, dword [eax + 0x9e6]
mov ecx, edx
mov dword [esp + 0x50], ebx
imul ecx, ebx
shl ecx, 2
push ecx
mov dword [esp + 0x58], edx
call fcn.006749d4
mov esi, eax
add esp, 4
cmp esi, edi
mov dword [esp + 0x44], esi
je 0x54c9c8
mov eax, dword [ebp + 0xa]
add eax, 0x9e6
mov edx, dword [eax + 4]
imul edx, dword [eax]
shr edx, 2
push edx
call fcn.006749d4
add esp, 4
cmp eax, edi
mov dword [esp + 0x20], eax
jne 0x54c45c
push esi
call fcn.00673d19
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
mov eax, dword [ebp + 0xa]
mov dword [esp + 0x1c], edi
add eax, 0x9e6
mov edi, esi
mov ecx, dword [eax + 4]
imul ecx, dword [eax]
shl ecx, 2
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebp + 0xa]
mov edi, dword [esp + 0x20]
add eax, 0x9e6
mov ecx, dword [eax + 4]
imul ecx, dword [eax]
shr ecx, 2
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esp + 0x54]
xor edi, edi
cmp eax, edi
mov dword [esp + 0x2c], edi
jle 0x54c9b2
mov dword [esp + 0x40], edi
xor esi, esi
test ebx, ebx
mov dword [esp + 0x28], esi
jle 0x54c993
mov ecx, dword [ebp + 0xa]
push edi
push esi
mov eax, dword [ecx]
call dword [eax + 0x6c]
cmp word [eax + 0x185], 0
je 0x54c982
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x20]
lea ebx, [esi + ecx]
mov edx, ebx
mov cl, bl
shr edx, 2
and cl, 3
mov dl, byte [edx + eax]
shl cl, 1
shr dl, cl
test dl, 2
jne 0x54c982
mov ecx, dword [ebp + 0xa]
push edi
push esi
mov dword [esp + 0x2c], 1
mov eax, dword [ecx]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
call dword [eax + 0x6c]
mov edx, dword [esp + 0x1c]
xor ecx, ecx
mov cx, word [eax + 0x185]
mov eax, dword [esp + 0x44]
mov dword [esp + 0x3c], ecx
mov ecx, ebx
mov word [eax + edx*4], si
mov esi, dword [esp + 0x20]
shr ecx, 2
add esi, ecx
mov ecx, ebx
and ecx, 3
mov bl, 3
shl ecx, 1
shl bl, cl
mov word [eax + edx*4 + 2], di
mov cl, byte [esi]
inc edx
mov dword [esp + 0x1c], edx
or cl, bl
test edx, edx
mov byte [esi], cl
je 0x54c6a4
jmp 0x54c574
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x44]
dec edx
mov ecx, 0x7c8354
mov dword [esp + 0x1c], edx
mov dword [esp + 0x30], ecx
lea eax, [eax + edx*4]
xor edx, edx
xor esi, esi
mov dword [esp + 0x34], eax
mov dx, word [eax]
mov si, word [eax + 2]
mov dword [esp + 0x48], edx
mov dword [esp + 0x58], esi
jmp 0x54c5aa
mov edx, dword [esp + 0x48]
mov esi, dword [esp + 0x58]
mov ecx, dword [esp + 0x30]
mov eax, dword [ecx - 4]
mov ebx, dword [esp + 0x20]
add eax, edx
mov edx, dword [ecx]
add esi, edx
mov edx, esi
imul edx, dword [esp + 0x50]
add edx, eax
mov edi, edx
mov cl, dl
shr edi, 2
and cl, 3
mov bl, byte [edi + ebx]
shl cl, 1
shr bl, cl
test bl, 2
jne 0x54c682
mov ecx, dword [ebp + 0xa]
xor ebx, ebx
add ecx, 0x9da
mov edi, dword [ecx + 0xc]
mov ecx, dword [ecx + 0x14]
imul edi, esi
add edi, eax
shl edi, 4
mov bl, byte [edi + ecx + 0xa]
mov edi, dword [esp + 0x20]
mov ecx, dword [ebx*4 + 0x6b8a88]
xor ebx, ebx
cmp word [ecx + 0x185], bx
mov ecx, edx
setne bl
shr ecx, 2
add edi, ecx
mov ecx, edx
and ecx, 3
mov dl, bl
shl ecx, 1
or dl, 2
shl dl, cl
mov cl, byte [edi]
or cl, dl
test ebx, ebx
mov byte [edi], cl
je 0x54c682
mov ecx, dword [esp + 0x34]
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
inc ebx
mov word [ecx], ax
mov word [ecx + 2], si
add ecx, 4
mov dword [esp + 0x1c], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x14]
inc edx
add ecx, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x14], ecx
mov ecx, dword [ebp + 0xa]
add ebx, esi
push esi
mov edx, dword [ecx]
push eax
mov dword [esp + 0x20], ebx
call dword [edx + 0x6c]
xor ecx, ecx
mov cx, word [eax + 0x185]
mov eax, dword [esp + 0x3c]
add eax, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x30]
add eax, 8
cmp eax, 0x7c8374
mov dword [esp + 0x30], eax
jb 0x54c59e
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x54c56c
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x24]
cdq
idiv ecx
mov byte [esp + 0x13], 1
mov esi, eax
mov eax, dword [esp + 0x18]
cdq
idiv ecx
mov edx, dword [ebp + 0xa]
mov ebx, edx
mov dword [esp + 0x58], edx
mov ecx, ebx
mov edi, eax
mov eax, dword [ebx]
call dword [eax + 0x1d0]
mov edx, eax
mov eax, dword [ebx]
mov ecx, ebx
mov dword [esp + 0x58], edx
call dword [eax + 0x1cc]
mov ecx, dword [esp + 0x58]
cmp eax, ecx
mov ecx, dword [ebp + 0xa]
jbe 0x54c6f7
mov edx, dword [ecx]
call dword [edx + 0x1cc]
jmp 0x54c6ff
mov eax, dword [ecx]
call dword [eax + 0x1d0]
lea ecx, [eax + eax]
push edi
mov dword [esp + 0x5c], ecx
mov ecx, dword [ebp + 0xa]
push esi
mov edx, dword [ecx]
call dword [edx + 0x1fc]
test eax, eax
je 0x54c750
mov eax, dword [ebp + 0xa]
add eax, 0x9da
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x14]
imul ecx, edi
add ecx, esi
xor eax, eax
shl ecx, 4
mov al, byte [ecx + edx + 0xa]
mov ecx, dword [eax*4 + 0x6b8a88]
test byte [ecx + 0x17b], 2
jne 0x54c750
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
mov byte [esp + 0x13], 0
mov eax, 1
inc esi
mov dword [esp + 0x48], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], eax
mov al, byte [esp + 0x13]
xor ebx, ebx
test al, al
mov dword [esp + 0x34], ebx
je 0x54c86a
mov eax, dword [esp + 0x34]
test eax, eax
jne 0x54c7e5
mov ecx, dword [ebp + 0xa]
push edi
push esi
mov edx, dword [ecx]
call dword [edx + 0x1fc]
test eax, eax
je 0x54c7b9
mov eax, dword [ebp + 0xa]
add eax, 0x9da
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x14]
imul ecx, edi
add ecx, esi
xor eax, eax
shl ecx, 4
mov al, byte [ecx + edx + 0xa]
mov ecx, dword [eax*4 + 0x6b8a88]
test byte [ecx + 0x17b], 2
je 0x54c831
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x30]
add edi, eax
dec ecx
mov dword [esp + 0x30], ecx
jne 0x54c77c
mov ecx, dword [esp + 0x24]
mov ebx, eax
inc ecx
mov dword [esp + 0x34], 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x30], ecx
neg ebx
jmp 0x54c85e
mov ecx, dword [ebp + 0xa]
push edi
push esi
mov edx, dword [ecx]
call dword [edx + 0x1fc]
test eax, eax
je 0x54c822
mov eax, dword [ebp + 0xa]
add eax, 0x9da
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 0x14]
imul ecx, edi
add ecx, esi
xor eax, eax
shl ecx, 4
mov al, byte [ecx + edx + 0xa]
mov ecx, dword [eax*4 + 0x6b8a88]
test byte [ecx + 0x17b], 2
je 0x54c831
mov eax, dword [esp + 0x24]
add esi, ebx
dec eax
mov dword [esp + 0x24], eax
je 0x54c83b
jmp 0x54c7e5
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], edi
jmp 0x54c859
mov eax, dword [esp + 0x30]
mov edx, dword [esp + 0x58]
xor ecx, ecx
cmp eax, edx
mov dword [esp + 0x24], eax
mov dword [esp + 0x48], ebx
mov dword [esp + 0x34], ecx
jl 0x54c85e
mov dword [esp + 0x14], ecx
mov byte [esp + 0x13], 0
mov al, byte [esp + 0x13]
test al, al
jne 0x54c774
mov edx, dword [ebp + 0xe]
xor eax, eax
xor edi, edi
mov esi, DirectSoundCreate
mov ax, word [edx + 0x36]
mov edx, dword [eax*4 + 0x6ccb20]
test edx, edx
je 0x54c8cd
mov ecx, dword [edx + 0x27]
mov eax, dword [esp + 0x14]
mov ebx, ecx
mov dword [esp + 0x5c], ecx
mov ecx, dword [esp + 0x18]
and ebx, 0xffff
sub eax, ebx
mov ebx, dword [esp + 0x5e]
and ebx, 0xffff
imul eax, eax
sub ecx, ebx
mov ebx, ecx
imul ebx, ecx
add eax, ebx
cmp eax, esi
jge 0x54c8bc
mov edi, edx
mov esi, eax
xor ecx, ecx
mov cx, word [edx + 8]
mov edx, dword [ecx*4 + 0x6ccb20]
test edx, edx
jne 0x54c885
mov eax, dword [edi + 0x27]
mov edx, dword [esp + 0x14]
mov ecx, eax
mov dword [esp + 0x64], eax
mov eax, dword [esp + 0x18]
and ecx, 0xffff
sub edx, ecx
mov ecx, dword [esp + 0x66]
and ecx, 0xffff
imul edx, edx
sub eax, ecx
mov ecx, eax
imul ecx, eax
mov eax, dword [esp + 0x4c]
add edx, ecx
cmp eax, 4
jl 0x54c90b
cmp edx, dword [esp + 0x38]
jge 0x54c97a
mov ecx, dword [esp + 0x38]
inc eax
cmp edx, ecx
mov dword [esp + 0x4c], eax
jle 0x54c91c
mov dword [esp + 0x38], edx
cmp eax, 4
lea ecx, [eax - 1]
jl 0x54c929
mov ecx, 3
test ecx, ecx
jl 0x54c97a
lea esi, [esp + ecx*4 + 0x6c]
lea eax, [ebp + ecx*8 + 0x2e]
test ecx, ecx
je 0x54c95a
mov edi, dword [esi - 4]
cmp edx, edi
jge 0x54c95a
mov ebx, dword [eax - 8]
mov dword [esi], edi
mov dword [eax], ebx
mov ebx, dword [eax - 4]
mov dword [eax + 4], ebx
dec ecx
sub eax, 8
sub esi, 4
test ecx, ecx
jge 0x54c937
jmp 0x54c97a
mov ax, word [esp + 0x14]
mov dword [esp + ecx*4 + 0x6c], edx
mov word [ebp + ecx*8 + 0x2e], ax
mov ax, word [esp + 0x18]
mov word [ebp + ecx*8 + 0x30], ax
mov eax, dword [esp + 0x3c]
mov dword [ebp + ecx*8 + 0x32], eax
mov edi, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov ebx, dword [esp + 0x50]
inc esi
cmp esi, ebx
mov dword [esp + 0x28], esi
jl 0x54c4cc
mov ecx, dword [esp + 0x40]
mov eax, dword [esp + 0x54]
inc edi
add ecx, ebx
cmp edi, eax
mov dword [esp + 0x2c], edi
mov dword [esp + 0x40], ecx
jl 0x54c4be
mov esi, dword [esp + 0x44]
push esi
call fcn.00673d19
mov ecx, dword [esp + 0x24]
add esp, 4
push ecx
call fcn.00673d19
add esp, 4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret