Function at 0x10040420
Capabilities:
Delete directory
Enumerate files on windows
Enumerate files recursively
Move file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x684
mov eax, dword [0x1007b00c]
xor eax, esp
mov dword [esp + 0x680], eax
push ebx
push esi
push edi
push 0x250
lea eax, [esp + 0x1c]
mov esi, ecx
push 0
push eax
mov ebx, edx
mov dword [esp + 0x20], esi
call sub.VCRUNTIME140.dll_memset
push 0x20a
lea eax, [esp + 0x278]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0x18
test esi, esi
je 0x1004075c
test ebx, ebx
je 0x1004075c
xor eax, eax
cmp ax, word [esi]
je 0x1004075c
cmp ax, word [ebx]
je 0x1004075c
mov ecx, ebx
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100404bb
test dx, dx
je 0x100404b7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100404bb
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040495
xor eax, eax
jmp 0x100404c0
sbb eax, eax
or eax, 1
test eax, eax
je 0x1004075c
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
call esi
test eax, eax
je 0x1004075c
push ebx
call esi
mov edi, eax
test edi, edi
jne 0x100404f3
mov ecx, ebx
call fcn.10043020
mov edi, eax
test edi, edi
je 0x1004075c
push 0x103
push dword [esp + 0x18]
lea eax, [esp + 0x270]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
add esp, 0x10
lea eax, [esp + 0x268]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
lea esi, [esp + 0x268]
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10040530
push 3
push 0x1006a234
lea eax, [esp + 0x270]
sub esi, ecx
push 0x104
push eax
sar esi, 1
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x10
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
je 0x1004075c
nop dword [eax]
mov ecx, 0x10069934
lea eax, [esp + 0x44]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100405b6
test dx, dx
je 0x100405b2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100405b6
add eax, 4
add ecx, 4
test dx, dx
jne 0x10040590
xor eax, eax
jmp 0x100405bb
sbb eax, eax
or eax, 1
test eax, eax
je 0x10040709
mov ecx, 0x10069948
lea eax, [esp + 0x44]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x100405f6
test dx, dx
je 0x100405f2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x100405f6
add eax, 4
add ecx, 4
test dx, dx
jne 0x100405d0
xor eax, eax
jmp 0x100405fb
sbb eax, eax
or eax, 1
test eax, eax
je 0x10040709
push 0x20a
lea eax, [esp + 0x47c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + esi]
add esp, 0xc
cmp eax, 0x20a
jae 0x10040773
push 0x104
xor ecx, ecx
push ebx
mov word [esp + eax + 0x270], cx
lea eax, [esp + 0x480]
push 0x105
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy_s]
mov eax, 0x103
sub eax, esi
push eax
lea eax, [esp + 0x58]
push eax
lea eax, [esp + 0x280]
push 0x104
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
add esp, 0x20
lea eax, [esp + 0x478]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddBackslashW]
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10040681
sub ecx, edx
mov eax, 0x104
sar ecx, 1
sub eax, ecx
push eax
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x480]
push 0x105
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncat_s]
mov eax, dword [esp + 0x28]
add esp, 0x10
and eax, 0xfffffff8
push eax
lea eax, [esp + 0x26c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
test byte [esp + 0x18], 0x10
je 0x100406eb
lea edx, [esp + 0x478]
lea ecx, [esp + 0x268]
call fcn.10040420
test eax, eax
jne 0x10040709
xor edi, edi
jmp 0x10040709
push 1
lea eax, [esp + 0x47c]
push eax
lea eax, [esp + 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
neg eax
sbb eax, eax
and edi, eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x10040580
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [esp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x10040745
push 4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
xor edi, edi
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x680]
xor ecx, esp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x68c]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1005b6db
mov esp, ebp
pop ebp
ret
call fcn.1005bfc9
int3