Function at 0x404f39
Capabilities:
Check if file exists
Create directory
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43641f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x7c
mov dword [ebp - 4], 1
lea ecx, [ebp + 8]
call fcn.00406250
test eax, eax
je 0x404f9c
push 0x480904
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov dword [ebp - 0x3c], 0
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x3c]
jmp 0x405228
lea ecx, [ebp + 0xc]
call fcn.004190e0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404fc0
push 0
lea ecx, [ebp + 0xc]
call fcn.004190e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp + 8]
call fcn.004060b0
sub eax, 1
push eax
lea ecx, [ebp + 8]
call fcn.0042ea90
movsx eax, al
cmp eax, 0x5c
je 0x404fe6
push 0x5c
lea ecx, [ebp + 8]
call fcn.004354fe
lea ecx, [ebp + 0xc]
call fcn.004060b0
sub eax, 1
push eax
lea ecx, [ebp + 0xc]
call fcn.0042ea90
movsx ecx, al
cmp ecx, 0x5c
je 0x40500c
push 0x5c
lea ecx, [ebp + 0xc]
call fcn.004354fe
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x30]
call fcn.004354a4
mov byte [ebp - 4], 2
push 0
push 0x480920
lea edx, [ebp + 8]
push edx
lea eax, [ebp - 0x40]
push eax
call sub.MFC42.DLL_operator_2
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
mov dword [ebp - 0x64], ecx
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x64]
call fcn.004190e0
push eax
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::FindFile
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x40]
call sub.MFC42.DLL_CString::CString
cmp dword [ebp - 0x14], 0
je 0x4051f0
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov dword [ebp - 0x14], eax
push 0x480924
lea edx, [ebp - 0x48]
push edx
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::GetFileName
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x6c], eax
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x6c]
push ecx
call fcn.00406270
and eax, 0xff
test eax, eax
jne 0x4050f1
push 0x480928
lea edx, [ebp - 0x50]
push edx
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::GetFileName
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x74], eax
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x74]
push ecx
call fcn.00406270
mov byte [ebp - 0x4c], al
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x50]
call sub.MFC42.DLL_CString::CString
mov edx, dword [ebp - 0x4c]
and edx, 0xff
test edx, edx
jne 0x4050f1
mov dword [ebp - 0x78], 0
jmp 0x4050f8
mov dword [ebp - 0x78], 1
mov al, byte [ebp - 0x78]
mov byte [ebp - 0x44], al
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x48]
call sub.MFC42.DLL_CString::CString
mov ecx, dword [ebp - 0x44]
and ecx, 0xff
test ecx, ecx
je 0x40511c
jmp 0x405060
lea edx, [ebp - 0x34]
push edx
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::GetFilePath
mov byte [ebp - 4], 6
lea eax, [ebp - 0x34]
push eax
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::CString_1
mov byte [ebp - 4], 7
lea ecx, [ebp + 0xc]
call fcn.004190e0
push eax
lea ecx, [ebp + 8]
call fcn.004190e0
push eax
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::Replace
lea ecx, [ebp - 0x30]
call fcn.00406230
test eax, eax
je 0x4051b4
mov ecx, dword [ebp + 0x10]
push ecx
push ecx
mov ecx, esp
mov dword [ebp - 0x54], esp
lea edx, [ebp - 0x38]
push edx
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x80], eax
mov byte [ebp - 4], 8
push ecx
mov ecx, esp
mov dword [ebp - 0x58], esp
lea edx, [ebp - 0x34]
push edx
call sub.MFC42.DLL_CString::CString_1
mov dword [ebp - 0x84], eax
mov byte [ebp - 4], 7
call fcn.00404f39
add esp, 0xc
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x10], eax
jmp 0x4051d3
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x38]
call fcn.004190e0
push eax
lea ecx, [ebp - 0x34]
call fcn.004190e0
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov dword [ebp - 0x10], eax
mov byte [ebp - 4], 6
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::CString
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x34]
call sub.MFC42.DLL_CString::CString
jmp 0x405060
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::Close
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x5c], edx
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::CFileFind
mov byte [ebp - 4], 0
lea ecx, [ebp + 8]
call sub.MFC42.DLL_CString::CString
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call sub.MFC42.DLL_CString::CString
mov eax, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret