Function at 0x4044e0
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get common file path
Get file attributes
Set current directory
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b9db2
mov eax, dword fs:[0]
push eax
sub esp, 0x9fc
mov eax, dword [0x6877f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 8]
push 0x104
mov dword [ebp - 0x9f0], eax
lea eax, [ebp - 0x31c]
push 0
push eax
mov dword [ebp - 0xa04], 0
call fcn.0058db90
push 0x514
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.0058db90
add esp, 0x18
mov dword [ebp - 0xa00], 0
mov dword [ebp - 0x9fc], 0
push 0
push 0
call fcn.0040bda0
mov esi, eax
mov dword [ebp - 0x9f4], esi
mov dword [ebp - 0xa00], esi
push dword [ebp - 0x9f0]
mov dword [ebp - 4], 0
push str.Cleanup_Path:__s
push edi
call fcn.00406510
add esp, 0xc
cmp byte [0x68defc], 0
je 0x404763
cmp byte [0x68defb], 0
je 0x404763
push ecx
mov ecx, edi
call fcn.00403190
lea eax, [edi + 0x410]
push eax
lea eax, [ebp - 0x830]
push str._sTemp
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
push str.CTESComponentsSVCOutbox
push dword [ebp - 0x9f0]
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x404de2
lea eax, [ebp - 0x830]
push eax
push dword [ebp - 0x9f0]
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x404de2
push 0x671c3e
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
jle 0x404763
push 0x671c3e
lea eax, [ebp - 0x830]
mov dword [ebp - 0x9f8], 0
push 0x514
push eax
call fcn.0059a26a
lea eax, [ebp - 0x9f8]
push eax
lea eax, [ebp - 0x830]
push 0x671fd4
push eax
call fcn.0059668c
mov edx, eax
add esp, 0x18
test edx, edx
je 0x404763
nop dword [eax + eax]
push edx
push str.keep_file_token:__s
push edi
call fcn.00406510
mov ecx, edx
mov dword [ebp - 0x838], 0
add esp, 0xc
mov dword [ebp - 0x834], 0xf
mov byte [ebp - 0x848], 0
lea eax, [ecx + 1]
mov dword [ebp - 0x9f4], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x404695
sub ecx, dword [ebp - 0x9f4]
push ecx
push edx
lea ecx, [ebp - 0x848]
call fcn.0040a020
lea ecx, [ebp - 0x848]
mov byte [ebp - 4], 1
mov eax, dword [esi + 4]
push ecx
push eax
push esi
mov dword [ebp - 0x9f4], eax
call fcn.0040d4c0
mov edx, dword [ebp - 0x9fc]
mov ecx, 0x7fffffe
sub ecx, edx
cmp ecx, 1
jb 0x404e50
mov ecx, dword [ebp - 0x9f4]
inc edx
mov dword [ebp - 0x9fc], edx
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x834]
mov dword [esi + 4], eax
mov dword [ecx], eax
cmp edx, 0x10
jb 0x404730
mov ecx, dword [ebp - 0x848]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404726
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
lea eax, [ebp - 0x9f8]
push eax
push 0x671fd4
push 0
call fcn.0059668c
mov edx, eax
add esp, 0xc
test edx, edx
je 0x404757
mov esi, dword [ebp - 0xa00]
jmp 0x404660
mov eax, dword [ebp - 0xa00]
mov dword [ebp - 0x9f4], eax
mov esi, dword [ebp - 0x9f0]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404e0c
push esi
push str.Path__s_present
push edi
call fcn.00406510
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.0058db90
push 0x671ffc
push esi
lea eax, [ebp - 0x114]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x28
push esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x104
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0058db90
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x114]
push eax
push str.szFileMask_s
push edi
call fcn.00406510
lea eax, [ebp - 0x218]
push eax
push str.szCurrentDirectory_s
push edi
call fcn.00406510
add esp, 0x18
lea eax, [ebp - 0x9e8]
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov dword [ebp - 0xa08], eax
cmp eax, 0xffffffff
lea eax, [ebp - 0x114]
push eax
je 0x404d60
push str.szFileMask_s_got_hFileInDir
push edi
call fcn.00406510
add esp, 0xc
cmp byte [ebp - 0x9bc], 0x2e
je 0x404d34
cmp byte [0x68defc], 0
mov byte [ebp - 0x9e9], 0
je 0x404c35
cmp byte [0x68defb], 0
je 0x404c35
push str.LastScan.json
lea eax, [ebp - 0x9bc]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x404d34
lea ecx, [ebp - 0x9bc]
mov dword [ebp - 0x838], eax
mov dword [ebp - 0x834], 0xf
lea edx, [ecx + 1]
mov byte [ebp - 0x848], al
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4048a8
sub ecx, edx
lea eax, [ebp - 0x9bc]
push ecx
push eax
lea ecx, [ebp - 0x848]
call fcn.0040a020
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x850], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x84c], 0xf
mov byte [ebp - 0x860], 0
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4048f0
sub ecx, edx
lea eax, [ebp - 0x218]
push ecx
push eax
lea ecx, [ebp - 0x860]
call fcn.0040a020
mov byte [ebp - 4], 3
mov edx, dword [ebp - 0x84c]
mov eax, edx
mov ecx, dword [ebp - 0x850]
sub eax, ecx
push 1
push 0x671d44
cmp eax, 1
jb 0x40495c
cmp edx, 0x10
lea esi, [ebp - 0x860]
lea eax, [ecx + 1]
cmovae esi, dword [ebp - 0x860]
add esi, ecx
mov dword [ebp - 0x850], eax
push esi
call fcn.0058d610
add esp, 0xc
mov byte [esi + 1], 0
lea eax, [ebp - 0x860]
jmp 0x404976
mov byte [ebp - 0x9f8], 0
lea ecx, [ebp - 0x860]
push dword [ebp - 0x9f8]
push 1
call fcn.0040cab0
or dword [ebp - 0xa04], 1
mov dword [ebp - 0x880], 0
mov dword [ebp - 0x87c], 0
movups xmm0, xmmword [eax]
movups xmmword [ebp - 0x890], xmm0
movq xmm0, qword [eax + 0x10]
movq qword [ebp - 0x880], xmm0
mov dword [eax + 0x10], 0
mov dword [eax + 0x14], 0xf
mov byte [eax], 0
lea eax, [ebp - 0x848]
mov byte [ebp - 4], 4
push eax
lea edx, [ebp - 0x890]
lea ecx, [ebp - 0x8a8]
call fcn.0040c190
add esp, 4
mov byte [ebp - 4], 6
mov edx, dword [ebp - 0x87c]
cmp edx, 0x10
jb 0x404a16
mov ecx, dword [ebp - 0x890]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404a0c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
mov dword [ebp - 0x880], 0
mov dword [ebp - 0x87c], 0xf
mov byte [ebp - 0x890], 0
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x84c]
cmp edx, 0x10
jb 0x404a6f
mov ecx, dword [ebp - 0x860]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404a65
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
mov dword [ebp - 0x850], 0
mov dword [ebp - 0x84c], 0xf
mov byte [ebp - 0x860], 0
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0x834]
cmp edx, 0x10
jb 0x404ac8
mov ecx, dword [ebp - 0x848]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404abe
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
mov eax, dword [ebp - 0x9f4]
mov dword [ebp - 0x838], 0
mov dword [ebp - 0x834], 0xf
mov byte [ebp - 0x848], 0
mov esi, dword [eax]
cmp esi, eax
je 0x404be4
lea eax, [esi + 8]
push eax
lea ecx, [ebp - 0x878]
call fcn.00406fb0
cmp dword [ebp - 0x864], 0x10
lea ecx, [ebp - 0x878]
lea eax, [ebp - 0x8a8]
cmovae ecx, dword [ebp - 0x878]
cmp dword [ebp - 0x894], 0x10
push ecx
cmovae eax, dword [ebp - 0x8a8]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrIA]
test eax, eax
jne 0x404b80
mov edx, dword [ebp - 0x864]
cmp edx, 0x10
jb 0x404b70
mov ecx, dword [ebp - 0x878]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404b66
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
mov esi, dword [esi]
cmp esi, dword [ebp - 0x9f4]
jne 0x404af3
jmp 0x404be4
cmp dword [ebp - 0x864], 0x10
lea eax, [ebp - 0x878]
mov byte [ebp - 0x9e9], 1
cmovae eax, dword [ebp - 0x878]
push eax
push str._tsFileName_match_so_dont_delete:__s
push edi
call fcn.00406510
mov edx, dword [ebp - 0x864]
add esp, 0xc
cmp edx, 0x10
jb 0x404be4
mov ecx, dword [ebp - 0x878]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404bda
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
mov byte [ebp - 4], 0
mov edx, dword [ebp - 0x894]
cmp edx, 0x10
jb 0x404c22
mov ecx, dword [ebp - 0x8a8]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x404c18
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x404e4b
push edx
push ecx
call fcn.00575155
add esp, 8
cmp byte [ebp - 0x9e9], 0
jne 0x404d34
mov esi, dword [ebp - 0x9f0]
cmp dword [ebp - 0x9e8], 0x10
lea eax, [ebp - 0x9bc]
jne 0x404c7a
push eax
push esi
lea eax, [ebp - 0x31c]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x31c]
push eax
push str._tGo_into_Cleanup_path:__s
push edi
call fcn.00406510
add esp, 0x1c
mov ecx, edi
push eax
call fcn.004044e0
jmp 0x404d34
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x9bc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404d1f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404d11
push eax
lea eax, [ebp - 0x9bc]
push eax
push str._tDeleteFile_failed___take_ownership_and_try_again.___s__error:__lu_
push edi
call fcn.00406510
add esp, 0x10
push eax
call fcn.00406060
push 0x80
lea eax, [ebp - 0x9bc]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea eax, [ebp - 0x9bc]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x404d03
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x9bc]
push eax
push str._tDeleteFile_failed_again.___s__error:__lu_
push edi
call fcn.00406510
add esp, 0x10
jmp 0x404d34
lea eax, [ebp - 0x9bc]
push eax
push str._tDeleteFile_ok:___s_
jmp 0x404d2b
lea eax, [ebp - 0x9bc]
push eax
push str._tDeleteFile___file_no_longer_exists:__s
jmp 0x404d2b
lea eax, [ebp - 0x9bc]
push eax
push str._tDeleteFile_ok:__s
push edi
call fcn.00406510
add esp, 0xc
mov esi, dword [ebp - 0xa08]
lea eax, [ebp - 0x9e8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
je 0x404d57
mov esi, dword [ebp - 0x9f0]
jmp 0x404841
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x404d6e
push str.szFileMask_s_got_INVALID_HANDLE_VALUE
push edi
call fcn.00406510
add esp, 0xc
push 0x104
push 0
push edi
call fcn.0058db90
add esp, 0xc
push 0
push 0x23
push edi
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push dword [ebp - 0x9f0]
mov esi, 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push dword [ebp - 0x9f0]
cmp eax, 0xffffffff
je 0x404dfc
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x404de6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x9f0]
push eax
push str.RemoveComponentDirectory_encountered__lu_for_path:__s
push edi
call fcn.00406510
add esp, 0x10
cmp eax, 2
je 0x404e11
cmp eax, 5
je 0x404e11
cmp eax, 0x20
je 0x404e11
xor esi, esi
jmp 0x404e11
push dword [ebp - 0x9f0]
push str.RemoveComponentDirectory___removed__s
push edi
call fcn.00406510
add esp, 0xc
jmp 0x404e11
push str.RemoveComponentDirectory___directory_does_not_exist____s
push edi
call fcn.00406510
add esp, 0xc
jmp 0x404e11
mov esi, 1
lea ecx, [ebp - 0xa00]
call fcn.004066a0
push 0x20
push dword [ebp - 0xa00]
call fcn.00575155
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00574c7a
mov esp, ebp
pop ebp
ret 4
call fcn.0059b248
push str.list_T__too_long
call fcn.005733fa
int3