Function at 0x5f28d420
Capabilities:
Check if file exists
Create pipe
Create two anonymous pipes
Query environment variable
Read file via mapping
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5f28ed1e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
sub esp, 0x1b8
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x1c0], ecx
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
push 0x104
lea eax, [ebp - 0x158]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x5f28d4d4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x170], eax
push 0x5f28ee08
lea edx, [ebp - 0x170]
push edx
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x158]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp + eax - 0x158]
mov dword [ebp - 0x54], ecx
mov edx, dword [ebp - 0x54]
lea eax, [ebp - 0x158]
cmp edx, eax
jbe 0x5f28d524
mov ecx, dword [ebp - 0x54]
movsx edx, byte [ecx]
cmp edx, 0x5c
je 0x5f28d50e
mov eax, dword [ebp - 0x54]
movsx ecx, byte [eax]
cmp ecx, 0x3a
jne 0x5f28d519
mov edx, dword [ebp - 0x54]
add edx, 1
mov dword [ebp - 0x54], edx
jmp 0x5f28d524
mov eax, dword [ebp - 0x54]
sub eax, 1
mov dword [ebp - 0x54], eax
jmp 0x5f28d4eb
mov ecx, dword [ebp - 0x54]
movsx edx, byte [ecx]
test edx, edx
je 0x5f28d53d
mov eax, dword [ebp - 0x54]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
cmp eax, 0x20
jl 0x5f28d558
mov dword [ebp - 0x174], 0x80100005
push 0x5f28ee08
lea ecx, [ebp - 0x174]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp - 0x54]
push edx
push 0
push 4
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x5f28d5b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
push 2
call fcn.5f285ef0
cmp dword [ebp - 0x48], 2
jne 0x5f28d596
mov dword [ebp - 0x48], 0x8010001d
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x178], ecx
push 0x5f28ee08
lea edx, [ebp - 0x178]
push edx
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
push 0
push 4
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x5f28d5ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 2
call fcn.5f285ef0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x17c], edx
push 0x5f28ee08
lea eax, [ebp - 0x17c]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
push edx
push 0
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x5f28d64c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
push 2
call fcn.5f285ef0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x180], ecx
push 0x5f28ee08
lea edx, [ebp - 0x180]
push edx
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 4]
push edx
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5f28d6ae
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 2
call fcn.5f285ef0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x184], edx
push 0x5f28ee08
lea eax, [ebp - 0x184]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], 0
cmp dword [ebp - 0x28], 0
jne 0x5f28d6fc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov edx, dword [ebp - 0x48]
push edx
push 0
push 2
call fcn.5f285ef0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x188], eax
push 0x5f28ee08
lea ecx, [ebp - 0x188]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x20], 0
cmp dword [ebp - 0x28], 0
jne 0x5f28d74a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
push 2
call fcn.5f285ef0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x18c], ecx
push 0x5f28ee08
lea edx, [ebp - 0x18c]
push edx
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], 0
cmp dword [ebp - 0x28], 0
jne 0x5f28d798
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 2
call fcn.5f285ef0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x190], edx
push 0x5f28ee08
lea eax, [ebp - 0x190]
push eax
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
lea ecx, [ebp - 0x3c]
push ecx
lea edx, [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5f28d7e7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
push 2
call fcn.5f285ef0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x194], ecx
push 0x5f28ee08
lea edx, [ebp - 0x194]
push edx
call sub.MSVCRT.dll__CxxThrowException
push 0
push 0
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x38]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5f28d836
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov edx, dword [ebp - 0x48]
push edx
push 0
push 2
call fcn.5f285ef0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x198], eax
push 0x5f28ee08
lea ecx, [ebp - 0x198]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov dword [ebp - 0x16c], 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx]
mov dword [ebp - 0x168], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x164], eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x160], ecx
mov edx, dword [ebp - 0x3c]
mov dword [ebp - 0x15c], edx
push 0xc
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x19c], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x19c], 0
je 0x5f28d8a3
push 0
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
mov ecx, dword [ebp - 0x19c]
call fcn.5f28d290
mov dword [ebp - 0x1c4], eax
jmp 0x5f28d8ad
mov dword [ebp - 0x1c4], 0
mov edx, dword [ebp - 0x1c4]
mov dword [ebp - 0x1a0], edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x5f28d8fe
mov dword [ebp - 0x48], 0x80100006
push 0
push 0
mov ecx, dword [ebp - 0x48]
push ecx
push 0
push 2
call fcn.5f285ef0
mov edx, dword [ebp - 0x48]
mov dword [ebp - 0x1a4], edx
push 0x5f28ee08
lea eax, [ebp - 0x1a4]
push eax
call sub.MSVCRT.dll__CxxThrowException
mov dword [ebp - 0x2c], 0
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x14], ecx
push 0
lea edx, [ebp - 0x30]
push edx
push 0x14
lea eax, [ebp - 0x16c]
push eax
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x5f28d961
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov edx, dword [ebp - 0x48]
push edx
push 0
push 2
call fcn.5f285ef0
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0x1a8], eax
push 0x5f28ee08
lea ecx, [ebp - 0x1a8]
push ecx
call sub.MSVCRT.dll__CxxThrowException
push 8
lea edx, [ebp - 0x50]
push edx
mov ecx, dword [ebp - 0x1c]
call fcn.5f28d390
cmp dword [ebp - 0x50], 0
je 0x5f28d98f
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x1ac], eax
push 0x5f28ee08
lea ecx, [ebp - 0x1ac]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x4c]
cmp eax, dword [edx]
jbe 0x5f28d9b4
mov dword [ebp - 0x1b0], 0x80100013
push 0x5f28ee08
lea ecx, [ebp - 0x1b0]
push ecx
call sub.MSVCRT.dll__CxxThrowException
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x4c]
mov dword [edx], eax
mov dword [ebp - 0x3c], 0
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x38], ecx
mov edx, dword [ebp - 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x40], 0
cmp dword [ebp - 0x28], 0
jne 0x5f28da17
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x48], eax
push 0
push 0
mov eax, dword [ebp - 0x48]
push eax
push 0
push 2
call fcn.5f285ef0
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x1b4], ecx
push 0x5f28ee08
lea edx, [ebp - 0x1b4]
push edx
call sub.MSVCRT.dll__CxxThrowException
jmp 0x5f28db08
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8