Function at 0x40fe10
Capabilities:
Set current directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x416cf0
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x184]
lea edi, [esi + 0x184]
mov ecx, dword [eax - 8]
test ecx, ecx
je 0x4101a7
mov eax, dword [esi + 0x19c]
test eax, eax
je 0x40fe56
mov ecx, esi
call fcn.0040ba90
lea ecx, [esp + 0x24]
push 4
mov ebp, 1
push ecx
mov ecx, edi
mov dword [esi + 0x1b0], ebp
call sub.MFC42.DLL_CString::Left
mov eax, dword [eax]
push 0x421008
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x24]
test eax, eax
sete bl
call fcn.00414af4
test bl, bl
je 0x40ff3a
mov edx, dword [edi]
mov ecx, edi
mov eax, dword [edx - 8]
add eax, 0xfffffffd
push eax
lea eax, [esp + 0x28]
push eax
call sub.MFC42.DLL_CString::Right
push eax
mov ecx, edi
mov dword [esp + 0x54], 0
call fcn.00414c50
lea ecx, [esp + 0x24]
mov dword [esp + 0x50], 0xffffffff
call fcn.00414af4
mov ecx, esi
call fcn.0040c3b0
test eax, eax
je 0x4101a7
mov ecx, dword [esi + 0x148]
push ebp
call fcn.004042f0
test eax, eax
je 0x40ff0e
push 0
push 0
push 0x420dc8
mov ecx, esi
call sub.MFC42.DLL_CWnd::MessageBoxA
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret
push edi
lea ecx, [esi + 0x188]
mov dword [esi + 0x14c], ebp
call fcn.00414c50
mov ecx, esi
call fcn.0040b9a0
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
add esp, 0x44
ret
lea ecx, [esi + 0x180]
push ecx
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString_1
lea ecx, [esp + 0x20]
mov dword [esp + 0x50], ebp
call sub.MFC42.DLL_CString::MakeUpper
push edi
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::CString_1
push 0x5c
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 2
call sub.MFC42.DLL_CString::ReverseFind
lea edx, [esp + 0x24]
push eax
push edx
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x54], 3
call fcn.00414c50
lea ecx, [esp + 0x24]
mov byte [esp + 0x50], 2
call fcn.00414af4
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CFileFind::CFileFind
push 0x421388
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 4
call sub.MFC42.DLL_CString::CString_2
mov ecx, dword [esi + 0x11c]
mov byte [esp + 0x50], 5
call fcn.00404bd0
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0
push 0x421004
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x4100d8
mov bl, 7
lea ecx, [esp + 0x2c]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [esp + 0x24]
mov ebp, eax
push ecx
lea ecx, [esp + 0x30]
call sub.MFC42.DLL_CFileFind::GetFilePath
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x54], 6
call fcn.00414c50
lea ecx, [esp + 0x24]
mov byte [esp + 0x50], 5
call fcn.00414af4
push 0x421388
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x2c]
push 0x10
lea ecx, [esp + 0x30]
mov byte [esp + 0x54], bl
call dword [edx + 0x40]
test eax, eax
jne 0x4100c2
push 0x2e
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::ReverseFind
mov ecx, dword [esp + 0x10]
lea edx, [esp + 0x28]
mov ecx, dword [ecx - 8]
sub ecx, eax
push ecx
push edx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::Right
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x54], 8
call fcn.00414c50
lea ecx, [esp + 0x28]
mov byte [esp + 0x50], bl
call fcn.00414af4
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::MakeUpper
mov eax, dword [esp + 0x18]
lea ecx, [esp + 0x20]
push eax
call sub.MFC42.DLL_CString::Find
test eax, eax
jl 0x4100c2
mov ecx, dword [esp + 0x10]
push ecx
mov ecx, dword [esi + 0x11c]
call fcn.00404ba0
mov edx, dword [esp + 0x10]
mov eax, dword [edi]
push edx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x18]
mov byte [esp + 0x50], 5
call fcn.00414af4
test ebp, ebp
jne 0x40ffee
push 0x2e
mov ecx, edi
call sub.MFC42.DLL_CString::ReverseFind
mov ecx, dword [edi]
lea edx, [esp + 0x1c]
mov ecx, dword [ecx - 8]
sub ecx, eax
dec ecx
push ecx
push edx
mov ecx, edi
call sub.MFC42.DLL_CString::Right
lea ecx, [esp + 0x1c]
mov byte [esp + 0x50], 9
call sub.MFC42.DLL_CString::MakeUpper
mov ecx, dword [esi + 0x11c]
push 3
call fcn.00404d80
mov ecx, dword [esi + 0x11c]
call fcn.00404ce0
mov eax, dword [esp + 0x1c]
push 0x421000
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
test eax, eax
je 0x410157
mov eax, dword [edi]
mov ecx, dword [esi + 0x11c]
push eax
call fcn.00404d60
mov eax, dword [edi]
mov ecx, esi
push eax
call fcn.0040f5a0
mov edi, dword [edi]
mov ecx, esi
push edi
call fcn.0040bd60
jmp 0x41015e
mov ecx, esi
call fcn.0040b9a0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x50], 5
call fcn.00414af4
lea ecx, [esp + 0x10]
mov byte [esp + 0x50], 4
call fcn.00414af4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x50], 2
call fcn.00414c02
lea ecx, [esp + 0x14]
mov byte [esp + 0x50], 1
call fcn.00414af4
lea ecx, [esp + 0x20]
mov dword [esp + 0x50], 0xffffffff
call fcn.00414af4
mov ecx, dword [esp + 0x48]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x44
ret