Function at 0x423f50
Capabilities:
Get common file path
Read file on windows
Write file on windows

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x4e3c01
push eax
mov eax, 0x2020
mov dword fs:[0], esp
call fcn.00415b80
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x24], ebp
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x2048]
mov dword [esp + 0x2038], ebp
cmp eax, ebp
je 0x423f9d
push str._Attachment_
jmp 0x423fac
lea eax, [esi + 0x98]
push str._RelativeFile_
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
lea ecx, [esp + 0x1c]
call fcn.0043a460
mov eax, dword [esp + 0x2044]
mov byte [esp + 0x2038], 1
cmp eax, ebp
jne 0x42415b
mov ecx, dword [esp + 0x24]
mov edi, dword [ecx]
cmp edi, ebp
je 0x4242e1
mov edx, dword [edi + 4]
lea esi, [edi + 4]
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call dword [edx + 0x18]
mov eax, dword [eax]
push 0x556570
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
setne bl
call fcn.00415612
test bl, bl
je 0x42401d
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x54]
push ebp
mov ecx, edi
call sub.MFC42.DLL_CString::GetBuffer
push 0x53624c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x424077
mov eax, dword [esp + 0x24]
mov edi, dword [eax]
test edi, edi
je 0x4242e1
mov edx, dword [edi + 4]
lea esi, [edi + 4]
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call dword [edx + 0x18]
mov eax, dword [eax]
push 0x556570
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x424138
mov esi, dword [esp + 0x2040]
push 0x5361b4
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0x5c]
mov eax, dword [esp + 0x14]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x5c]
mov edx, dword [esi]
push 0x5361b4
mov ecx, esi
call dword [edx + 0x5c]
test byte [ebp + 0xc], 0x10
jne 0x4240ea
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 0xfff
lea eax, [esp + 0x38]
push 1
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x30]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.0043a480
mov edx, dword [esi]
mov edi, eax
push edi
mov ecx, esi
call dword [edx + 0x5c]
push edi
call dword [sym.imp.MSVCRT.dll_free]
mov al, byte [ebp + 0xc]
add esp, 4
test al, 0x10
je 0x4240ae
mov eax, dword [esi]
push 0x536240
mov ecx, esi
call dword [eax + 0x5c]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov ecx, dword [esp + 0x28]
add esp, 4
mov edi, dword [ecx]
test edi, edi
je 0x4242e1
mov edx, dword [edi + 4]
lea esi, [edi + 4]
lea eax, [esp + 0x10]
mov ecx, esi
push eax
call dword [edx + 0x18]
mov eax, dword [eax]
push 0x556570
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call fcn.00415612
test bl, bl
je 0x4242e1
mov edi, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push edi
mov ecx, esi
call dword [edx + 0x28]
jmp 0x4242e1
mov ebx, dword [esp + 0x2040]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x14]
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], eax
call sub.MFC42.DLL_CString::CString_3
mov esi, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
mov byte [esp + 0x203c], 2
call fcn.004085b0
mov eax, dword [eax]
add esp, 4
lea edx, [esp + 0x1030]
push edx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push eax
call esi
test eax, eax
lea ecx, [esp + 0x10]
sete byte [esp + 0x1b]
call fcn.00415612
mov al, byte [esp + 0x1b]
test al, al
je 0x4241e4
lea eax, [esp + 0x10]
push eax
call fcn.004085b0
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x1030]
push ecx
push ebp
push 0x556570
push eax
call esi
lea ecx, [esp + 0x10]
call fcn.00415612
lea edx, [esp + 0x1030]
lea ecx, [esp + 0x20]
push edx
call sub.MFC42.DLL_CString::operator
mov eax, dword [esp + 0x20]
push 0x53623c
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
cmp eax, ebp
mov dword [esp + 0x10], eax
je 0x4242d0
mov edx, dword [ebx]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
push 0xffc
push eax
mov ecx, ebx
call dword [edx + 0x3c]
test eax, eax
je 0x42429f
lea ecx, [esp + 0x30]
push str._r_n__t
push ecx
call dword [sym.imp.MSVCRT.dll_strpbrk]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x424253
mov byte [ebp], 0
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x28]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x30]
mov dword [esp + 0x28], ecx
push edx
push eax
lea ecx, [esp + 0x24]
call fcn.0043a640
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x28]
push ecx
mov esi, eax
push edx
push 1
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_free]
add esp, 0x14
test ebp, ebp
je 0x424214
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x20]
push 0
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 0x24]
push eax
call fcn.0041d8b0
mov eax, dword [esp + 0x2c]
mov edx, dword [ebx]
push 0
push eax
mov ecx, ebx
call dword [edx + 0x30]
lea ecx, [esp + 0x20]
mov byte [esp + 0x2038], 1
call fcn.00415612
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2038], 0
call fcn.0043a470
lea ecx, [esp + 0x14]
mov dword [esp + 0x2038], 0xffffffff
call fcn.00415612
mov ecx, dword [esp + 0x2030]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x202c
ret 0xc