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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413542
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.00405be0
test eax, eax
je 0x404d8a
push 0x4557d0
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 0x405016
lea ecx, [ebp + 0xc]
call fcn.00405a10
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x404dae
push 0
lea ecx, [ebp + 0xc]
call fcn.00405a10
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
lea ecx, [ebp + 8]
call fcn.00405a20
sub eax, 1
push eax
lea ecx, [ebp + 8]
call fcn.00405ba0
movsx eax, al
cmp eax, 0x5c
je 0x404dd4
push 0x5c
lea ecx, [ebp + 8]
call fcn.0041292e
lea ecx, [ebp + 0xc]
call fcn.00405a20
sub eax, 1
push eax
lea ecx, [ebp + 0xc]
call fcn.00405ba0
movsx ecx, al
cmp ecx, 0x5c
je 0x404dfa
push 0x5c
lea ecx, [ebp + 0xc]
call fcn.0041292e
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x30]
call fcn.004128d4
mov byte [ebp - 4], 2
push 0
push 0x4557ec
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.00405a10
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 0x404fde
lea ecx, [ebp - 0x30]
call sub.MFC42.DLL_CFileFind::FindNextFileA
mov dword [ebp - 0x14], eax
push 0x4557f0
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.00405c00
and eax, 0xff
test eax, eax
jne 0x404edf
push 0x4557f4
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.00405c00
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 0x404edf
mov dword [ebp - 0x78], 0
jmp 0x404ee6
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 0x404f0a
jmp 0x404e4e
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.00405a10
push eax
lea ecx, [ebp + 8]
call fcn.00405a10
push eax
lea ecx, [ebp - 0x38]
call sub.MFC42.DLL_CString::Replace
lea ecx, [ebp - 0x30]
call fcn.00405bc0
test eax, eax
je 0x404fa2
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.00404d27
add esp, 0xc
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x10], eax
jmp 0x404fc1
mov ecx, dword [ebp + 0x10]
push ecx
lea ecx, [ebp - 0x38]
call fcn.00405a10
push eax
lea ecx, [ebp - 0x34]
call fcn.00405a10
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 0x404e4e
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