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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421958
mov eax, dword fs:[0]
push eax
sub esp, 0x958
mov eax, dword [0x4300b8]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x840], ebx
mov dword [ebp - 0x83c], eax
mov dword [ebp - 0x838], ebx
mov dword [ebp - 0x838], ebp
mov ecx, dword [ebp - 0x838]
push 1
push ecx
push 0x428c08
call fcn.00417080
mov edi, eax
add esp, 0xc
cmp edi, ebx
jne 0x4179dc
mov edi, str.class_ATL::CComBSTR___cdecl_KKV::GetUserDataPath_const_wchar_t__
push ebx
push edi
mov edx, str.class_ATL::CComBSTR___cdecl_KKV::GetUserDataPath_const_wchar_t__
mov ecx, 0x428cd4
lea esi, [ebp - 0x85c]
call fcn.0040c280
mov dword [ebp - 4], 1
cmp edi, ebx
jne 0x417a00
push ebp
pop ebp
mov ebx, dword [sym.imp.SHLWAPI.dll_PathAppendW]
xor edx, edx
cmp dx, word [0x432748]
jne 0x417d6c
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x832]
push ecx
mov word [ebp - 0x834], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x104
lea edx, [ebp - 0x834]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x62a]
push ecx
mov word [ebp - 0x62c], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x62c]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x417c8b
push str.shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
push str.SHGetKnownFolderPath
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x417bb1
lea ecx, [ebp - 0x844]
push ecx
push 0
push 0
push 0x42258c
mov dword [ebp - 0x844], 0
call eax
test eax, eax
jge 0x417b05
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [ebp - 0x83c]
mov dword [esi], 0
mov dword [ebp - 0x840], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x85c]
call fcn.0040bfc0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041e4d2
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x844]
push edx
lea eax, [ebp - 0x960]
call fcn.00418790
mov byte [ebp - 4], 2
mov ecx, dword [eax]
mov edx, 0x432748
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
test ax, ax
jne 0x417b22
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x960]
lea ecx, [ebp - 0x95c]
cmp eax, ecx
je 0x417b51
push eax
call dword [sym.imp.MSVCR90.dll_free]
add esp, 4
mov edx, dword [ebp - 0x844]
push edx
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push 0x432748
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, str.KKV::GetUserDataPath
call fcn.0040bd20
test eax, eax
jne 0x417ba8
push 0x432748
push ecx
xor edx, edx
mov ecx, str.KKV::GetUserDataPath
call fcn.00411ce0
mov edx, str.vista_PersistFileDir_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x417c0e
push 0x432748
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push 0x432748
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, str.KKV::GetUserDataPath
call fcn.0040bd20
test eax, eax
jne 0x417c0e
push 0x432748
push ecx
xor edx, edx
mov ecx, str.KKV::GetUserDataPath
call fcn.00411ce0
mov edx, str.xp_PersistFileDir_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov ecx, 1
call fcn.0040bcf0
push str.Thunder_Network_
push 0x432748
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push 0x432748
call esi
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp eax, 0xffffffff
je 0x417c36
test al, 0x10
jne 0x417c4d
push 0
push 0x432748
call edi
test eax, eax
jne 0x417c4d
push 0x4256b8
jmp 0x417e06
push str.KKVideo_
push 0x432748
call ebx
push 0x432748
call esi
cmp eax, 0xffffffff
je 0x417c69
test al, 0x10
jne 0x417c8b
push 0
push 0x432748
call edi
test eax, eax
jne 0x417c8b
mov esi, dword [ebp - 0x83c]
mov eax, 0x4256b8
call fcn.0040b890
jmp 0x417ace
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x21a]
push ecx
mov word [ebp - 0x21c], ax
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x422]
push eax
mov word [ebp - 0x424], dx
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...kkv.ini
lea edx, [ebp - 0x21c]
push edx
call ebx
lea eax, [ebp - 0x21c]
push eax
push 0x104
lea ecx, [ebp - 0x424]
push ecx
push 0x432748
push str.UserDataDir
push 0x428dc4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x424]
push edx
lea eax, [ebp - 0x21c]
push eax
call ebx
lea ecx, [ebp - 0x21c]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x417d40
lea edx, [ebp - 0x21c]
push edx
push eax
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
push 0x104
lea ecx, [ebp - 0x21c]
push ecx
push 0x104
push 0x432748
call dword [sym.imp.MSVCR90.dll_wcsncpy_s]
add esp, 0x10
push 0x104
push 0x432748
push 0x104
push 0x432950
call dword [sym.imp.MSVCR90.dll_wcsncpy_s]
xor edx, edx
add esp, 0x10
cmp edx, str.CoreProgram_
je 0x417d9f
push str.CoreProgram_
push 0x432950
call ebx
mov ecx, str.KKV::GetUserDataPath
call fcn.0040bd20
test eax, eax
jne 0x417e01
push 0x432950
push ecx
xor edx, edx
mov ecx, str.KKV::GetUserDataPath
call fcn.00411ce0
mov edx, str.Path_:
mov ecx, eax
call fcn.0040ba10
add esp, 4
push eax
call fcn.0040b8d0
mov esi, eax
xor eax, eax
mov dword [0x430e60], eax
mov dword [esi + 0x248], eax
mov eax, dword [esi + 0x240]
push 1
push eax
push 1
xor ecx, ecx
mov edx, esi
call fcn.00416620
add esi, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x432950
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov esi, dword [ebp - 0x83c]
mov dword [esi], eax
test eax, eax
jne 0x417ace
push 0x8007000e
call fcn.004177e0
int3