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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4366e4
mov eax, dword fs:[0]
push eax
sub esp, 0x550
mov eax, dword [0x45a6d0]
xor eax, esp
mov dword [esp + 0x548], eax
push ebx
push esi
push edi
mov eax, dword [0x45a6d0]
xor eax, esp
push eax
lea eax, [esp + 0x560]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
push ebx
mov esi, ecx
push 0x1a
lea ecx, [esp + 0x354]
push ecx
push ebx
mov dword [esp + 0x30], eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, 8
cmp dword [esi + 0x14], edi
jb 0x406c5b
mov eax, dword [esi]
jmp 0x406c5d
mov eax, esi
push eax
lea edx, [esp + 0x350]
push edx
push str._s_s
call fcn.00404770
add esp, 0xc
lea eax, [esp + 0x34c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x406c94
push ebx
lea ecx, [esp + 0x350]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
cmp dword [esi + 0x30], edi
lea eax, [esi + 0x1c]
jb 0x406c9e
mov eax, dword [eax]
push eax
lea edx, [esp + 0x350]
push edx
push str._s_s
call fcn.00404770
add esp, 0xc
push 0x2000
call fcn.0041a77e
add esp, 4
push 0x1000
mov edi, eax
push ebx
push edi
mov dword [esp + 0x28], edi
call fcn.00426cd0
add esp, 0xc
lea eax, [esp + 0x34c]
push eax
push 0x1000
push edi
push ebx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [esp + 0x10], edi
cmp eax, ebx
jbe 0x4072fa
mov dword [esp + 0x18], eax
jmp 0x406d04
mov edi, dword [esp + 0x10]
xor ecx, ecx
mov eax, edi
mov dword [esp + 0xcc], 7
mov dword [esp + 0xc8], ebx
mov word [esp + 0xb8], cx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406d25
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea esi, [esp + 0xbc]
call fcn.00409320
push 0xa
push str.DnsSetting
mov edx, esi
push edx
mov dword [esp + 0x574], ebx
call fcn.00409170
cmp eax, 0xffffffff
je 0x4072ab
mov esi, 0xf
mov dword [esp + 0x24], 1
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
push 0x206
lea ecx, [esp + 0x14a]
xor eax, eax
push ebx
mov byte [esp + 0x570], 3
push ecx
mov word [esp + 0x150], ax
call fcn.00426cd0
add esp, 0xc
lea edx, [esp + 0x34c]
push edx
push 0x104
lea eax, [esp + 0x14c]
push eax
push 0x43c02c
push str.IsAuto
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0xd8]
push edx
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_KpBase::ws2s_wchar_t_const__
push eax
lea eax, [esp + 0xa8]
push eax
mov byte [esp + 0x578], 4
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::DecryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 0x10
mov byte [esp + 0x568], 6
cmp dword [esp + 0xe8], 0x10
jb 0x406e31
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.0041bfc5
add esp, 4
lea edx, [esp + 0x34c]
push edx
push 0x104
lea eax, [esp + 0x14c]
push eax
push 0x43c02c
push str.GUID
push edi
mov dword [esp + 0x100], esi
mov dword [esp + 0xfc], ebx
mov byte [esp + 0xec], bl
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x144]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406e76
sub eax, edx
sar eax, 1
je 0x406f78
lea ecx, [esp + 0x144]
push ecx
lea edx, [esp + 0x12c]
push edx
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_KpBase::ws2s_wchar_t_const__
push eax
lea eax, [esp + 0x8c]
push eax
mov byte [esp + 0x578], 7
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::DecryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 0x10
mov esi, eax
lea ecx, [esp + 0x28]
cmp ecx, esi
je 0x406f1e
cmp dword [esp + 0x3c], 0x10
jb 0x406ed7
mov edx, dword [esp + 0x28]
push edx
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
cmp dword [esi + 0x14], 0x10
jae 0x406f02
mov eax, dword [esi + 0x10]
inc eax
push eax
lea eax, [esp + 0x2c]
push esi
push eax
call fcn.0041b8d0
add esp, 0xc
jmp 0x406f0a
mov ecx, dword [esi]
mov dword [esp + 0x28], ecx
mov dword [esi], ebx
mov edx, dword [esi + 0x10]
mov dword [esp + 0x38], edx
mov eax, dword [esi + 0x14]
mov dword [esp + 0x3c], eax
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], ebx
cmp dword [esp + 0x94], 0x10
jb 0x406f38
mov ecx, dword [esp + 0x80]
push ecx
call fcn.0041bfc5
add esp, 4
mov byte [esp + 0x568], 6
cmp dword [esp + 0x13c], 0x10
mov dword [esp + 0x94], 0xf
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
jb 0x406f73
mov edx, dword [esp + 0x128]
push edx
call fcn.0041bfc5
add esp, 4
mov esi, 0xf
mov eax, dword [esp + 0xac]
push 0xb
mov ecx, str.ay_dns_true
lea edx, [esp + 0xa0]
call fcn.004090b0
test eax, eax
jne 0x406fa3
mov dword [esp + 0x24], 1
jmp 0x40720a
lea eax, [esp + 0x34c]
push eax
push 0x104
lea ecx, [esp + 0x14c]
push ecx
push 0x43c02c
push str.FirstDns
push edi
mov dword [esp + 0x3c], ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x144]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406fd7
sub eax, edx
sar eax, 1
je 0x4070d0
lea edx, [esp + 0x144]
push edx
lea eax, [esp + 0x12c]
push eax
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_KpBase::ws2s_wchar_t_const__
push eax
lea ecx, [esp + 0x8c]
push ecx
mov byte [esp + 0x578], 9
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::DecryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 0x10
mov edi, eax
lea edx, [esp + 0x44]
cmp edx, edi
je 0x40707b
cmp dword [esp + 0x58], 0x10
jb 0x407038
mov eax, dword [esp + 0x44]
push eax
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [edi + 0x14], 0x10
jae 0x40705f
mov eax, dword [edi + 0x10]
inc eax
push eax
lea ecx, [esp + 0x48]
push edi
push ecx
call fcn.0041b8d0
add esp, 0xc
jmp 0x407067
mov edx, dword [edi]
mov dword [esp + 0x44], edx
mov dword [edi], ebx
mov eax, dword [edi + 0x10]
mov dword [esp + 0x54], eax
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x58], ecx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
cmp dword [esp + 0x94], 0x10
jb 0x407095
mov edx, dword [esp + 0x80]
push edx
call fcn.0041bfc5
add esp, 4
mov byte [esp + 0x568], 6
cmp dword [esp + 0x13c], 0x10
mov dword [esp + 0x94], esi
mov dword [esp + 0x90], ebx
mov byte [esp + 0x80], bl
jb 0x4070cc
mov eax, dword [esp + 0x128]
push eax
call fcn.0041bfc5
add esp, 4
mov edi, dword [esp + 0x10]
lea ecx, [esp + 0x34c]
push ecx
push 0x104
lea edx, [esp + 0x14c]
push edx
push 0x43c02c
push str.SecondDns
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [esp + 0x144]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x407100
sub eax, edx
sar eax, 1
je 0x40720a
lea eax, [esp + 0x144]
push eax
lea ecx, [esp + 0x110]
push ecx
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_KpBase::ws2s_wchar_t_const__
push eax
lea edx, [esp + 0xfc]
push edx
mov byte [esp + 0x578], 0xb
call sym.jsService.exe_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char_____cdecl_AyDecrypt::DecryptIni_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char____
add esp, 0x10
mov edi, eax
lea eax, [esp + 0x60]
cmp eax, edi
je 0x4071a4
cmp dword [esp + 0x74], 0x10
jb 0x407161
mov ecx, dword [esp + 0x60]
push ecx
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
cmp dword [edi + 0x14], 0x10
jae 0x407188
mov eax, dword [edi + 0x10]
inc eax
push eax
lea edx, [esp + 0x64]
push edi
push edx
call fcn.0041b8d0
add esp, 0xc
jmp 0x407190
mov eax, dword [edi]
mov dword [esp + 0x60], eax
mov dword [edi], ebx
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x70], ecx
mov edx, dword [edi + 0x14]
mov dword [esp + 0x74], edx
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ebx
cmp dword [esp + 0x104], 0x10
jb 0x4071be
mov eax, dword [esp + 0xf0]
push eax
call fcn.0041bfc5
add esp, 4
mov byte [esp + 0x568], 6
cmp dword [esp + 0x120], 0x10
mov dword [esp + 0x104], esi
mov dword [esp + 0x100], ebx
mov byte [esp + 0xf0], bl
jb 0x4071f5
mov ecx, dword [esp + 0x10c]
push ecx
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x120], esi
mov dword [esp + 0x11c], ebx
mov byte [esp + 0x10c], bl
mov edi, dword [esp + 0x20]
lea ecx, [esp + 0x24]
call fcn.00409000
mov edi, 0x10
cmp dword [esp + 0xb0], edi
jb 0x407235
mov edx, dword [esp + 0x9c]
push edx
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0xb0], esi
mov dword [esp + 0xac], ebx
mov byte [esp + 0x9c], bl
cmp dword [esp + 0x74], edi
jb 0x40725d
mov eax, dword [esp + 0x60]
push eax
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x74], esi
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
cmp dword [esp + 0x58], edi
jb 0x40727c
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0041bfc5
add esp, 4
mov dword [esp + 0x58], esi
mov dword [esp + 0x54], ebx
mov byte [esp + 0x44], bl
cmp dword [esp + 0x3c], edi
jb 0x40729b
mov edx, dword [esp + 0x28]
push edx
call fcn.0041bfc5
add esp, 4
mov edi, dword [esp + 0x10]
mov dword [esp + 0x3c], esi
mov dword [esp + 0x38], ebx
mov byte [esp + 0x28], bl
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4072b0
sub eax, edx
sar eax, 1
lea eax, [edi + eax*2 + 2]
mov dword [esp + 0x568], 0xffffffff
cmp dword [esp + 0xcc], 8
mov dword [esp + 0x10], eax
jb 0x4072ec
mov ecx, dword [esp + 0xb8]
push ecx
call fcn.0041bfc5
add esp, 4
dec dword [esp + 0x18]
jne 0x406d00
mov edi, dword [esp + 0x1c]
push edi
call fcn.0041c3d5
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x560]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x548]
xor ecx, esp
call fcn.0041b4d6
mov esp, ebp
pop ebp
ret 4