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

Disassembly:
push 0xffffffffffffffff
mov eax, dword fs:[0]
push 0x5b2d06
push eax
mov eax, 0x2060
mov dword fs:[0], esp
call fcn.004c77f0
mov eax, dword [esp + 0x2078]
push ebx
push ebp
xor ebp, ebp
push esi
push edi
test eax, eax
mov esi, ecx
mov dword [esp + 0x18], ebp
jne 0x46e1c2
lea eax, [esi + 0x98]
mov dword [esp + 0x18], eax
mov ebp, eax
mov eax, dword [esp + 0x2084]
test eax, eax
jne 0x46e34d
mov edi, dword [ebp]
mov ebx, 0x661668
test edi, edi
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebx
je 0x46e22a
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 ebx
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
setne bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x46e21b
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0x54]
push 0
mov ecx, edi
call sub.MFC42.DLL_CString::GetBuffer
mov ebx, eax
mov dword [esp + 0x20], ebx
push 0x64ea34
push ebx
mov dword [esp + 0x2080], 0
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x46e2b7
mov al, byte [ebx]
mov dword [esp + 0x2078], 0xffffffff
test al, al
je 0x46e47a
mov edi, dword [ebp]
test edi, edi
je 0x46e47a
mov eax, dword [edi + 4]
lea esi, [edi + 4]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call dword [eax + 0x18]
mov eax, dword [eax]
push 0x661668
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x46e47a
mov eax, dword [edi]
mov edx, dword [esi]
push 0
push 0x8010
push eax
mov ecx, esi
call dword [edx + 0x28]
jmp 0x46e47a
test byte [esi + 0xc], 0x10
jne 0x46e2f4
mov edi, dword [esp + 0x2080]
mov ebp, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 0x1000
lea ecx, [esp + 0x78]
push 1
push ecx
call ebp
mov edx, dword [edi]
add esp, 0x10
push 0
push eax
lea eax, [esp + 0x78]
push eax
push edi
call dword [edx + 0x10]
test byte [esi + 0xc], 0x10
je 0x46e2ca
mov ebp, dword [esp + 0x18]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
mov al, byte [ebx]
add esp, 4
test al, al
mov dword [esp + 0x2078], 0xffffffff
je 0x46e47a
mov edi, dword [ebp]
test edi, edi
je 0x46e47a
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 0x661668
push eax
call dword [sym.imp.MSVCRT.dll__mbscmp]
add esp, 8
lea ecx, [esp + 0x10]
test eax, eax
sete bl
jmp 0x46e294
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::CString_3
mov esi, dword [esi + 8]
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x207c], 1
call fcn.0040254a
mov eax, dword [eax]
add esp, 4
lea edx, [esp + 0x1070]
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 bl
call sub.MFC42.DLL_CString::CString
test bl, bl
je 0x46e3c3
lea eax, [esp + 0x24]
push eax
call fcn.0040254a
mov eax, dword [eax]
add esp, 4
lea ecx, [esp + 0x1070]
push ecx
push 0
push 0x661668
push eax
call esi
lea ecx, [esp + 0x24]
call sub.MFC42.DLL_CString::CString
lea edx, [esp + 0x1070]
lea ecx, [esp + 0x14]
push edx
call fcn.004c688e
mov eax, dword [esp + 0x14]
push 0x64f844
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x46e466
mov esi, dword [esp + 0x2080]
lea edx, [esp + 0x28]
push 1
push edx
mov ecx, dword [esi]
push esi
call dword [ecx + 0x30]
xor ebx, ebx
mov ecx, 0x400
xor eax, eax
lea edi, [esp + 0x70]
lea edx, [esp + 0x70]
rep stosd dword es:[edi], eax
mov eax, dword [esi]
lea ecx, [esp + 0x1c]
push ecx
push 0x1000
push edx
push esi
call dword [eax + 0xc]
mov eax, dword [esp + 0x1c]
push ebp
push eax
lea ecx, [esp + 0x78]
push 1
push ecx
call dword [sym.imp.MSVCRT.dll_fwrite]
mov edx, dword [esp + 0x40]
add esp, 0x10
inc ebx
shr edx, 0xc
cmp ebx, edx
jbe 0x46e403
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
lea ecx, [esp + 0x14]
push 0
call sub.MFC42.DLL_CString::GetBuffer
mov ecx, dword [esp + 0x18]
push eax
call fcn.004792a0
lea ecx, [esp + 0x14]
mov dword [esp + 0x2078], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x2070]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x206c
ret 0xc