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

Disassembly:
mov eax, 0x4cda2f
call fcn.004c7e20
push ecx
cmp dword [ebp + 0xc], 0
jne 0x491f78
mov eax, 0x80004003
jmp 0x4922b3
push esi
push edi
mov edi, dword [ebp + 8]
push 0x28
lea esi, [edi + 0x88]
pop eax
call fcn.004918f8
test eax, eax
jne 0x491f99
mov eax, 0x8007000e
jmp 0x4922b1
mov eax, dword [esi]
mov cx, word [ebp + 0x18]
push ebx
push dword [ebp + 0x20]
mov word [eax], 3
push dword [ebp + 0x1c]
mov eax, dword [esi]
mov word [eax + 2], cx
mov eax, dword [esi]
push eax
lea eax, [edi + 0x14]
push eax
lea ecx, [edi + 8]
push ecx
lea ebx, [edi + 4]
push ebx
push 3
push dword [ebp + 0xc]
call fcn.00491b41
test eax, eax
jl 0x4922b0
and dword [ebp - 0x10], 0
and dword [ebp - 4], 0
mov eax, dword [ebx]
mov ecx, dword [eax]
lea edx, [ebp - 0x10]
push edx
push eax
call dword [ecx + 0x18]
test eax, eax
mov dword [ebp + 0x18], eax
jge 0x492003
cmp dword [ebp - 0x10], 0
je 0x491ffb
push dword [ebp - 0x10]
call sub.ole32.dll_CoTaskMemFree
mov eax, dword [ebp + 0x18]
jmp 0x4922b0
mov eax, dword [ebx]
mov edx, dword [eax]
lea ecx, [edi + 0x78]
push ecx
push eax
mov dword [ebp + 0x1c], ecx
call dword [edx + 0x1c]
xor ebx, ebx
cmp eax, ebx
mov dword [ebp + 0x18], eax
jge 0x492020
cmp dword [ebp - 0x10], ebx
jmp 0x491ff1
push dword [ebp - 0x10]
call fcn.00491937
test eax, eax
pop ecx
je 0x49204c
mov ebx, dword [ebp - 0x10]
mov edi, esi
call fcn.004040a2
mov ebx, dword [ebp + 8]
mov eax, dword [ebp + 0x1c]
mov eax, dword [eax]
mov edi, dword [ebp + 8]
add ebx, 0x7c
mov dword [ebp + 0xc], ebx
mov dword [ebx], eax
jmp 0x4920c5
mov eax, dword [edi + 8]
cmp eax, ebx
je 0x49229e
mov dword [ebp + 0x20], ebx
mov ecx, dword [eax]
lea ebx, [edi + 0x7c]
push ebx
lea edx, [ebp + 0x20]
push edx
push eax
mov dword [ebp + 0xc], ebx
call dword [ecx + 0x10]
test eax, eax
mov dword [ebp + 0x18], eax
jl 0x491fed
mov eax, dword [esi]
mov ax, word [eax + 0xc]
cmp ax, 1
jbe 0x49209e
mov ecx, dword [ebx]
movzx eax, ax
mov dword [ebp + 0x18], eax
xor edx, edx
mov eax, ecx
div dword [ebp + 0x18]
test edx, edx
je 0x49209e
sub ecx, edx
add ecx, dword [ebp + 0x18]
mov eax, ebx
mov dword [eax], ecx
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ecx]
cmp eax, dword [ebp + 0x20]
ja 0x4920ab
mov eax, dword [ebp + 0x20]
push eax
mov dword [ecx], eax
lea eax, [edi + 0xc]
push eax
call sym.TTPlayer.exe_CreateSoundBuffer
test eax, eax
mov dword [ebp + 0x18], eax
jl 0x491fed
mov ebx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
test eax, eax
jle 0x4920dc
mov ecx, dword [esi]
cmp eax, dword [ecx + 4]
je 0x4920dc
mov dword [ebp + 0x20], 1
jmp 0x4920e0
and dword [ebp + 0x20], 0
mov eax, dword [esi]
call fcn.00491989
test eax, eax
je 0x4920f8
mov eax, dword [esi]
cmp word [eax + 0xe], 0x40
jne 0x4920f8
xor ecx, ecx
jmp 0x4920fb
xor ecx, ecx
inc ecx
test ecx, ecx
lea eax, [edi + 0x90]
mov dword [eax], ecx
jne 0x492112
cmp dword [ebp + 0x20], ecx
je 0x492112
mov dword [eax], 1
cmp dword [eax], 0
je 0x492292
push dword [ebx]
lea eax, [edi + 0x10]
push eax
call sym.TTPlayer.exe_CreateSoundBuffer
test eax, eax
mov dword [ebp + 0x18], eax
jl 0x491fed
mov eax, dword [esi]
call fcn.00491956
test eax, eax
je 0x492144
mov dword [edi], 0x491550
jmp 0x49215c
mov eax, dword [esi]
mov ax, word [eax + 0xe]
sub ax, 0x20
neg ax
sbb eax, eax
not eax
and eax, 0x491890
mov dword [edi], eax
mov ebx, dword [esi]
add edi, 0x8c
mov dword [ebp + 0x1c], edi
call fcn.004040a2
cmp dword [ebp + 0x20], 0
mov ebx, edi
mov eax, dword [ebx]
mov word [eax], 3
mov eax, dword [ebx]
mov word [eax + 0xe], 0x40
je 0x4921d6
push dword [ebp + 0x14]
call sub.ttpcomm.dll_Ordinal_102
mov edi, eax
test edi, edi
mov eax, dword [ebp + 8]
pop ecx
mov dword [eax + 0x3c], edi
je 0x4921d6
cmp dword [ebp + 0x14], 1
mov edx, dword [ebx]
mov eax, dword [edi]
sete cl
push ecx
movzx ecx, word [edx + 2]
push ecx
push dword [ebp + 0x10]
mov ecx, edi
push dword [edx + 4]
call dword [eax + 4]
test al, al
je 0x4921c2
mov eax, dword [ebx]
mov ecx, dword [ebp + 0x10]
mov dword [eax + 4], ecx
jmp 0x4921d6
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0x3c]
test ecx, ecx
je 0x4921d2
mov eax, dword [ecx]
push 1
call dword [eax]
and dword [edi + 0x3c], 0
mov ecx, dword [ebx]
movzx edx, word [ecx + 2]
movzx eax, word [ecx + 0xe]
imul eax, edx
cdq
push 8
pop edi
idiv edi
xor edx, edx
mov word [ecx + 0xc], ax
mov eax, dword [ebx]
movzx ecx, word [eax + 0xc]
imul ecx, dword [eax + 4]
mov dword [eax + 8], ecx
mov eax, dword [esi]
movzx ecx, word [eax + 0xe]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
shl eax, 3
shr ecx, 3
div ecx
mov edi, eax
mov eax, dword [ebp + 8]
cmp dword [eax + 0x3c], 0
mov dword [eax + 0x80], edi
je 0x49228f
add eax, 0x28
call fcn.0048d6d0
test eax, eax
jne 0x492240
cmp dword [ebp - 0x10], eax
je 0x492239
push dword [ebp - 0x10]
call sub.ole32.dll_CoTaskMemFree
mov eax, 0x8007000e
jmp 0x4922b0
mov eax, dword [ebx]
fild dword [ebp + 0x10]
movzx edi, word [eax + 0xc]
mov eax, dword [esi]
mov eax, dword [eax + 4]
test eax, eax
mov dword [ebp + 0x10], eax
fild dword [ebp + 0x10]
jge 0x49225e
fadd qword [0x4dd530]
mov esi, dword [ebp + 8]
fdivp st(1)
mov eax, dword [esi + 0x80]
xor edx, edx
div edi
mov dword [ebp + 0x10], eax
fild dword [ebp + 0x10]
fadd qword [0x4dd418]
fadd qword [0x4dd438]
fmulp st(1)
call fcn.004c7ef0
imul eax, edi
mov dword [esi + 0x80], eax
mov edi, dword [ebp + 8]
and dword [edi + 0x84], 0
jmp 0x491fed
cmp dword [ebp - 0x10], ebx
je 0x4922ab
push dword [ebp - 0x10]
call sub.ole32.dll_CoTaskMemFree
mov eax, 0x80004005
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
leave
ret 0x1c