Function at 0x405ce0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x436835
mov eax, dword fs:[0]
push eax
sub esp, 0x264
mov eax, dword [0x45a6d0]
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
xor ebx, ebx
push ebx
push 0x1a
lea eax, [ebp - 0x218]
push eax
push ebx
mov esi, ecx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, 8
cmp dword [esi + 0x14], edi
jb 0x405d31
mov eax, dword [esi]
jmp 0x405d33
mov eax, esi
push eax
lea ecx, [ebp - 0x218]
push ecx
push str._s_s
mov edx, ecx
call fcn.00404770
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x405d69
push ebx
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [esi + 0x30], edi
lea eax, [esi + 0x1c]
jb 0x405d73
mov eax, dword [eax]
push eax
lea ecx, [ebp - 0x218]
push ecx
push str._s_s
mov edx, ecx
call fcn.00404770
add esp, 0xc
push ebx
mov edi, 0xf
push 0x43b1ec
lea ecx, [ebp - 0x234]
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
call fcn.004028b2
mov dword [ebp - 4], ebx
mov dword [ebp - 0x258], edi
mov dword [ebp - 0x25c], ebx
mov byte [ebp - 0x26c], bl
lea ecx, [ebp - 0x26c]
cmp dword [ebp + 8], ebx
je 0x405eb7
push 0xb
push str.TRUE_aytrue
call fcn.004028b2
lea edx, [ebp - 0x26c]
push edx
lea eax, [ebp - 0x250]
push eax
mov byte [ebp - 4], 1
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::EncryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 8
mov esi, eax
lea ecx, [ebp - 0x234]
cmp ecx, esi
je 0x405e71
cmp dword [ebp - 0x220], 0x10
jb 0x405e20
mov edx, dword [ebp - 0x234]
push edx
call fcn.0041bfc5
add esp, 4
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
cmp dword [esi + 0x14], 0x10
jae 0x405e4f
mov eax, dword [esi + 0x10]
inc eax
push eax
lea eax, [ebp - 0x234]
push esi
push eax
call fcn.0041b8d0
add esp, 0xc
jmp 0x405e59
mov ecx, dword [esi]
mov dword [ebp - 0x234], ecx
mov dword [esi], ebx
mov edx, dword [esi + 0x10]
mov dword [ebp - 0x224], edx
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x220], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
cmp dword [ebp - 0x23c], 0x10
jb 0x405e89
mov ecx, dword [ebp - 0x250]
push ecx
call fcn.0041bfc5
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp - 0x258], 0x10
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x240], ebx
mov byte [ebp - 0x250], bl
jb 0x405f97
mov edx, dword [ebp - 0x26c]
push edx
jmp 0x405f8f
push 5
push str.FALSE
call fcn.004028b2
lea eax, [ebp - 0x26c]
push eax
lea ecx, [ebp - 0x250]
push ecx
mov byte [ebp - 4], 3
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::EncryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 8
mov esi, eax
lea edx, [ebp - 0x234]
cmp edx, esi
je 0x405f52
cmp dword [ebp - 0x220], 0x10
jb 0x405f01
mov eax, dword [ebp - 0x234]
push eax
call fcn.0041bfc5
add esp, 4
mov dword [ebp - 0x220], edi
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
cmp dword [esi + 0x14], 0x10
jae 0x405f30
mov eax, dword [esi + 0x10]
inc eax
push eax
lea ecx, [ebp - 0x234]
push esi
push ecx
call fcn.0041b8d0
add esp, 0xc
jmp 0x405f3a
mov edx, dword [esi]
mov dword [ebp - 0x234], edx
mov dword [esi], ebx
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x224], eax
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x220], ecx
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
cmp dword [ebp - 0x23c], 0x10
jb 0x405f6a
mov edx, dword [ebp - 0x250]
push edx
call fcn.0041bfc5
add esp, 4
mov byte [ebp - 4], bl
cmp dword [ebp - 0x258], 0x10
mov dword [ebp - 0x23c], edi
mov dword [ebp - 0x240], ebx
mov byte [ebp - 0x250], bl
jb 0x405f97
mov eax, dword [ebp - 0x26c]
push eax
call fcn.0041bfc5
add esp, 4
mov eax, dword [sym.jsService.exe_class_FileLogger__FileLogger::m_pThis]
cmp eax, ebx
jne 0x405fce
push 0x15c
call fcn.0041c0fb
add esp, 4
mov dword [ebp - 0x270], eax
mov byte [ebp - 4], 5
cmp eax, ebx
je 0x405fc4
mov ecx, eax
call sym.jsService.exe_private:_void___thiscall_FileLogger::constructor_void_
jmp 0x405fc6
xor eax, eax
mov byte [ebp - 4], bl
mov dword [sym.jsService.exe_class_FileLogger__FileLogger::m_pThis], eax
mov ecx, dword [ebp + 8]
push ecx
push str.AppSetting::saveQuitSuccess__d
push eax
call sym.jsService.exe_public:_void___cdecl_FileLogger::addLogV_char_const__
mov eax, dword [ebp - 0x234]
mov edi, 0x10
add esp, 0xc
cmp dword [ebp - 0x220], edi
jae 0x405ff9
lea eax, [ebp - 0x234]
push eax
lea edx, [ebp - 0x250]
push edx
call sym.jsService.exe_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____cdecl_KpBase::s2ws_char_const__
mov esi, 8
add esp, 8
cmp dword [eax + 0x14], esi
jb 0x406015
mov eax, dword [eax]
lea ecx, [ebp - 0x218]
push ecx
push eax
push str.QuitSuccess
push str.ConnectSetting
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
cmp dword [ebp - 0x23c], esi
jb 0x406044
mov edx, dword [ebp - 0x250]
push edx
call fcn.0041bfc5
add esp, 4
cmp dword [ebp - 0x220], edi
jb 0x40605b
mov eax, dword [ebp - 0x234]
push eax
call fcn.0041bfc5
add esp, 4
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.0041b4d6
mov esp, ebp
pop ebp
ret 4