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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x8095c7
push eax
mov eax, 0x2024
mov dword fs:[0], esp
call fcn.0072bd20
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor edi, edi
lea ecx, [esp + 0x18]
mov dword [esp + 0x28], edi
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x204c]
mov dword [esp + 0x203c], edi
test eax, eax
je 0x6d2ed6
push str._Attachment_
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator_3
jmp 0x6d2ef2
lea eax, [esi + 0x98]
push str._RelativeFile_
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
call sub.MFC42.DLL_CString::operator_3
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x20]
call fcn.006fe140
mov eax, dword [esp + 0x2048]
mov byte [esp + 0x203c], 1
test eax, eax
jne 0x6d3133
mov ecx, dword [edi]
mov esi, 0x8bd670
test ecx, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
je 0x6d2f30
call fcn.004016d1
mov dword [esp + 0x30], eax
mov esi, eax
push esi
lea ecx, [esp + 0x18]
mov byte [esp + 0x2040], 2
call sub.MFC42.DLL_CString::CString_1
mov ecx, dword [esp + 0x14]
mov ebx, dword [sym.imp.MSVCRT.dll__mbscmp]
push 0x8bd670
push ecx
mov byte [esp + 0x2044], 3
call ebx
add esp, 8
test eax, eax
jne 0x6d2fb8
lea ecx, [esp + 0x14]
mov byte [esp + 0x203c], 2
call sub.MFC42.DLL_CString::CString
mov al, byte [esi]
mov byte [esp + 0x203c], 1
test al, al
je 0x6d32bb
mov edi, dword [edi]
test edi, edi
je 0x6d32bb
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 0x8bd670
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x6d3024
mov eax, dword [esp + 0x14]
push 0x8aaa14
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x6d3047
lea ecx, [esp + 0x14]
mov byte [esp + 0x203c], 2
call sub.MFC42.DLL_CString::CString
mov al, byte [esi]
mov byte [esp + 0x203c], 1
test al, al
je 0x6d32bb
mov edi, dword [edi]
test edi, edi
je 0x6d32bb
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 0x8bd670
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x6d32bb
mov edi, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push edi
mov ecx, esi
call dword [edx + 0x28]
jmp 0x6d32bb
mov esi, dword [esp + 0x2044]
push 0x8acff4
mov ecx, esi
mov eax, dword [esi]
call dword [eax + 0x5c]
mov eax, dword [esp + 0x18]
mov edx, dword [esi]
push eax
mov ecx, esi
call dword [edx + 0x5c]
mov edx, dword [esi]
push 0x8acff4
mov ecx, esi
call dword [edx + 0x5c]
test byte [ebp + 0xc], 0x10
jne 0x6d30be
mov ebx, dword [sym.imp.MSVCRT.dll_fread]
push ebp
push 0xfff
lea eax, [esp + 0x3c]
push 1
push eax
call ebx
add esp, 0x10
lea ecx, [esp + 0x34]
push eax
push ecx
lea ecx, [esp + 0x28]
call fcn.006fe160
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 0x6d307e
mov edi, dword [esp + 0x28]
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
mov eax, dword [esi]
add esp, 4
mov ecx, esi
push 0x8ad580
call dword [eax + 0x5c]
lea ecx, [esp + 0x14]
mov byte [esp + 0x203c], 2
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x30]
mov byte [esp + 0x203c], 1
cmp byte [ecx], 0
je 0x6d32bb
mov edi, dword [edi]
test edi, edi
je 0x6d32bb
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 0x8bd670
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x6d3024
mov ebx, dword [esp + 0x2044]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x14]
lea ecx, [esp + 0x24]
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 + 0x2040], 4
call fcn.004023ec
mov eax, dword [eax]
add esp, 4
lea edx, [esp + 0x1034]
push edx
push 0
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push eax
call esi
test eax, eax
lea ecx, [esp + 0x10]
sete byte [esp + 0x1f]
call sub.MFC42.DLL_CString::CString
mov al, byte [esp + 0x1f]
test al, al
je 0x6d31be
lea eax, [esp + 0x10]
push eax
call fcn.004023ec
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x1034]
push ecx
push 0
push 0x8bd670
push eax
call esi
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x1034]
lea ecx, [esp + 0x24]
push edx
call sub.MFC42.DLL_CString::operator_3
mov eax, dword [esp + 0x24]
push 0x8ab824
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x6d32aa
mov edx, dword [ebx]
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x34]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x34]
push 0xffc
push eax
mov ecx, ebx
call dword [edx + 0x3c]
test eax, eax
je 0x6d3279
lea ecx, [esp + 0x34]
push str._r_n__t
push ecx
call dword [sym.imp.MSVCRT.dll_strpbrk]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x6d322d
mov byte [ebp], 0
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + 0x34]
mov dword [esp + 0x10], ecx
push edx
push eax
lea ecx, [esp + 0x28]
call fcn.006fe320
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
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 0x6d31ee
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x24]
push 0
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 0x28]
push eax
call fcn.006de000
mov eax, dword [esp + 0x2c]
mov edx, dword [ebx]
push 0
push eax
mov ecx, ebx
call dword [edx + 0x30]
lea ecx, [esp + 0x24]
mov byte [esp + 0x203c], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x203c], 0
call fcn.006fe150
lea ecx, [esp + 0x18]
mov dword [esp + 0x203c], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x2034]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2030
ret 0xc