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

Disassembly:
mov eax, 0x481f90
call fcn.0047e070
sub esp, 0x4e0
mov ax, word [0x4b3360]
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 0x421d66
push str.WinStationQueryInformationW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x421d5f
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 0x421d5f
mov word [ebp - 0x2e4], si
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp word [ebp - 0x2e4], si
jne 0x421d87
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 0x421dd1
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x421dca
lea eax, [ebp - 0x2e4]
push 0x7530
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x421d87
xor eax, eax
jmp 0x421f29
push ebx
push 0x400
lea ecx, [ebp - 0x28]
call fcn.0042bbba
mov ebx, 0x94
lea ecx, [ebp - 0x28]
push ebx
push esi
mov dword [ebp - 4], esi
call fcn.0042bd21
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.00421c90
mov dword [ebp - 0xcc], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp + 0x18]
call fcn.00421c90
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.00421c90
mov dword [ebp - 0x94], eax
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x90]
call fcn.00421c90
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.0042c48e
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.0042c48e
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x421f0f
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 0x421f0f
mov ebx, dword [ebp - 0x44]
cmp ebx, esi
je 0x421f04
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 0x421f11
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x421f11
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.0042bc46
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret