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

Disassembly:
sub esp, 0x30c
mov al, byte [0x426040]
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 [0x426040]
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 [0x426040]
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 0x40f419
lea eax, [esp + 0xc]
push str.spnserv.dat
lea ecx, [esp + 0x218]
push eax
push 0x422574
push ecx
call fcn.00413de0
lea ecx, [esp + 0x120]
add esp, 0x10
push str.spnserv.dat
push 0x421680
push ecx
call fcn.00413de0
add esp, 0xc
cmp edi, 2
jne 0x40f457
lea eax, [esp + 0xc]
push str.spserv.dat
lea ecx, [esp + 0x218]
push eax
push 0x422574
push ecx
call fcn.00413de0
lea ecx, [esp + 0x120]
add esp, 0x10
push str.spserv.dat
push 0x421680
push ecx
call fcn.00413de0
add esp, 0xc
mov eax, dword [esp + 0x324]
mov esi, dword [esp + 0x31c]
cmp eax, 2
jne 0x40f544
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 0x40f51b
cmp eax, 0xffffffff
je 0x40f51b
lea edi, [esi + 8]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x40f4cc
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 0x40f572
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 0x40f52f
push str.Unable_to_service_standalone_clients._Please_restart_the_server_and_try_again._n
push 0
call fcn.004102d0
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 0x40f572
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 0x40f5ae
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