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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x551750
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x61308c]
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
mov edx, ecx
xor ebx, ebx
xor edi, edi
mov dword [ebp - 0x68], ebx
xor eax, eax
mov dword [ebp - 0x64], edi
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 4], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], eax
mov word [ebp - 0x28], ax
cmp word [edx], ax
jne 0x40606f
xor ecx, ecx
jmp 0x406083
mov ecx, edx
lea esi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406074
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00404d30
mov byte [ebp - 4], 1
xor eax, eax
push eax
mov dword [ebp - 0x30], 0
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x2c], 0
push 0x587bf4
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
call fcn.00404d30
mov byte [ebp - 4], 2
lea eax, [ebp - 0x28]
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4060e4
test al, 0x10
ja 0x4062c2
push 1
push ecx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x5c
push eax
lea ecx, [ebp - 0x28]
call fcn.00406dc0
mov edi, dword [ebp - 0x18]
lea esi, [edi - 1]
cmp eax, esi
je 0x40611e
push 1
push ecx
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x5c], 0x2f
push eax
lea ecx, [ebp - 0x28]
call fcn.00406dc0
cmp eax, esi
jne 0x40619c
push esi
push 0
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x28]
call fcn.00406c60
mov esi, eax
mov byte [ebp - 4], 3
lea eax, [ebp - 0x28]
cmp eax, esi
je 0x40616c
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x40614f
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x14], 7
push esi
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
call fcn.00407af0
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x44]
cmp eax, 8
jb 0x406185
inc eax
lea ecx, [ebp - 0x58]
push eax
push dword [ebp - 0x58]
call fcn.00404be0
mov edi, dword [ebp - 0x18]
xor eax, eax
mov dword [ebp - 0x44], 7
mov dword [ebp - 0x48], 0
mov word [ebp - 0x58], ax
xor esi, esi
test edi, edi
je 0x406228
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x28]
cmp ecx, 8
cmovae eax, edx
cmp word [eax + esi*2], 0x5c
je 0x4061e6
cmp ecx, 8
lea eax, [ebp - 0x28]
cmovae eax, edx
cmp word [eax + esi*2], 0x2f
je 0x4061e6
cmp ecx, 8
lea eax, [ebp - 0x28]
lea ecx, [ebp - 0x40]
cmovae eax, edx
movzx eax, word [eax + esi*2]
push eax
push 1
call fcn.004073d0
jmp 0x406201
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x68]
call fcn.00406af0
push 1
push 0x587bf8
lea ecx, [ebp - 0x40]
call fcn.00406f60
mov ecx, dword [ebp - 0x18]
lea eax, [ecx - 1]
cmp esi, eax
jne 0x40621a
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x68]
call fcn.00406af0
mov ecx, dword [ebp - 0x18]
inc esi
cmp esi, ecx
jb 0x4061a6
mov eax, dword [ebp - 0x60]
mov ebx, dword [ebp - 0x68]
mov dword [ebp - 0x6c], eax
mov ecx, dword [ebp - 0x64]
mov eax, 0x2aaaaaab
sub ecx, ebx
imul ecx
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
cmp edi, 1
jbe 0x406291
lea esi, [ebx + 0x18]
dec edi
lea eax, [ebp - 0x40]
cmp eax, esi
je 0x40625a
push 0xffffffffffffffff
push 0
push esi
mov ecx, eax
call fcn.004048d0
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x406289
cmp dword [ebp - 0x2c], 8
lea eax, [ebp - 0x40]
push 0x80
cmovae eax, dword [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
add esi, 0x18
sub edi, 1
jne 0x406247
push dword [ebp - 0x5c]
mov edx, dword [ebp - 0x64]
push ecx
mov ecx, ebx
call fcn.00407260
add esp, 8
lea eax, [ebp - 0x28]
mov edi, ebx
mov dword [ebp - 0x64], edi
cmp dword [ebp - 0x14], 8
cmovae eax, dword [ebp - 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x4062c9
test al, 0x10
jbe 0x4062c9
mov esi, 1
jmp 0x4062cb
xor esi, esi
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 8
jb 0x4062e4
inc eax
lea ecx, [ebp - 0x40]
push eax
push dword [ebp - 0x40]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x2c], 7
mov dword [ebp - 0x30], 0
mov word [ebp - 0x40], ax
mov byte [ebp - 4], al
mov eax, dword [ebp - 0x14]
cmp eax, 8
jb 0x406310
inc eax
lea ecx, [ebp - 0x28]
push eax
push dword [ebp - 0x28]
call fcn.00404be0
xor eax, eax
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], 0
mov word [ebp - 0x28], ax
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x406371
push dword [ebp - 0x5c]
mov edx, edi
push ecx
mov ecx, ebx
call fcn.00407260
mov ecx, dword [ebp - 0x6c]
mov eax, 0x2aaaaaab
sub ecx, ebx
add esp, 8
imul ecx
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
push ecx
push ebx
call fcn.004071a0
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x60], 0
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 - 0x10]
xor ecx, ebp
call fcn.005120a1
mov esp, ebp
pop ebp
ret