Function at 0x40ec7d
Capabilities:
Check if file exists
Create directory
Get common file path
Get file attributes
Read .ini file

Disassembly:
mov eax, 0x414867
call fcn.00413240
sub esp, 0x954
mov eax, dword [0x4241a4]
xor eax, ebp
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
push ebx
xor ebx, ebx
mov dword [ebp - 0x834], eax
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x83c], ebx
push edi
mov dword [ebp - 0x840], eax
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x838], ebp
xor edi, edi
inc edi
push edi
push dword [ebp - 0x838]
push str.class_ATL::CComBSTR___cdecl_XMP::GetUserDataPath_const_wchar_t__
call fcn.00407881
mov esi, eax
add esp, 0xc
cmp esi, ebx
mov eax, 0x41b128
jne 0x40ece4
mov esi, eax
push ebx
push ebx
push ebx
push ebx
push eax
push 0x41b0fc
push esi
lea ecx, [ebp - 0x85c]
call fcn.00409792
mov dword [ebp - 4], edi
cmp esi, ebx
jne 0x40ed03
push ebp
pop ebp
cmp word [0x426138], bx
mov esi, 0x426138
jne 0x40f005
xor eax, eax
mov word [ebp - 0x830], bx
mov ecx, 0x81
lea edi, [ebp - 0x82e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x830]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov word [ebp - 0x628], bx
mov ecx, 0x81
lea edi, [ebp - 0x626]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40ef3b
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push str.SHGetKnownFolderPath
push eax
mov dword [ebp - 0x844], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebx
je 0x40ee85
lea ecx, [ebp - 0x838]
push ecx
push ebx
push ebx
push 0x41a3c4
mov dword [ebp - 0x838], ebx
call eax
cmp eax, ebx
jge 0x40eddf
push dword [ebp - 0x844]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [ebp - 0x834]
mov dword [esi], ebx
mov dword [ebp - 0x83c], 1
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x85c]
call fcn.00409a0c
mov eax, esi
jmp 0x40f04f
push dword [ebp - 0x838]
lea eax, [ebp - 0x95c]
lea ecx, [ebp - 0x960]
mov dword [ebp - 0x960], eax
call fcn.0040d2d5
mov byte [ebp - 4], 2
push dword [ebp - 0x960]
push esi
call dword [sym.imp.MSVCR71.dll_wcscpy]
pop ecx
pop ecx
mov byte [ebp - 4], 1
lea eax, [ebp - 0x95c]
cmp dword [ebp - 0x960], eax
je 0x40ee2e
push dword [ebp - 0x960]
call dword [sym.imp.MSVCR71.dll_free]
pop ecx
push dword [ebp - 0x838]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov edi, 0x41b0a0
push edi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40ee77
push 1
push esi
push str.vista_PersistFileDir_:
push ebx
push edi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040d585
mov ecx, eax
call fcn.0040e37d
push dword [ebp - 0x844]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x40eece
push esi
push ebx
push ebx
push 0x23
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov edi, 0x41b0a0
push edi
call fcn.00403aec
test eax, eax
pop ecx
jne 0x40eece
push 1
push esi
push str.xp_PersistFileDir_:
push ebx
push edi
call fcn.00408cd1
pop ecx
pop ecx
mov ecx, eax
call fcn.0040e3a9
mov ecx, eax
call fcn.0040d585
mov ecx, eax
call fcn.0040e37d
push str.Thunder_Network_
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push esi
call edi
cmp eax, 0xffffffff
je 0x40eeec
test al, 0x10
jne 0x40eef8
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x40ef1c
push str.XMP4_
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push esi
call edi
cmp eax, 0xffffffff
je 0x40ef10
test al, 0x10
jne 0x40ef3b
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x40ef3b
mov ecx, dword [ebp - 0x834]
push 0x418074
call fcn.0040cdd6
mov dword [ebp - 0x83c], 1
jmp 0x40f03b
mov edx, 0x81
xor eax, eax
mov word [ebp - 0x218], bx
mov ecx, edx
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x420], bx
mov ecx, edx
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov edi, 0x104
push edi
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...xmp.ini
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
push edi
lea eax, [ebp - 0x420]
push eax
push esi
push str.UserDataDir
push 0x41b008
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40efe3
lea eax, [ebp - 0x218]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push edi
lea eax, [ebp - 0x218]
push eax
push esi
call dword [sym.imp.MSVCR71.dll_wcsncpy]
xor edi, edi
add esp, 0xc
inc edi
push esi
mov esi, 0x425f30
push esi
call dword [sym.imp.MSVCR71.dll_wcscpy]
cmp dword [ebp - 0x840], ebx
pop ecx
pop ecx
je 0x40f029
push dword [ebp - 0x840]
push esi
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov ecx, dword [ebp - 0x834]
push esi
call fcn.0040cdd6
mov dword [ebp - 0x83c], edi
mov byte [ebp - 4], bl
lea ecx, [ebp - 0x85c]
call fcn.00409a0c
mov eax, dword [ebp - 0x834]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413159
leave
ret