Function at 0x40d700
Capabilities:
Copy file
Enumerate files on windows
Set file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4180e7
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1a4
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x1c4]
push 0x41ce58
lea ecx, [esp + 0x68]
mov ebp, 1
xor edi, edi
push eax
push ecx
mov dword [esp + 0x1c8], ebp
mov dword [esp + 0x2c], edi
call fcn.0040f530
add esp, 0xc
mov eax, dword [esp + 0x68]
mov byte [esp + 0x1bc], 2
cmp eax, edi
mov dword [esp + 0x18], edi
jne 0x40d764
mov eax, 0x41921c
lea edx, [esp + 0x74]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x1c], ebx
jne 0x40d7ff
mov al, byte [esp + 0x13]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x28], esp
push edi
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov edi, str.no_files_found_in_source_directory_n
or ecx, ebx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.no_files_found_in_source_directory_n
mov ecx, esi
call fcn.00402330
call fcn.004051f0
add esp, 0x10
lea ecx, [esp + 0x64]
mov byte [esp + 0x1bc], 1
push ebp
call fcn.00401d10
push ebp
lea ecx, [esp + 0x1c8]
mov byte [esp + 0x1c0], 0
call fcn.00401d10
push ebp
lea ecx, [esp + 0x1d8]
mov dword [esp + 0x1c0], ebx
call fcn.00401d10
xor eax, eax
jmp 0x40dbff
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0xa0]
lea edx, [esp + 0x1c4]
push ecx
lea eax, [esp + 0x58]
push edx
push eax
call fcn.0040f530
lea ecx, [esp + 0xac]
lea edx, [esp + 0x1e0]
push ecx
lea eax, [esp + 0x54]
push edx
push eax
mov byte [esp + 0x1d4], 3
call fcn.0040f530
add esp, 0x18
mov eax, dword [esp + 0x48]
mov byte [esp + 0x1bc], 4
test eax, eax
jne 0x40d853
mov eax, 0x41921c
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [esp + 0x48]
mov ecx, 0x41921c
test eax, eax
je 0x40d86e
mov ecx, eax
mov eax, dword [esp + 0x58]
test eax, eax
jne 0x40d87b
mov eax, 0x41921c
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40d946
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x38], cl
lea ecx, [esp + 0x38]
mov dword [esp + 0x1c], ebp
call fcn.00401d10
mov edi, str.copied_file_to:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.copied_file_to:
lea ecx, [esp + 0x3c]
call fcn.00402330
mov edx, dword [0x419218]
lea eax, [esp + 0x44]
push edx
push 0
push eax
lea ecx, [esp + 0x40]
mov byte [esp + 0x1c8], 5
call fcn.0040f2f0
mov edi, 0x41c2dc
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x41c2dc
lea ecx, [esp + 0x3c]
call fcn.0040f3d0
mov cl, byte [esp + 0x34]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x24], esp
push 0
mov byte [esi], cl
mov ecx, esi
call fcn.00401d10
mov edx, dword [0x419218]
lea eax, [esp + 0x44]
push edx
push 0
push eax
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
mov byte [esp + 0x1bc], 4
lea ecx, [esp + 0x34]
push ebp
jmp 0x40da12
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
call fcn.00401d10
mov edi, str.src:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str.src:
lea ecx, [esp + 0x2c]
call fcn.00402330
mov edx, dword [0x419218]
lea eax, [esp + 0x54]
push edx
push 0
push eax
lea ecx, [esp + 0x30]
mov byte [esp + 0x1c8], 6
call fcn.0040f2f0
mov edi, str._ndst:
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push str._ndst:
lea ecx, [esp + 0x2c]
call fcn.0040f3d0
mov ecx, dword [0x419218]
lea edx, [esp + 0x44]
push ecx
push 0
push edx
lea ecx, [esp + 0x30]
call fcn.0040f2f0
mov al, byte [esp + 0x24]
sub esp, 0x10
mov esi, esp
mov dword [esp + 0x24], esp
push 0
mov ecx, esi
mov byte [esi], al
call fcn.00401d10
mov ecx, dword [0x419218]
lea edx, [esp + 0x34]
push ecx
push 0
push edx
mov ecx, esi
call fcn.00401b10
call fcn.004051f0
add esp, 0x10
call fcn.00408b80
mov byte [esp + 0x1bc], 4
push ebp
lea ecx, [esp + 0x28]
call fcn.00401d10
lea eax, [esp + 0x74]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40dade
mov dword [esp + 0x20], ebp
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x40da7e
mov cl, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x24], esp
push 0
mov byte [ebp], cl
mov ecx, ebp
call fcn.00401d10
mov edi, str.Found_all_of_the_files_n
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.00402510
test al, al
je 0x40dad6
mov edi, dword [ebp + 4]
mov ecx, ebx
mov esi, str.Found_all_of_the_files_n
jmp 0x40dac0
mov al, byte [esp + 0x13]
sub esp, 0x10
mov ebp, esp
mov dword [esp + 0x24], esp
push 0
mov ecx, ebp
mov byte [ebp], al
call fcn.00401d10
mov edi, str.Unable_to_find_next_file_n
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebx, ecx
mov ecx, ebp
push ebx
call fcn.00402510
test al, al
je 0x40dad6
mov edi, dword [ebp + 4]
mov ecx, ebx
mov esi, str.Unable_to_find_next_file_n
mov edx, ecx
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.004024f0
call fcn.004051f0
add esp, 0x10
mov ebp, 1
lea ecx, [esp + 0x44]
push ebp
mov byte [esp + 0x1c0], 3
call fcn.00401d10
push ebp
lea ecx, [esp + 0x58]
mov byte [esp + 0x1c0], 2
call fcn.00401d10
mov eax, dword [esp + 0x20]
test eax, eax
je 0x40d7fb
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
jne 0x40db83
mov cl, byte [esp + 0x13]
sub esp, 0x10
mov ebx, esp
mov dword [esp + 0x24], esp
push eax
mov byte [ebx], cl
mov ecx, ebx
call fcn.00401d10
mov edi, str.Unable_to_close_search_handle_n
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
mov ecx, ebx
push ebp
call fcn.00402510
test al, al
je 0x40db7b
mov edi, dword [ebx + 4]
mov ecx, ebp
mov edx, ecx
mov esi, str.Unable_to_close_search_handle_n
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebx + 8], ebp
mov ebx, dword [ebx + 4]
add ebx, ebp
mov byte [ebx], 0
call fcn.004051f0
add esp, 0x10
push 1
lea ecx, [esp + 0x68]
mov byte [esp + 0x1c0], 1
call fcn.00401d10
mov ecx, dword [esp + 0x1c8]
xor esi, esi
cmp ecx, esi
je 0x40dbbf
mov al, byte [ecx - 1]
test al, al
je 0x40dbb5
cmp al, 0xff
je 0x40dbb5
dec al
mov byte [ecx - 1], al
jmp 0x40dbbf
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov ecx, dword [esp + 0x1d8]
mov dword [esp + 0x1c8], esi
cmp ecx, esi
mov dword [esp + 0x1cc], esi
mov dword [esp + 0x1d0], esi
je 0x40dbfb
mov al, byte [ecx - 1]
test al, al
je 0x40dbf1
cmp al, 0xff
je 0x40dbf1
dec al
mov byte [ecx - 1], al
jmp 0x40dbfb
dec ecx
push ecx
call fcn.0040f86e
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1b4]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x1b0
ret