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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x5a9677
push eax
mov eax, 0x2024
mov dword fs:[0], esp
call fcn.004be180
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 0x4646e6
push str._Attachment_
lea ecx, [esp + 0x1c]
call fcn.004bd21e
jmp 0x464702
lea eax, [esi + 0x98]
push str._RelativeFile_
lea ecx, [esp + 0x1c]
mov dword [esp + 0x2c], eax
call fcn.004bd21e
mov edi, dword [esp + 0x28]
lea ecx, [esp + 0x20]
call fcn.0048feb0
mov eax, dword [esp + 0x2048]
mov byte [esp + 0x203c], 1
test eax, eax
jne 0x464943
mov ecx, dword [edi]
mov esi, 0x658680
test ecx, ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
je 0x464740
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 0x658680
push ecx
mov byte [esp + 0x2044], 3
call ebx
add esp, 8
test eax, eax
jne 0x4647c8
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 0x464acb
mov edi, dword [edi]
test edi, edi
je 0x464acb
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 0x658680
push eax
call ebx
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x464834
mov eax, dword [esp + 0x14]
push 0x645a34
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x464857
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 0x464acb
mov edi, dword [edi]
test edi, edi
je 0x464acb
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 0x658680
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 0x464acb
mov edi, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push edi
mov ecx, esi
call dword [edx + 0x28]
jmp 0x464acb
mov esi, dword [esp + 0x2044]
push 0x648014
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 0x648014
mov ecx, esi
call dword [edx + 0x5c]
test byte [ebp + 0xc], 0x10
jne 0x4648ce
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.0048fed0
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 0x46488e
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 0x6485a0
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 0x464acb
mov edi, dword [edi]
test edi, edi
je 0x464acb
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 0x658680
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x464834
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 0x4649ce
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 0x658680
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.004bd21e
mov eax, dword [esp + 0x24]
push 0x646844
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov dword [esp + 0x14], eax
test eax, eax
je 0x464aba
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 0x464a89
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 0x464a3d
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.00490090
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 0x4649fe
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.0046fc30
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.0048fec0
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