Function at 0x40c4f0
Capabilities:
Check os version
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x454d01
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xa8
push ebx
push ebp
mov ebp, ecx
push esi
push edi
lea eax, [esp + 0x38]
mov esi, dword [ebp + 0x60]
mov dword [esp + 0x30], ebp
push esi
push eax
mov dword [esp + 0x3c], esi
call fcn.004165a0
add esp, 8
mov eax, dword [ebp + 4]
xor edi, edi
mov dword [esp + 0xc0], edi
mov ecx, dword [eax]
cmp ecx, eax
mov dword [esp + 0x10], ecx
je 0x40c745
cmp dword [ecx + 0xc], 0xa
jne 0x40c559
mov al, byte [esp + 0xc8]
test al, al
je 0x40c72d
mov eax, dword [ecx + 0x14]
lea ebx, [ecx + 0x14]
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
mov ecx, dword [ebx]
cmp eax, ecx
je 0x40c72d
add eax, 0xc
lea ecx, [esp + 0x88]
push eax
call fcn.00414e60
lea ecx, [esp + 0x78]
mov byte [esp + 0xc0], 1
push ecx
mov ecx, eax
call fcn.00414f50
push eax
lea ecx, [esp + 0x4c]
mov byte [esp + 0xc4], 2
call fcn.00414e60
push 1
lea ecx, [esp + 0x7c]
mov byte [esp + 0xc4], 5
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0xac]
mov byte [esp + 0xc4], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x9c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x8c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [esp + 0x10]
cmp dword [edx + 0xc], 0xa
jne 0x40c68d
cmp esi, 2
mov esi, str..aud
je 0x40c60b
mov esi, str..wav
mov al, byte [esp + 0x17]
push edi
lea ecx, [esp + 0x24]
mov byte [esp + 0x24], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x24]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x40c65d
mov edi, dword [esp + 0x24]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], ebp
mov byte [eax + ebp], 0
lea ecx, [esp + 0x20]
mov byte [esp + 0xc0], 6
push ecx
lea ecx, [esp + 0x4c]
call fcn.00415530
push 1
lea ecx, [esp + 0x24]
mov byte [esp + 0xc4], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov esi, dword [esp + 0x34]
xor edi, edi
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 0xc]
cmp eax, 9
jl 0x40c6c2
cmp eax, 0xb
jg 0x40c6c2
sub esp, 0x10
lea ecx, [esp + 0x58]
mov eax, esp
mov dword [esp + 0x28], esp
lea edx, [esp + 0x48]
push ecx
push edx
push eax
call fcn.00415b20
add esp, 0xc
call fcn.00415c70
add esp, 0x10
push 1
lea ecx, [esp + 0x6c]
mov byte [esp + 0xc4], 0
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
push 1
lea ecx, [esp + 0x5c]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov ecx, dword [esp + 0x4c]
cmp ecx, edi
je 0x40c706
mov al, byte [ecx - 1]
test al, al
je 0x40c6fc
cmp al, 0xff
je 0x40c6fc
dec al
mov byte [ecx - 1], al
jmp 0x40c706
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], edi
call fcn.0040f330
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx]
cmp eax, ecx
jne 0x40c56f
mov ebp, dword [esp + 0x30]
lea ecx, [esp + 0x10]
call fcn.0040f3e0
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 4]
cmp ecx, eax
jne 0x40c544
sub esp, 0x10
lea ecx, [esp + 0x48]
mov eax, esp
mov dword [esp + 0x28], esp
push str.ecache98.mix
push ecx
push eax
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
call fcn.00415c70
mov edx, esp
mov dword [esp + 0x28], esp
lea eax, [esp + 0x48]
push str.expand98.mix
push eax
push edx
call sub.MSVCP60.dll_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_std::operator_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___char_const__
add esp, 0xc
call fcn.00415c70
mov ecx, dword [esp + 0x4c]
add esp, 0x10
cmp ecx, edi
je 0x40c7ab
mov al, byte [ecx - 1]
test al, al
je 0x40c7a1
cmp al, 0xff
je 0x40c7a1
dec al
mov byte [ecx - 1], al
jmp 0x40c7ab
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0xb8]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0xb4
ret 4