Function at 0x515567
Capabilities:
Copy file
Create directory
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
sub esp, 0xa84
xor eax, eax
push ebx
push ebp
push esi
mov esi, dword [esp + 0xa94]
mov ebx, eax
mov ebp, eax
test esi, esi
je 0x515842
cmp word [esi], ax
je 0x515842
push edi
mov edi, dword [esp + 0xa9c]
test edi, edi
je 0x515841
cmp word [edi], ax
je 0x515841
push 0x104
lea eax, [esp + 0x18]
push edi
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x228], ax
lea eax, [esp + 0x20]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
push 0x5c
pop ecx
cmp word [esp + eax*2 + 0x12], cx
jne 0x5155df
xor ecx, ecx
mov word [esp + eax*2 + 0x12], cx
push 0x104
lea eax, [esp + 0x474]
push esi
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x684], ax
lea eax, [esp + 0x47c]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
test eax, eax
je 0x515631
push 0x5c
pop ecx
cmp word [esp + eax*2 + 0x46e], cx
je 0x515631
lea eax, [esp + 0x470]
push 0x5cc328
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0x470]
push eax
lea eax, [esp + 0x88c]
push eax
call sub.MSVCRT.dll_wcscpy
mov esi, dword [esp + 0xaa8]
pop ecx
pop ecx
mov ecx, 0x5cc334
test esi, esi
je 0x51565f
xor eax, eax
cmp word [esi], ax
jne 0x515661
mov esi, ecx
push ecx
lea eax, [esp + 0x474]
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0x220]
push eax
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x51569d
test byte [esp + 0x220], 0x10
je 0x515696
xor ebp, ebp
inc ebp
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [esp + 0x220]
push eax
lea eax, [esp + 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x515841
test ebp, ebp
jne 0x5156e9
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
pop ecx
cmp word [esp + eax*2 + 0x12], 0x3a
je 0x5156e9
xor eax, eax
push eax
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x515836
mov ebp, dword [esp + 0x10]
xor ebx, ebx
inc ebx
lea eax, [esp + 0x888]
push eax
lea eax, [esp + 0x680]
push eax
call sub.MSVCRT.dll_wcscpy
lea eax, [esp + 0x254]
push eax
lea eax, [esp + 0x688]
push eax
call sub.MSVCRT.dll_wcscat
push 0x104
lea eax, [esp + 0x28]
push edi
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x238], ax
lea eax, [esp + 0x30]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x20
test eax, eax
je 0x515760
push 0x5c
pop ecx
cmp word [esp + eax*2 + 0x12], cx
je 0x515760
lea eax, [esp + 0x14]
push 0x5cc328
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 0x24c]
push eax
lea eax, [esp + 0x18]
push eax
call sub.MSVCRT.dll_wcscat
test byte [esp + 0x228], 0x10
pop ecx
pop ecx
je 0x5157d8
test byte [esp + 0xaa4], 1
je 0x51581d
lea eax, [esp + 0x24c]
push 0x5cc340
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x51581d
lea eax, [esp + 0x24c]
push 0x5cc33c
push eax
call sub.MSVCRT.dll_wcscmp
pop ecx
pop ecx
test eax, eax
je 0x51581d
push dword [esp + 0xaa4]
lea eax, [esp + 0x18]
push esi
push eax
lea eax, [esp + 0x688]
push eax
call fcn.00515567
jmp 0x51581b
push esi
lea eax, [esp + 0x250]
push eax
call dword [sym.imp.SHLWAPI.dll_PathMatchSpecW]
test eax, eax
je 0x51581d
test byte [esp + 0xaa4], 2
je 0x515805
push pe_nt_image_headers32
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
push eax
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x684]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileW]
and ebx, eax
lea eax, [esp + 0x220]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x5156f0
jmp 0x51583a
mov ebp, dword [esp + 0x10]
push ebp
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0xa84
ret 0x10