Function at 0x4015d0
Capabilities:
Get common file path
Set current directory
Set file attributes

Disassembly:
sub esp, 0x34c
mov ecx, 0x41
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0x254]
rep stosd dword es:[edi], eax
mov ecx, 0x41
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x254]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov ebx, dword [esp + 0x35c]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push ebx
call esi
test eax, eax
je 0x4017ed
lea ecx, [esp + 0x114]
push ecx
push 0x48f610
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [esp + 0xc], eax
je 0x4017dc
push ebp
mov ebp, dword [esp + 0x364]
mov esi, 0x48f60c
lea eax, [esp + 0x144]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x401677
test cl, cl
je 0x401673
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x401677
add eax, 2
add esi, 2
test cl, cl
jne 0x401653
xor eax, eax
jmp 0x40167c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4017b6
mov esi, 0x48f608
lea eax, [esp + 0x144]
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [esi]
jne 0x4016b4
test cl, cl
je 0x4016b0
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [esi + 1]
jne 0x4016b4
add eax, 2
add esi, 2
test cl, cl
jne 0x401690
xor eax, eax
jmp 0x4016b9
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4017b6
mov eax, dword [esp + 0x118]
lea ecx, [esp + 0x144]
and al, 0xfc
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test byte [esp + 0x118], 0x10
je 0x40179e
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0x14]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x13], 0x5c
je 0x40175e
mov edi, 0x48f604
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x144]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push ebp
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004015d0
add esp, 8
jmp 0x4017b6
lea ecx, [esp + 0x144]
push ecx
call fcn.00409e00
mov ecx, dword [ebp]
add esp, 4
add ecx, eax
mov dword [ebp], ecx
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x118]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x401647
mov eax, dword [esp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
pop ebp
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x254]
push ecx
call esi
lea edx, [esp + 0x254]
push edx
call esi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x34c
ret