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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x5bacf7
push eax
mov eax, 0x2024
mov dword fs:[0], esp
call fcn.004cf810
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 0x475d76
push str._Attachment_
lea ecx, [esp + 0x1c]
call fcn.004ce8ae
jmp 0x475d92
lea eax, [esi + 0x98]
push str._RelativeFile_
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
call fcn.004ce8ae
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x20]
call fcn.004a1540
mov eax, dword [esp + 0x2048]
mov byte [esp + 0x203c], 1
test eax, eax
jne 0x475fd3
mov ecx, dword [edi]
mov esi, 0x669668
test ecx, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
je 0x475dd0
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 0x669668
push ecx
mov byte [esp + 0x2044], 3
call ebx
add esp, 8
test eax, eax
jne 0x475e58
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 0x47615b
mov edi, dword [edi]
test edi, edi
je 0x47615b
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 0x669668
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x475ec4
mov eax, dword [esp + 0x14]
push 0x656a34
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x475ee7
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 0x47615b
mov edi, dword [edi]
test edi, edi
je 0x47615b
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 0x669668
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 0x47615b
mov edi, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push edi
mov ecx, esi
call dword [edx + 0x28]
jmp 0x47615b
mov esi, dword [esp + 0x2044]
push 0x659014
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 0x659014
mov ecx, esi
call dword [edx + 0x5c]
test byte [ebp + 0xc], 0x10
jne 0x475f5e
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.004a1560
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 0x475f1e
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 0x6595a0
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 0x47615b
mov edi, dword [edi]
test edi, edi
je 0x47615b
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 0x669668
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x475ec4
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.0040254a
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 0x47605e
lea eax, [esp + 0x10]
push eax
call fcn.0040254a
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x1034]
push ecx
push 0
push 0x669668
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.004ce8ae
mov eax, dword [esp + 0x24]
push 0x657844
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x47614a
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 0x476119
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 0x4760cd
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.004a1720
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 0x47608e
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.004812c0
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.004a1550
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