Function at 0x401524
Capabilities:
Check if file exists
Create directory
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
mov eax, dword [0x474194]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x26c], eax
mov eax, dword [ebp + 0x14]
push ebx
mov dword [ebp - 0x268], eax
mov eax, dword [ebp + 0x18]
push esi
push edi
mov dword [ebp - 0x264], ecx
mov dword [ebp - 0x270], edx
mov dword [ebp - 0x274], eax
test ecx, ecx
je 0x4017cf
cmp word [ecx], 0
je 0x4017cf
test edx, edx
je 0x4017cf
cmp word [edx], 0
je 0x4017cf
mov eax, ecx
lea edi, [eax + 2]
mov si, word [eax]
add eax, 2
test si, si
jne 0x401590
sub eax, edi
sar eax, 1
lea eax, [ecx + eax*2]
mov dword [ebp - 0x284], eax
lea esi, [eax - 2]
mov eax, edx
lea ecx, [eax + 2]
mov di, word [eax]
add eax, 2
test di, di
jne 0x4015b0
sub eax, ecx
sar eax, 1
lea eax, [edx + eax*2]
push 0x5c
mov dword [ebp - 0x27c], eax
lea ebx, [eax - 2]
pop eax
cmp ax, word [esi]
jne 0x4015da
xor eax, eax
mov word [esi], ax
jmp 0x4015dd
add esi, 2
push 0x5c
pop eax
cmp ax, word [ebx]
je 0x4015eb
add ebx, 2
mov word [ebx], ax
push 0x2a
pop eax
add ebx, 2
mov word [ebx], ax
xor eax, eax
mov word [ebx + 2], ax
lea eax, [ebp - 0x25c]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x278], eax
cmp eax, 0xffffffff
je 0x4017cf
movzx edi, word [esi]
push dword [ebp - 0x264]
xor eax, eax
mov word [esi], ax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x260], eax
cmp eax, 0xffffffff
jne 0x40164c
push 0
push dword [ebp - 0x264]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x4017cf
test byte [ebp - 0x260], 0x10
mov word [esi], di
je 0x4017cf
push 0x5c
pop eax
lea edi, [esi + 2]
mov word [esi], ax
lea eax, [ebp - 0x230]
mov dword [ebp - 0x280], edi
mov dword [ebp - 0x260], ebx
sub edi, eax
sub dword [ebp - 0x260], eax
lea eax, [ebp - 0x230]
movzx ecx, word [eax]
mov word [edi + eax], cx
add eax, 2
test cx, cx
jne 0x401685
lea eax, [ebp - 0x230]
movzx ecx, word [eax]
mov edx, dword [ebp - 0x260]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40169a
test byte [ebp - 0x25c], 0x10
je 0x401712
push 0x2e
pop eax
cmp ax, word [ebp - 0x230]
jne 0x4016e6
xor eax, eax
cmp ax, word [ebp - 0x22e]
je 0x40173e
push 0x2e
pop eax
cmp ax, word [ebp - 0x22e]
jne 0x4016e6
xor eax, eax
cmp ax, word [ebp - 0x22c]
je 0x40173e
push dword [ebp - 0x274]
push dword [ebp - 0x268]
push dword [ebp - 0x26c]
push dword [ebp - 0x270]
push dword [ebp - 0x264]
call fcn.00401524
add esp, 0x14
test al, al
je 0x401759
jmp 0x40173e
cmp dword [ebp - 0x26c], 0
je 0x40173e
push dword [ebp - 0x274]
push dword [ebp - 0x264]
push dword [ebp - 0x270]
call dword [ebp - 0x26c]
add esp, 0xc
test al, al
je 0x4017cf
lea eax, [ebp - 0x25c]
push eax
push dword [ebp - 0x278]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40167f
push dword [ebp - 0x278]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x27c]
lea ecx, [eax + 2]
cmp ebx, ecx
je 0x401779
push 0x5c
pop ecx
mov word [eax - 2], cx
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x284]
add eax, 0xfffffffe
cmp esi, eax
jne 0x40179e
mov ecx, dword [ebp - 0x280]
push 0x5c
pop eax
mov word [esi], ax
xor eax, eax
mov word [ecx], ax
jmp 0x4017a3
xor eax, eax
mov word [esi], ax
cmp dword [ebp - 0x268], 0
je 0x4017cb
push dword [ebp - 0x274]
push dword [ebp - 0x264]
push dword [ebp - 0x270]
call dword [ebp - 0x268]
add esp, 0xc
test al, al
je 0x4017cf
mov al, 1
jmp 0x4017d1
xor al, al
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004500ac
leave
ret