Function at 0x406530
Capabilities:
Delete directory
Manipulate boot configuration

Disassembly:
push 0xffffffffffffffff
push 0x408598
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28
push ebx
push esi
mov eax, dword [esp + 0x40]
mov dword [esp + 0x38], 0
mov eax, dword [eax - 8]
cmp eax, 5
jge 0x406582
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
xor eax, eax
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x34
ret
test eax, eax
jne 0x4065ad
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, 1
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x34
ret
lea ecx, [esp + 0xc]
push 1
push ecx
lea ecx, [esp + 0x48]
call sub.MFC42.DLL_CString::Right
mov eax, dword [eax]
push 0x40bbd0
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0xc]
test eax, eax
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x4065eb
push 0x5c
lea ecx, [esp + 0x44]
call sub.MFC42.DLL_CString::operator_2
push 0x40d4ac
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x14]
mov byte [esp + 0x38], 1
call sub.MFC42.DLL_CFileFind::CFileFind
lea edx, [esp + 0x40]
push 0x40c8cc
lea eax, [esp + 0x10]
push edx
push eax
mov byte [esp + 0x44], 2
call sub.MFC42.DLL_operator
mov eax, dword [eax]
push 0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x40], 3
call sub.MFC42.DLL_CFileFind::FindFile
lea ecx, [esp + 0xc]
mov esi, eax
mov byte [esp + 0x38], 2
call sub.MFC42.DLL_CString::CString
test esi, esi
je 0x4067d4
mov bl, 4
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [esp + 0xc]
mov esi, eax
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CFileFind::GetFileName
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x3c], bl
call sub.MFC42.DLL_CString::operator_1
lea ecx, [esp + 0xc]
mov byte [esp + 0x38], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 8]
call sub.MFC42.DLL_CString::MakeLower
push str.boot.ini
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.io.sys
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.ntldr
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.msdos.sys
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.ntdetect.com
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.bootfont.bin
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.bootpart.exe
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.config.sys
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.bootsect.dos
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
push str.autoexec.bat
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::Find
test eax, eax
jge 0x4067d4
mov edx, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x18]
call dword [edx + 0x40]
test eax, eax
je 0x4067a2
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CFileFind::IsDots
test eax, eax
jne 0x4067a2
push ecx
lea ecx, [esp + 0x18]
mov eax, esp
mov dword [esp + 0x14], esp
push eax
call sub.MFC42.DLL_CFileFind::GetFilePath
call fcn.00406530
add esp, 4
test eax, eax
je 0x40682a
mov edx, dword [esp + 0x14]
push 0x10
lea ecx, [esp + 0x18]
call dword [edx + 0x40]
test eax, eax
jne 0x4067cc
push ecx
lea ecx, [esp + 0x18]
mov eax, esp
mov dword [esp + 0x14], esp
push eax
call sub.MFC42.DLL_CFileFind::GetFilePath
call fcn.00406870
add esp, 4
test esi, esi
jne 0x40664d
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CFileFind::Close
mov ecx, dword [esp + 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
lea ecx, [esp + 0x14]
mov esi, eax
mov byte [esp + 0x38], 1
call fcn.004078a8
lea ecx, [esp + 8]
mov byte [esp + 0x38], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov eax, esi
mov ecx, dword [esp + 0x30]
mov dword fs:[0], ecx
pop esi
pop ebx
add esp, 0x34
ret
lea ecx, [esp + 0x14]
mov byte [esp + 0x38], 1
call fcn.004078a8
lea ecx, [esp + 8]
mov byte [esp + 0x38], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x40]
mov dword [esp + 0x38], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x30]
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x34
ret