Function at 0x406af0
Capabilities:
Delete directory
Delete file
Get file attributes
Move file
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x41c1f1
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1a8
mov eax, dword [esp + 0x1b8]
mov dword [esp + 0x40], ecx
mov eax, dword [eax + 4]
test eax, eax
jne 0x406b22
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebx
push ebp
push esi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
and eax, 0x10
cmp al, 0x10
je 0x406cd3
mov esi, dword [esp + 0x1cc]
lea ecx, [esp + 0x14]
push esi
push ecx
call fcn.00401c10
push eax
mov dword [esp + 0x1cc], 0
call fcn.00401810
add esp, 0xc
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c0], 0xffffffff
push 1
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov eax, dword [esi + 4]
mov ebp, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
xor bl, bl
test eax, eax
je 0x406b86
mov ebp, eax
mov dl, byte [esp + 0x13]
push 0
lea ecx, [esp + 0x18]
mov byte [esp + 0x18], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push ebp
lea ecx, [esp + 0x1c]
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_char_const___unsigned_int_]
lea eax, [esp + 0x14]
mov dword [esp + 0x1c0], 1
push eax
call fcn.004017b0
add esp, 4
cmp eax, 1
lea ecx, [esp + 0x14]
mov dword [esp + 0x1c0], 0xffffffff
push 1
sete byte [esp + 0x17]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov al, byte [esp + 0x13]
test al, al
je 0x406c3a
mov eax, dword [esi + 4]
test eax, eax
jne 0x406bfd
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea ecx, [esp + 0xa0]
push ecx
push eax
call sub.MFC42.DLL_CFile::GetStatus
mov al, byte [esp + 0xb0]
mov bl, al
and al, 0xfe
mov byte [esp + 0xb0], al
mov eax, dword [esi + 4]
and bl, 1
test eax, eax
jne 0x406c2c
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0xa0]
push edx
push eax
call sub.MFC42.DLL_CFile::SetStatus
mov eax, dword [esi + 4]
test eax, eax
jne 0x406c46
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [esi + 4]
mov edx, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
test eax, eax
jne 0x406c5c
mov eax, edx
mov ecx, dword [esp + 0x1c8]
mov ecx, dword [ecx + 4]
test ecx, ecx
jne 0x406c6c
mov ecx, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
test bl, bl
je 0x406cc6
mov eax, dword [esi + 4]
test eax, eax
jne 0x406c8c
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0xa0]
push edx
push eax
call sub.MFC42.DLL_CFile::GetStatus
mov cl, byte [esp + 0xb0]
mov esi, dword [esi + 4]
or cl, 1
test esi, esi
mov byte [esp + 0xb0], cl
jne 0x406cb8
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea eax, [esp + 0xa0]
push eax
push esi
call sub.MFC42.DLL_CFile::SetStatus
xor eax, eax
cmp edi, 1
sete al
jmp 0x407024
mov cl, byte [esp + 0x13]
push 0
mov byte [esp + 0x18], cl
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, 0x4241cc
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x18]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x406d2d
mov edi, dword [esp + 0x18]
mov ecx, ebp
mov edx, ecx
mov esi, 0x4241cc
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x18]
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Eos_unsigned_int_]
mov ecx, dword [esp + 0x1c8]
lea eax, [esp + 0x14]
push 0x2f
push eax
lea edx, [esp + 0x98]
push ecx
push edx
mov dword [esp + 0x1d0], 2
call fcn.00402460
add esp, 0x10
push 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x1c4], 4
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x74]
call fcn.0041b29e
mov eax, dword [esp + 0x94]
xor ebx, ebx
cmp eax, ebx
mov byte [esp + 0x1c0], 5
jne 0x406d8e
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebx
push eax
lea ecx, [esp + 0x7c]
call sub.MFC42.DLL_CFileFind::FindFile
cmp eax, ebx
je 0x406fc7
lea ecx, [esp + 0x74]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [esp + 0x74]
mov dword [esp + 0x4c], eax
call sub.MFC42.DLL_CFileFind::IsDots
test eax, eax
jne 0x406fbd
lea eax, [esp + 0x44]
lea ecx, [esp + 0x74]
push eax
call sub.MFC42.DLL_CFileFind::GetFileName
mov cl, byte [esp + 0x13]
mov esi, dword [eax]
mov byte [esp + 0x34], cl
push ebx
lea ecx, [esp + 0x38]
mov byte [esp + 0x1c4], 6
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x38]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x406e29
mov edi, dword [esp + 0x38]
mov ecx, ebp
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [esp + 0x38]
mov dword [esp + 0x3c], ebp
mov byte [eax + ebp], 0
mov edx, dword [esp + 0x1c8]
lea ecx, [esp + 0x34]
push 0x2f
push ecx
lea eax, [esp + 0x6c]
push edx
push eax
mov byte [esp + 0x1d0], 7
call fcn.00402460
add esp, 0x10
push 1
lea ecx, [esp + 0x38]
mov byte [esp + 0x1c4], 0xa
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
lea ecx, [esp + 0x44]
mov byte [esp + 0x1c0], 9
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x48]
push ecx
lea ecx, [esp + 0x78]
call sub.MFC42.DLL_CFileFind::GetFileName
mov dl, byte [esp + 0x13]
mov esi, dword [eax]
push ebx
lea ecx, [esp + 0x28]
mov byte [esp + 0x1c4], 0xb
mov byte [esp + 0x28], dl
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
push 1
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov ebp, ecx
lea ecx, [esp + 0x28]
push ebp
call dword [sym.imp.MSVCP60.dll_private:_bool___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Grow_unsigned_int__bool_]
test al, al
je 0x406edc
mov edi, dword [esp + 0x28]
mov ecx, ebp
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x2c], ebp
mov byte [ecx + ebp], 0
mov eax, dword [esp + 0x1cc]
lea edx, [esp + 0x24]
push 0x2f
push edx
lea ecx, [esp + 0x5c]
push eax
push ecx
mov byte [esp + 0x1d0], 0xc
call fcn.00402460
add esp, 0x10
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x406f25
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x406f1c
cmp al, 0xff
je 0x406f1c
dec al
mov byte [ecx], al
jmp 0x406f25
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
lea ecx, [esp + 0x48]
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov byte [esp + 0x1c0], 0xe
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x50]
lea edx, [esp + 0x54]
lea eax, [esp + 0x64]
push edx
push eax
call fcn.00406af0
mov eax, dword [esp + 0x58]
cmp eax, ebx
je 0x406f7a
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x406f71
cmp al, 0xff
je 0x406f71
dec al
mov byte [ecx], al
jmp 0x406f7a
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov ecx, dword [esp + 0x68]
mov dword [esp + 0x58], ebx
cmp ecx, ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], ebx
mov byte [esp + 0x1c0], 5
je 0x406fb1
mov al, byte [ecx - 1]
dec ecx
test al, al
je 0x406fa8
cmp al, 0xff
je 0x406fa8
dec al
mov byte [ecx], al
jmp 0x406fb1
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], ebx
cmp dword [esp + 0x4c], ebx
jne 0x406da1
lea ecx, [esp + 0x74]
call sub.MFC42.DLL_CFileFind::Close
mov ecx, dword [esp + 0x1c8]
mov eax, dword [ecx + 4]
cmp eax, ebx
jne 0x406fe3
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea ecx, [esp + 0x74]
mov byte [esp + 0x1c0], 4
call sub.MFC42.DLL_CFileFind::CFileFind
mov ecx, dword [esp + 0x94]
cmp ecx, ebx
je 0x407022
mov al, byte [ecx - 1]
test al, al
je 0x407018
cmp al, 0xff
je 0x407018
dec al
mov byte [ecx - 1], al
jmp 0x407022
dec ecx
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 4
mov al, 1
mov ecx, dword [esp + 0x1b8]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x1b4
ret 8