Function at 0x1000cefc
Capabilities:
Check if file exists
Create directory
Get file attributes
Query environment variable
Set current directory
Set environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a22f
mov eax, dword fs:[0]
push eax
mov eax, 0x10040
call fcn.10018f80
mov eax, dword [0x1002b1f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 0x10034], eax
mov dword [ebp - 0x10030], edi
mov dword [ebp - 0x10030], ebp
push 1
push dword [ebp - 0x10030]
push str.struct_IXmpSetting___cdecl_GetSettingInstance_wchar_t__
call fcn.1000b484
mov esi, eax
add esp, 0xc
mov eax, 0x1001fe38
cmp esi, edi
jne 0x1000cf67
mov esi, eax
push edi
push edi
push edi
push edi
push eax
push 0x1001fe10
push esi
lea ecx, [ebp - 0x1004c]
call fcn.1000a370
mov dword [ebp - 4], edi
cmp esi, edi
jne 0x1000cf86
push ebp
pop ebp
test byte [0x1002cda0], 1
jne 0x1000cfa7
or dword [0x1002cda0], 1
push 0x1001afa0
mov dword [0x1002cd9c], edi
call fcn.100190e9
pop ecx
cmp dword [0x1002cd9c], edi
jne 0x1000d21f
push str.CoreProgram
lea ecx, [ebp - 0x1002c]
call fcn.10006c32
pop ecx
mov eax, dword [ebp - 0x10028]
push 8
pop ebx
mov byte [ebp - 4], 1
cmp dword [ebp - 0x10014], ebx
jae 0x1000cfdf
lea eax, [ebp - 0x10028]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1000cfef
test al, 0x10
jne 0x1000d049
mov eax, dword [ebp - 0x10028]
cmp dword [ebp - 0x10014], ebx
jae 0x1000d003
lea eax, [ebp - 0x10028]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x1000d049
lea ecx, [ebp - 0x1002c]
mov byte [ebp - 4], al
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x1004c]
call fcn.1000be71
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10018dd2
leave
ret
mov eax, dword [ebp - 0x10028]
cmp dword [ebp - 0x10014], ebx
jae 0x1000d05d
lea eax, [ebp - 0x10028]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
xor eax, eax
push 0xfffe
mov word [ebp - 0x10010], ax
lea eax, [ebp - 0x1000e]
push edi
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov esi, 0x8000
push esi
lea eax, [ebp - 0x10010]
push eax
push str.Path
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov eax, dword [ebp - 0x10028]
cmp dword [ebp - 0x10014], ebx
jae 0x1000d0ae
lea eax, [ebp - 0x10028]
mov edi, dword [sym.imp.MSVCR90.dll__snwprintf]
push eax
lea eax, [ebp - 0x10010]
push eax
mov ebx, str._s__s
push ebx
push esi
push eax
call edi
add esp, 0x14
cmp dword [ebp - 0x10034], 0
je 0x1000d10a
push dword [ebp - 0x10034]
call dword [sym.imp.MSVCR90.dll_wcslen]
pop ecx
cmp eax, 1
jbe 0x1000d10a
push str.Program
push dword [ebp - 0x10034]
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push dword [ebp - 0x10034]
lea eax, [ebp - 0x10010]
push eax
push ebx
push esi
push eax
call edi
add esp, 0x14
mov esi, 0x1001fdac
push esi
call fcn.10005425
pop ecx
test eax, eax
jne 0x1000d17a
push 1
lea eax, [ebp - 0x10010]
push eax
push str.___GetEnvironmentVariable_:
sub esp, 0x1c
lea eax, [ebp - 0x1002c]
mov ecx, esp
mov dword [ebp - 0x10034], esp
push eax
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t___const__]
push str._AddEnvironmentVariable_:
push 0
push esi
mov byte [ebp - 4], 2
call fcn.10009855
pop ecx
pop ecx
mov ecx, eax
call fcn.1000bba2
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.10001786
mov ecx, eax
call fcn.1000bba2
mov ecx, eax
call fcn.100016a4
mov ecx, eax
call fcn.1000a33f
lea eax, [ebp - 0x10010]
push eax
push str.Path
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
push str.XmpPlayer.dll
lea ecx, [ebp - 0x1002c]
call dword [sym.imp.MSVCP90.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [ebp - 0x10014], 8
mov eax, dword [ebp - 0x10028]
jae 0x1000d1b2
lea eax, [ebp - 0x10028]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
test eax, eax
je 0x1000d1d7
push 0x1002cd9c
push 0x10023c98
push 0x10023db8
push eax
call fcn.1000c3a2
add esp, 0x10
jmp 0x1000d20f
push esi
call fcn.10005425
pop ecx
test eax, eax
jne 0x1000d20f
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.LoadLibrary_XmpPlayer.dll_failed__GetLastError:
push 0
push esi
call fcn.10009855
pop ecx
pop ecx
mov ecx, eax
call fcn.1000bba2
mov ecx, eax
call fcn.10001626
mov ecx, eax
call fcn.1000a33f
lea ecx, [ebp - 0x1002c]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP90.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov edi, dword [0x1002cd9c]
jmp 0x1000d01e