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

Disassembly:
push 0xffffffffffffffff
push 0x5a3eb8
mov eax, dword fs:[0]
push eax
sub esp, 0x48
mov eax, dword [0x60aecc]
xor eax, esp
mov dword [esp + 0x44], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x60aecc]
xor eax, esp
push eax
lea eax, [esp + 0x5c]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0xc]
call fcn.00498890
mov al, byte [eax + 0x20]
xor ebx, ebx
cmp al, bl
je 0x504132
lea ecx, [esp + 0x14]
call fcn.00502e80
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x64], ebx
call fcn.00498890
mov eax, dword [eax + 4]
mov edi, dword [eax]
mov ecx, dword [esp + 0x70]
xor eax, eax
mov edx, dword [esp + 0x6c]
mov dword [esp + 0x20], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov word [esp + 0x30], ax
mov eax, dword [esp + 0x74]
mov word [esp + 0x2e], ax
shr ax, 3
imul ax, cx
mov word [esp + 0x2c], ax
movzx eax, ax
imul eax, edx
test eax, eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x34], 0x24
mov dword [esp + 0x38], 0x18180
fild dword [esp + 0x18]
mov word [esp + 0x20], 1
mov word [esp + 0x22], cx
mov dword [esp + 0x24], edx
mov dword [esp + 0x28], eax
jge 0x504058
fadd dword [0x5aa24c]
fstp dword [esp + 0x14]
fld dword [esp + 0x14]
fnstcw word [esp + 0x14]
movzx eax, word [esp + 0x14]
fld st(0)
or eax, 0xc00
fmul dword [esp + 0x78]
mov dword [esp + 0x18], eax
fadd qword [0x5aafe8]
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov eax, dword [esp + 0x18]
add eax, 7
and eax, 0xfffffff8
cmp eax, 4
fldcw word [esp + 0x14]
mov dword [esi + 0x40], eax
jae 0x5040a3
mov dword [esi + 0x40], 4
mov eax, 0xfffffff
cmp dword [esi + 0x40], eax
jbe 0x5040b0
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0x40]
mov ecx, eax
test ecx, ecx
mov dword [esp + 0x18], ecx
fild dword [esp + 0x18]
jge 0x5040c7
fadd dword [0x5aa24c]
fdivrp st(1)
mov ecx, dword [esi + 0x30]
push ebx
lea edx, [esp + 0x24]
mov dword [esp + 0x48], edx
push ecx
mov dword [esp + 0x44], eax
lea edx, [esp + 0x3c]
push edx
push edi
fstp dword [esi + 0x44]
mov eax, dword [edi]
mov eax, dword [eax + 0xc]
call eax
mov edi, eax
cmp edi, ebx
je 0x504139
cmp edi, 0x8876017c
jne 0x504104
call fcn.004988c0
mov ecx, eax
call fcn.004988b0
push 0xe9
push str.._soundstream.cpp
push edi
push 0x5a8554
push 0x5c85f0
call fcn.004dfae0
add esp, 0x14
lea ecx, [esp + 0x14]
mov dword [esp + 0x64], 0xffffffff
call fcn.00502ed0
xor al, al
jmp 0x50424f
mov ebp, dword [sym.imp.kernel32.dll_CreateEventA]
mov edi, 0x1c
push ebx
push ebx
push ebx
push ebx
call ebp
mov ecx, dword [esi + 0x30]
mov dword [edi + ecx], eax
mov edx, dword [esi + 0x30]
cmp dword [edi + edx], ebx
je 0x504121
add edi, 4
cmp edi, 0x28
jl 0x504144
mov eax, edx
mov dword [eax + 4], ebx
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x1c]
mov dword [eax + 8], ecx
mov edx, dword [esp + 0x3c]
mov eax, dword [esi + 0x30]
shr edx, 1
mov dword [eax + 0xc], edx
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x20]
mov dword [eax + 0x10], ecx
mov edx, dword [esi + 0x30]
or ebp, 0xffffffff
mov dword [edx + 0x14], ebp
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x24]
mov dword [eax + 0x18], ecx
mov eax, dword [esi + 0x30]
mov ecx, dword [eax]
mov edx, dword [ecx]
add eax, 0x2c
push eax
mov eax, dword [edx]
push 0x5d5620
push ecx
call eax
mov edi, eax
cmp edi, ebx
je 0x5041f2
cmp edi, 0x8876017c
jne 0x5041c4
call fcn.004988c0
mov ecx, eax
call fcn.004988b0
push 0xfc
push str.._soundstream.cpp
push edi
push 0x5a8554
push 0x5c85f0
call fcn.004dfae0
add esp, 0x14
lea ecx, [esp + 0x14]
mov dword [esp + 0x64], ebp
call fcn.00502ed0
xor al, al
jmp 0x50424f
mov eax, dword [esi + 0x30]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ecx]
add eax, 4
push eax
mov eax, dword [edx + 0xc]
push 2
push ecx
call eax
mov edi, eax
cmp edi, ebx
je 0x504227
cmp edi, 0x8876017c
jne 0x504220
call fcn.004988c0
mov ecx, eax
call fcn.004988b0
push 0x103
jmp 0x5041c9
mov ecx, dword [esi + 0x40]
mov dword [esi + 0x48], ecx
push 1
mov ecx, esi
mov byte [esi + 0x3c], bl
mov dword [esi + 0x74], ebx
mov byte [esi + 0x54], 1
call fcn.00503c10
lea ecx, [esp + 0x14]
mov dword [esp + 0x64], ebp
call fcn.00502ed0
mov al, 1
mov ecx, dword [esp + 0x5c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x44]
xor ecx, esp
call fcn.0055d2d5
add esp, 0x54
ret 0x10