Function at 0x40f2f0
Capabilities:
Get common file path
Query environment variable
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4393d3
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x448050]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 4], 0
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x40f34a
mov ecx, dword [edi + 0xc]
cmp dword [ecx - 0xc], 0
je 0x40f34a
mov edx, dword [edi + 0x10]
cmp dword [edx - 0xc], 0
je 0x40f34a
mov eax, dword [edi + 0x14]
cmp dword [eax - 0xc], 0
jne 0x40f36a
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp + 0x1c], 0x10
jb 0x40f363
mov ecx, dword [ebp + 8]
push ecx
call fcn.00424756
add esp, 4
xor eax, eax
jmp 0x40f565
cmp byte [edi + 0x20], 0
je 0x40f3e9
lea edx, [ebp - 0x218]
push edx
push 1
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jns 0x40f3d5
mov ebx, dword [sym.imp.KERNEL32.DLL_GetEnvironmentVariableW]
push 0x104
lea eax, [ebp - 0x218]
push eax
push str.USERPROFILE
call ebx
mov esi, eax
test esi, esi
je 0x40f3bc
push str.Application_Data
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x40f3d1
push 0x104
lea edx, [ebp - 0x218]
push edx
push str.ProgramFiles
call ebx
mov esi, eax
test esi, esi
je 0x40f3f4
push str.PPLiveWebGameClient
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
jmp 0x40f3f4
lea esi, [ebp - 0x218]
call fcn.00408e10
mov edi, dword [edi]
push edi
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push str._idata.inmk
lea edx, [ebp - 0x218]
push 0x104
push edx
call fcn.00426bfd
add esp, 0xc
push 0
push 0
push 2
push 0
push 3
push 0x10000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov esi, eax
test esi, esi
je 0x40f34a
lea edx, [ebp + 8]
push edx
or ecx, 0xffffffff
xor ebx, ebx
lea edi, [ebp - 0x234]
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], 0
mov byte [ebp - 0x234], 0
call fcn.0040ae60
cmp dword [ebp - 0x220], 0x10
mov eax, dword [ebp - 0x224]
mov ecx, dword [ebp - 0x234]
mov edi, eax
jae 0x40f48f
lea ecx, [ebp - 0x234]
xor ebx, ebx
push ebx
lea edx, [ebp - 0x238]
push edx
push eax
push ecx
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
cmp dword [ebp - 0x238], edi
je 0x40f506
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov esi, 0x10
mov byte [ebp - 4], bl
cmp dword [ebp - 0x220], esi
jb 0x40f4d0
mov eax, dword [ebp - 0x234]
push eax
call fcn.00424756
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
cmp dword [ebp + 0x1c], esi
jb 0x40f363
mov ecx, dword [ebp + 8]
push ecx
call fcn.00424756
add esp, 4
xor eax, eax
jmp 0x40f565
call dword [sym.imp.KERNEL32.DLL_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov esi, 0x10
mov byte [ebp - 4], bl
cmp dword [ebp - 0x220], esi
jb 0x40f532
mov edx, dword [ebp - 0x234]
push edx
call fcn.00424756
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x220], 0xf
mov dword [ebp - 0x224], ebx
mov byte [ebp - 0x234], bl
cmp dword [ebp + 0x1c], esi
jb 0x40f560
mov eax, dword [ebp + 8]
push eax
call fcn.00424756
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00424761
mov esp, ebp
pop ebp
ret 0x1c