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

Disassembly:
sub esp, 0x30c
mov al, byte [0x423fa4]
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 [0x423fa4]
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 [0x423fa4]
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 0x404b49
lea eax, [esp + 0xc]
push str.spnserv.dat
lea ecx, [esp + 0x218]
push eax
push str._s_s
push ecx
call fcn.004134a5
lea ecx, [esp + 0x120]
add esp, 0x10
push str.spnserv.dat
push 0x4237f4
push ecx
call fcn.004134a5
add esp, 0xc
cmp edi, 2
jne 0x404b87
lea eax, [esp + 0xc]
push str.spserv.dat
lea ecx, [esp + 0x218]
push eax
push str._s_s
push ecx
call fcn.004134a5
lea ecx, [esp + 0x120]
add esp, 0x10
push str.spserv.dat
push 0x4237f4
push ecx
call fcn.004134a5
add esp, 0xc
mov eax, dword [esp + 0x324]
mov esi, dword [esp + 0x31c]
cmp eax, 2
jne 0x404c74
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 0x404c4b
cmp eax, 0xffffffff
je 0x404c4b
lea edi, [esi + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x404bfc
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 0x404ca2
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 0x404c5f
push str.Unable_to_service_standalone_clients._Please_restart_the_server_and_try_again._n
push 0
call fcn.00408b30
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 0x404ca2
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 0x404cde
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