Function at 0x406680
Capabilities:
Check if file exists
Create directory
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x124
push edi
mov eax, dword [str.C:LOGS]
mov dword [ebp - 0x110], eax
mov ecx, dword [0x409728]
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 0x108], 0
mov dl, byte [0x40994c]
mov byte [ebp - 0x100], dl
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0xff]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp dword [ebp + 0xc], 0
jne 0x4066d9
mov eax, 1
jmp 0x406983
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
cmp dword [ebp + 8], 0
je 0x4066f6
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx]
test edx, edx
jne 0x406773
lea eax, [ebp + 0x10]
mov dword [ebp - 0x104], eax
mov ecx, dword [ebp - 0x116]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x118]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x11a]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x11c]
and ecx, 0xffff
push ecx
push 0x40972c
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 0x14
mov edx, dword [ebp - 0x104]
push edx
mov eax, dword [ebp + 0xc]
push eax
call dword [sym.imp.MSVCRT.dll_vprintf]
add esp, 8
push 0x409744
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 4
mov dword [ebp - 0x104], 0
xor eax, eax
jmp 0x406983
push 0x100
push 0
lea ecx, [ebp - 0x100]
push ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x110]
push eax
push str._s_s
push 0xff
lea ecx, [ebp - 0x100]
push ecx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x14
push 0
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.MSVCRT.dll__access]
add esp, 8
test eax, eax
je 0x4067fd
push 0
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 0
lea ecx, [ebp - 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x4067fd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4067fd
mov eax, 1
jmp 0x406983
push 0x100
push 0
lea edx, [ebp - 0x100]
push edx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x11e]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x122]
and ecx, 0xffff
push ecx
mov eax, dword [ebp - 0x124]
and eax, 0xffff
cdq
mov ecx, 0x64
idiv ecx
push edx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp + 8]
push eax
lea ecx, [ebp - 0x110]
push ecx
push str._s_s_s._02d_02d_02d00.DBG
push 0xff
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.MSVCRT.dll__snprintf]
add esp, 0x24
lea eax, [ebp - 0x100]
push eax
call dword [sym.imp.MSVCRT.dll__strupr]
add esp, 4
lea ecx, [ebp - 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0x114], eax
cmp dword [ebp - 0x114], 0xffffffff
je 0x4068b8
mov edx, dword [ebp - 0x114]
and edx, 1
test edx, edx
je 0x4068b8
mov eax, dword [ebp - 0x114]
and al, 0xfe
push eax
lea ecx, [ebp - 0x100]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push 0x40976c
lea edx, [ebp - 0x100]
push edx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [ebp - 0x108], eax
cmp dword [ebp - 0x108], 0
jne 0x4068e6
mov eax, 1
jmp 0x406983
lea eax, [ebp + 0x10]
mov dword [ebp - 0x104], eax
mov ecx, dword [ebp - 0x116]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x118]
and edx, 0xffff
push edx
mov eax, dword [ebp - 0x11a]
and eax, 0xffff
push eax
mov ecx, dword [ebp - 0x11c]
and ecx, 0xffff
push ecx
push str._02d:_02d:_02d._03d
mov edx, dword [ebp - 0x108]
push edx
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 0x18
mov eax, dword [ebp - 0x104]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x108]
push edx
call dword [sym.imp.MSVCRT.dll_vfprintf]
add esp, 0xc
push 0x409788
mov eax, dword [ebp - 0x108]
push eax
call dword [sym.imp.MSVCRT.dll_fprintf]
add esp, 8
mov ecx, dword [ebp - 0x108]
push ecx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov dword [ebp - 0x104], 0
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret