Function at 0x407690
Capabilities:
Check if file exists
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Get file attributes

Disassembly:
push 0xffffffffffffffff
push 0x4ba344
mov eax, dword fs:[0]
push eax
sub esp, 0x278
mov eax, dword [0x4ce028]
xor eax, esp
mov dword [esp + 0x270], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ce028]
xor eax, esp
push eax
lea eax, [esp + 0x28c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x29c]
mov edi, dword [esp + 0x2a4]
mov ebp, dword [esp + 0x2a8]
push eax
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x407931
test al, 0x10
je 0x407931
test edi, edi
je 0x407713
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov dword [esp + 0x2c], 2
test eax, eax
jne 0x40771b
mov dword [esp + 0x2c], 1
push 0
push ebp
mov byte [esp + 0x23], 1
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete bl
xor esi, esi
mov dword [esp + 0x28], esi
test bl, bl
je 0x407744
xor eax, eax
jmp 0x407933
mov esi, dword [esp + 0x28]
cmp esi, dword [esp + 0x2c]
jge 0x407918
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x20]
call dword [0x4bd7a0]
push edi
lea ecx, [esp + 0x28]
mov dword [esp + 0x298], 0
call dword [0x4bd7a0]
mov byte [esp + 0x294], 1
mov ecx, dword [esp + 0x24]
cmp dword [ecx - 0xc], 0
je 0x40778a
cmp esi, 1
jne 0x407799
push 0x4bf538
lea ecx, [esp + 0x28]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator]
lea ecx, [esp + 0x1c]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::TrimRight]
mov edx, dword [esp + 0x1c]
mov esi, dword [edx - 0xc]
push 0x5c
lea ecx, [esp + 0x20]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::ReverseFind]
dec esi
cmp eax, esi
je 0x4077c7
push 0x5c
lea ecx, [esp + 0x20]
call dword [0x4bd4cc]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x20]
call dword [0x4bd4c4]
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x34]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4078e9
mov ebx, dword [esp + 0x2ac]
test ebx, ebx
je 0x407801
call fcn.004075a0
cmp word [esp + 0x60], 0x2e
je 0x4078b6
mov eax, dword [esp + 0x30]
push eax
lea ecx, [esp + 0x24]
call dword [0x4bd7a0]
push 0x4be568
lea ecx, [esp + 0x24]
mov byte [esp + 0x298], 2
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
lea ecx, [esp + 0x60]
push ecx
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::operator_3]
test byte [esp + 0x34], 0x10
je 0x407891
mov eax, 1
cmp dword [esp + 0x28], eax
je 0x40785a
cmp dword [esp + 0x2c], eax
jne 0x4078a4
push ebx
push ebp
push edi
push eax
lea ecx, [esp + 0x30]
call dword [sym.imp.mfc90u.dll_ATL::CSimpleStringT_wchar_t_1_::GetBuffer]
push eax
call fcn.00407690
add esp, 0x14
test al, al
je 0x4078a4
test edi, edi
je 0x407884
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4078a4
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
jmp 0x40789c
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp eax, 1
sete byte [esp + 0x1b]
lea ecx, [esp + 0x20]
mov byte [esp + 0x294], 1
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
sete bl
test bl, bl
jne 0x4078e2
cmp byte [esp + 0x1b], bl
je 0x4078e2
lea ecx, [esp + 0x34]
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x4077f1
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea ecx, [esp + 0x24]
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x294], 0xffffffff
call dword [sym.imp.mfc90u.dll_ATL::CStringT_wchar_t_class_StrTraitMFC_DLL_wchar_t_class_ATL::ChTraitsCRT_wchar_t_____::CStringT_wchar_t_clas]
inc dword [esp + 0x28]
test bl, bl
je 0x407740
xor eax, eax
jmp 0x407933
test bl, bl
jne 0x407738
cmp byte [esp + 0x1b], bl
je 0x407738
mov eax, 1
jmp 0x407933
xor al, al
mov ecx, dword [esp + 0x28c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x270]
xor ecx, esp
call fcn.0042bebe
add esp, 0x284
ret