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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc9c
mov eax, dword [0x443054]
xor eax, esp
mov dword [esp + 0xc98], eax
push ebx
push esi
push edi
push 0
mov dword [0x4451ec], 0xffffffff
mov dword [0x4451f0], 1
call fcn.0041a249
add esp, 4
mov dword [esp + 0x18], eax
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], edx
push eax
call fcn.0041a536
add esp, 4
push eax
push str._Y__m__d__H_M_S
lea eax, [esp + 0x28]
push 0x50
push eax
call fcn.0041a1b5
lea esi, [esp + 0x30]
add esp, 0x10
lea ecx, [esi + 1]
nop dword [eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x40af00
sub esi, ecx
mov edx, 2
inc esi
xor ecx, ecx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00410796
add esp, 4
mov edi, eax
lea eax, [esp + 0x20]
mov dword [esp + 0x10], edi
push esi
push eax
push edi
call fcn.00419e08
add esp, 0xc
mov dword [esp + 0x14], 0x104
lea eax, [esp + 0x14]
push eax
lea eax, [esp + 0x74]
push eax
call dword [sym.imp.USERENV.dll_GetAllUsersProfileDirectoryW]
test eax, eax
jne 0x40af77
push str.error_dont_read_slog_config
push 0x4451ec
call fcn.0040b450
push str.error_dont_read_log_config
call fcn.0040b560
add esp, 0xc
jmp 0x40b296
lea eax, [esp + 0x70]
push eax
push str._sASUSARMOURY_CRATE_Diagnosis_tools_page_
lea eax, [esp + 0x488]
push 0x104
push eax
call fcn.00401130
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [esp + 0x490]
add esp, 0x10
push eax
call ebx
cmp eax, 0xffffffff
je 0x40afb3
test al, 0x10
jne 0x40b0ca
push 0x208
lea eax, [esp + 0x27c]
push 0
push eax
call fcn.00412210
add esp, 0xc
lea eax, [esp + 0x70]
push 0x208
push 0
push eax
call fcn.00412210
lea ecx, [esp + 0x48c]
add esp, 0xc
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40aff0
sub ecx, edx
sar ecx, 1
je 0x40b0ca
cmp word [esp + ecx*2 + 0x276], 0x5c
lea eax, [esp + 0x480]
push eax
mov edx, 0x43f190
mov eax, 0x43e414
cmovne eax, edx
push eax
lea eax, [esp + 0x280]
push eax
call fcn.0040b580
add esp, 0xc
lea eax, [esp + 0x278]
push 0x5c
push eax
call fcn.00411aab
mov esi, eax
add esp, 8
test esi, esi
je 0x40b0ca
mov ebx, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [eax + eax]
lea eax, [esp + 0x278]
mov ecx, esi
sub ecx, eax
sar ecx, 1
inc ecx
push ecx
push eax
lea eax, [esp + 0x78]
push 0x104
push eax
call fcn.0041b636
add esp, 0x10
lea eax, [esp + 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40b096
test al, 0x10
jne 0x40b0ac
push 0
lea eax, [esp + 0x74]
push eax
call ebx
test eax, eax
jne 0x40b0ac
call edi
cmp eax, 0xb7
jne 0x40b0c0
lea eax, [esi + 2]
push 0x5c
push eax
call fcn.00411aab
mov esi, eax
add esp, 8
test esi, esi
jne 0x40b060
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, dword [esp + 0x10]
push 0x208
lea eax, [esp + 0x74]
push 0
push eax
call fcn.00412210
add esp, 0xc
lea eax, [esp + 0x70]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x70]
push 0x5c
push eax
call fcn.00411b72
mov esi, eax
add esp, 8
test esi, esi
jne 0x40b10b
lea esi, [esp + 0x70]
jmp 0x40b10e
add esi, 2
push 0x2e
push esi
call fcn.00411b72
sub eax, esi
sar eax, 1
push eax
push esi
lea eax, [esp + 0x8a0]
push 0x104
push eax
call fcn.0041b636
lea eax, [esp + 0x498]
push eax
lea eax, [esp + 0x6a4]
push str._s_asus.cfg
push eax
call fcn.0040b580
add esp, 0x24
lea eax, [esp + 0x890]
push edi
push eax
lea eax, [esp + 0x488]
push eax
lea eax, [esp + 0xaa4]
push str._s_s_s.log
push eax
call fcn.0040b580
add esp, 0x14
lea eax, [esp + 0x688]
push eax
call ebx
cmp eax, 0xffffffff
je 0x40b296
test al, 0x10
jne 0x40b296
lea eax, [esp + 0x10]
mov dword [esp + 0x14], 0
push eax
lea edx, [esp + 0x18]
mov dword [esp + 0x14], 0
lea ecx, [esp + 0x68c]
call fcn.0040f3c0
mov esi, dword [esp + 0x18]
add esp, 4
cmp dword [esp + 0x10], 0
jbe 0x40b289
mov ecx, str.debugview
mov eax, esi
nop word [eax + eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40b1f0
test dl, dl
je 0x40b1ec
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40b1f0
add eax, 2
add ecx, 2
test dl, dl
jne 0x40b1d0
xor eax, eax
jmp 0x40b1f5
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40b208
mov dword [0x4451f0], 2
jmp 0x40b289
mov ecx, str.file
mov eax, esi
nop
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40b230
test dl, dl
je 0x40b22c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40b230
add eax, 2
add ecx, 2
test dl, dl
jne 0x40b210
xor eax, eax
jmp 0x40b235
sbb eax, eax
or eax, 1
test eax, eax
jne 0x40b245
mov dword [0x4451f0], 1
jmp 0x40b289
mov ecx, str.event
mov eax, esi
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40b270
test dl, dl
je 0x40b26c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40b270
add eax, 2
add ecx, 2
test dl, dl
jne 0x40b250
xor ecx, ecx
jmp 0x40b275
sbb ecx, ecx
or ecx, 1
mov eax, dword [0x4451f0]
test ecx, ecx
mov edx, 3
cmove eax, edx
mov dword [0x4451f0], eax
test esi, esi
je 0x40b296
push esi
call fcn.004102d6
add esp, 4
mov eax, dword [0x4451f0]
sub eax, 1
jne 0x40b2cf
push eax
push 0x80
push 2
push eax
push 7
push 0xc0000000
lea eax, [esp + 0xab0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [0x4451ec], eax
cmp eax, 0xffffffff
jne 0x40b2cf
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0xca4]
mov eax, 0x4451ec
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004102c8
mov esp, ebp
pop ebp
ret