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

Disassembly:
mov eax, 0x47f918
call fcn.0047bf90
sub esp, 0x4e0
mov ax, word [0x4ae4d8]
push esi
push edi
mov word [ebp - 0x2e4], ax
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x2e2]
push 0x104
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x4ec]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x4ec]
push str.winsta.dll
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x4ec]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
xor esi, esi
cmp edi, esi
je 0x41fbca
push str.WinStationQueryInformationW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x41fbc3
lea ecx, [ebp - 0x2c]
push ecx
lea ecx, [ebp - 0x2e4]
push 0x208
push ecx
push 0x21
push dword [ebp + 8]
push esi
call eax
test al, al
jne 0x41fbc3
mov word [ebp - 0x2e4], si
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp word [ebp - 0x2e4], si
jne 0x41fbeb
push dword [ebp + 8]
lea eax, [ebp - 0x2e4]
push str..PipeTerminalServerSystemExecSrvr_d
push eax
call dword [sym.imp.MSVCRT.dll_swprintf]
add esp, 0xc
push esi
push esi
push 3
push esi
push esi
lea eax, [ebp - 0x2e4]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
jne 0x41fc35
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x41fc2e
lea eax, [ebp - 0x2e4]
push 0x7530
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x41fbeb
xor eax, eax
jmp 0x41fd8d
push ebx
push 0x400
lea ecx, [ebp - 0x28]
call fcn.00428ef2
mov ebx, 0x94
lea ecx, [ebp - 0x28]
push ebx
push esi
mov dword [ebp - 4], esi
call fcn.00429058
push ebx
lea eax, [ebp - 0xdc]
push esi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [ebp + 0x24]
add esp, 0xc
mov dword [ebp - 0xac], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0xa8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0xd0], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0x14]
call fcn.0041faf4
mov dword [ebp - 0xcc], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0x18]
call fcn.0041faf4
mov esi, dword [ebp + 0x34]
push 0x11
mov dword [ebp - 0xc8], eax
pop ecx
lea eax, [ebp - 0x28]
lea edi, [ebp - 0x9c]
push eax
rep movsd dword es:[edi], dword [esi]
push dword [ebp - 0x94]
call fcn.0041faf4
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x90]
call fcn.0041faf4
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x1c]
add esp, 0x20
mov dword [ebp - 0xdc], eax
lea eax, [ebp - 0xdc]
xor esi, esi
push ebx
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0xa4], esi
call fcn.00429f6b
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 0x10]
lea ecx, [ebp - 0x28]
push esi
push eax
push dword [ebp - 0x1c]
call fcn.00429f6b
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x41fd73
lea eax, [ebp - 0x10]
push esi
push eax
lea eax, [ebp - 0x48]
push 0x1c
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41fd73
mov ebx, dword [ebp - 0x44]
cmp ebx, esi
je 0x41fd68
mov edi, dword [ebp + 0x38]
lea esi, [ebp - 0x3c]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
jmp 0x41fd75
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x41fd75
xor ebx, ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x28]
call fcn.00428f7e
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret