Function at 0x4f03f0
Capabilities:
Get common file path
Get file size

Disassembly:
sub esp, 0x30c
mov al, byte [0x4e8ca0]
mov ecx, 0x40
push ebx
mov byte [esp + 4], al
push esi
push edi
xor eax, eax
lea edi, [esp + 0xd]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x4e8ca0]
lea edi, [esp + 0x215]
mov ecx, 0x40
mov byte [esp + 0x214], al
xor eax, eax
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x4e8ca0]
lea edi, [esp + 0x111]
mov ecx, 0x40
mov byte [esp + 0x110], al
xor eax, eax
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea ecx, [esp + 0xc]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0xc]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
mov edi, dword [esp + 0x328]
mov byte [esp + ecx + 0xa], 0
cmp edi, 1
jne 0x4f04bb
lea eax, [esp + 0xc]
push 0x4e8930
lea ecx, [esp + 0x218]
push eax
push 0x4e8c98
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
push ecx
call esi
lea ecx, [esp + 0x120]
add esp, 0x10
push 0x4e8930
push 0x4e8c94
push ecx
call esi
add esp, 0xc
jmp 0x4f04c1
mov esi, dword [sym.imp.MSVCRT.dll_sprintf]
cmp edi, 2
jne 0x4f04f9
lea eax, [esp + 0xc]
push 0x4e8b40
lea ecx, [esp + 0x218]
push eax
push 0x4e8c98
push ecx
call esi
lea ecx, [esp + 0x120]
add esp, 0x10
push 0x4e8b40
push 0x4e8c94
push ecx
call esi
add esp, 0xc
mov eax, dword [esp + 0x324]
mov esi, dword [esp + 0x31c]
cmp eax, 2
jne 0x4f05e6
mov ebx, dword [esp + 0x320]
push 0
push 2
push eax
lea eax, [esp + 0x220]
push ebx
push 3
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0xc], eax
test eax, eax
je 0x4f05bd
cmp eax, 0xffffffff
je 0x4f05bd
lea edi, [esi + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x4f056e
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
lea eax, [esp + 0x110]
mov dword [edi], 0
push eax
mov ecx, dword [esi + 0xc]
mov dword [esi + 4], 0x400
push 0x400
push 0
push 4
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0x10], eax
test eax, eax
jne 0x4f0614
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [esi + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
cmp edi, 1
jne 0x4f05d1
push 0x4e8c44
push 0
call fcn.004f8840
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
lea eax, [esp + 0x110]
push eax
push 0
push 6
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [esi + 0x10], eax
test eax, eax
jne 0x4f0614
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
push 0
mov eax, dword [esi + 0x10]
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi], eax
test eax, eax
jne 0x4f0650
mov eax, dword [esi + 0x10]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esi + 0xc]
push ecx
call edi
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x30c
ret
xor eax, eax
pop edi
pop esi
pop ebx
add esp, 0x30c
ret