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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x5b62b7
push eax
mov eax, 0x2024
mov dword fs:[0], esp
call fcn.004cad10
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 0x471276
push str._Attachment_
lea ecx, [esp + 0x1c]
call fcn.004c9dae
jmp 0x471292
lea eax, [esi + 0x98]
push str._RelativeFile_
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
call fcn.004c9dae
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x20]
call fcn.0049ca40
mov eax, dword [esp + 0x2048]
mov byte [esp + 0x203c], 1
test eax, eax
jne 0x4714d3
mov ecx, dword [edi]
mov esi, 0x664668
test ecx, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
je 0x4712d0
call fcn.004016ae
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 0x664668
push ecx
mov byte [esp + 0x2044], 3
call ebx
add esp, 8
test eax, eax
jne 0x471358
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 0x47165b
mov edi, dword [edi]
test edi, edi
je 0x47165b
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 0x664668
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x4713c4
mov eax, dword [esp + 0x14]
push 0x651a34
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x4713e7
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 0x47165b
mov edi, dword [edi]
test edi, edi
je 0x47165b
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 0x664668
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 0x47165b
mov edi, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push edi
mov ecx, esi
call dword [edx + 0x28]
jmp 0x47165b
mov esi, dword [esp + 0x2044]
push 0x654014
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 0x654014
mov ecx, esi
call dword [edx + 0x5c]
test byte [ebp + 0xc], 0x10
jne 0x47145e
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.0049ca60
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 0x47141e
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 0x6545a0
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 0x47165b
mov edi, dword [edi]
test edi, edi
je 0x47165b
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 0x664668
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x4713c4
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.00402545
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 0x47155e
lea eax, [esp + 0x10]
push eax
call fcn.00402545
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x1034]
push ecx
push 0
push 0x664668
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 fcn.004c9dae
mov eax, dword [esp + 0x24]
push 0x652844
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x47164a
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 0x471619
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 0x4715cd
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.0049cc20
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 0x47158e
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.0047c7c0
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.0049ca50
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