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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x26a8
call fcn.004c0450
mov eax, dword [0x4f5568]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x24]
push esi
push edi
mov dword [ebp - 0x262c], ecx
push ecx
lea ecx, [ebp - 0x414]
mov dword [ebp - 0x2620], eax
call fcn.00421620
push 0x44
lea eax, [ebp - 0x26a4]
push 0
push eax
call fcn.004b67a0
mov eax, 5
mov dword [ebp - 0x269c], 0x4e1588
mov word [ebp - 0x2674], ax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x212]
push eax
mov dword [ebp - 0x26a4], 0x44
mov dword [ebp - 0x2630], 0
call fcn.004b67a0
add esp, 0x1c
mov dword [ebp - 0x2634], 0
lea eax, [ebp - 0x2588]
xor esi, esi
mov dword [ebp - 0x2628], eax
mov edi, 0x94
lea eax, [ebp - 0x61c]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4e15b0
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatW]
lea eax, [ebp - 0x61c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x2624], eax
test eax, eax
je 0x4217cc
push str.WinStationQueryInformationW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4217af
lea ecx, [ebp - 0x2640]
push ecx
push 0x208
lea ecx, [ebp - 0x214]
push ecx
push 0x21
push dword [ebp - 0x262c]
push esi
call eax
movzx eax, al
mov dword [ebp - 0x2630], eax
push dword [ebp - 0x2624]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [ebp - 0x2630], esi
je 0x4217cc
cmp word [ebp - 0x214], si
jne 0x4217f0
push dword [ebp - 0x262c]
lea eax, [ebp - 0x214]
push str..PipeTerminalServerSystemExecSrvr_d
push 0x104
push eax
call fcn.00421600
add esp, 0x10
jmp 0x4217f0
push 0
push 0
push 3
push 0
push 0
push 0xc0000000
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2630], eax
cmp eax, 0xffffffff
jne 0x42184d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xe7
jne 0x42183a
push 0x7530
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeW]
test eax, eax
jne 0x4217f0
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.004aca59
mov esp, ebp
pop ebp
ret
push 0x94
lea eax, [ebp - 0x261c]
push 0
push eax
call fcn.004b67a0
mov eax, dword [ebp + 0x20]
add esp, 0xc
mov dword [ebp - 0x25ec], esi
mov dword [ebp - 0x2614], 1
mov dword [ebp - 0x25e8], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x2618], eax
lea ecx, [ebp - 0x414]
mov eax, dword [ebp - 0x2620]
lea edx, [ecx + 2]
mov dword [ebp - 0x2610], eax
mov dword [ebp - 0x260c], esi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4218a3
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
lea ecx, [eax + 0x94]
mov dword [ebp - 0x2624], eax
mov dword [ebp - 0x2620], ecx
cmp ecx, 0x2000
jbe 0x4218dd
xor eax, eax
lea ecx, [ebp - 0x2588]
jmp 0x421911
push eax
lea eax, [ebp - 0x414]
push eax
lea eax, [ebp - 0x2588]
push eax
call fcn.004acbb0
mov edi, dword [ebp - 0x2620]
lea ecx, [ebp - 0x2588]
add esp, 0xc
mov eax, 0x94
add ecx, dword [ebp - 0x2624]
mov dword [ebp - 0x2628], ecx
movdqu xmm0, xmmword [ebp - 0x26a4]
mov dword [ebp - 0x2608], eax
mov eax, dword [ebp - 0x2664]
movdqu xmmword [ebp - 0x25dc], xmm0
mov dword [ebp - 0x259c], eax
lea eax, [edi + 0x22]
mov dword [ebp - 0x2624], edi
mov dword [ebp - 0x2620], eax
movdqu xmm0, xmmword [ebp - 0x2694]
movdqu xmmword [ebp - 0x25cc], xmm0
movdqu xmm0, xmmword [ebp - 0x2684]
movdqu xmmword [ebp - 0x25bc], xmm0
movdqu xmm0, xmmword [ebp - 0x2674]
movdqu xmmword [ebp - 0x25ac], xmm0
cmp eax, 0x2000
jbe 0x42197d
xor eax, eax
jmp 0x4219a0
push 0x22
push 0x4e1588
push ecx
call fcn.004acbb0
mov edi, dword [ebp - 0x2620]
add esp, 0xc
add dword [ebp - 0x2628], 0x22
mov eax, dword [ebp - 0x2624]
mov edx, dword [ebp - 0x25d0]
mov dword [ebp - 0x25d4], eax
mov dword [ebp - 0x262c], edi
test edx, edx
jne 0x4219c0
mov edx, dword [ebp - 0x2628]
xor eax, eax
jmp 0x421a34
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp - 0x2620], eax
jmp 0x4219d0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4219d0
sub ecx, dword [ebp - 0x2620]
sar ecx, 1
lea eax, [ecx*2 + 2]
lea ecx, [eax + edi]
mov dword [ebp - 0x2624], eax
mov dword [ebp - 0x2620], ecx
cmp ecx, 0x2000
jbe 0x421a0b
mov edx, dword [ebp - 0x2628]
xor eax, eax
jmp 0x421a34
push eax
mov eax, dword [ebp - 0x2628]
push edx
push eax
call fcn.004acbb0
mov edx, dword [ebp - 0x2628]
add esp, 0xc
mov edi, dword [ebp - 0x2620]
add edx, dword [ebp - 0x2624]
mov eax, dword [ebp - 0x262c]
mov dword [ebp - 0x25d0], eax
test ebx, ebx
je 0x421ad8
test dword [ebp + 0x20], 0x400
je 0x421a7a
cmp edi, 0x2000
ja 0x421aa3
mov eax, esi
shr eax, 1
cmp word [ebx + eax*2], 0
jne 0x421a66
cmp word [ebx + eax*2 + 2], 0
je 0x421a75
add esi, 2
lea eax, [edi + esi]
cmp eax, 0x2000
jbe 0x421a53
jmp 0x421aa3
add esi, 4
jmp 0x421aa3
cmp edi, 0x2000
ja 0x421aa3
mov ecx, ebx
mov eax, edi
sub ecx, edi
cmp byte [ecx + eax], 0
jne 0x421a95
cmp byte [ebx + esi + 1], 0
je 0x421aa0
inc eax
inc esi
cmp eax, 0x2000
jbe 0x421a88
jmp 0x421aa3
add esi, 2
lea eax, [edi + esi]
mov dword [ebp - 0x2620], eax
cmp eax, 0x2000
ja 0x421acc
push esi
push ebx
push edx
call fcn.004acbb0
mov dword [ebp - 0x25e4], edi
add esp, 0xc
mov edi, dword [ebp - 0x2620]
jmp 0x421ade
mov dword [ebp - 0x25e4], 0
jmp 0x421ade
mov dword [ebp - 0x25e4], esi
xor esi, esi
mov dword [ebp - 0x261c], edi
push esi
lea eax, [ebp - 0x2638]
push eax
push edi
mov edi, dword [ebp - 0x2630]
lea eax, [ebp - 0x261c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test eax, eax
je 0x421b74
push 0xfa
call ebx
push esi
lea eax, [ebp - 0x263c]
push eax
push 0x1c
lea eax, [ebp - 0x265c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x421b7a
push dword [ebp - 0x2648]
push esi
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
mov eax, dword [ebp - 0x2658]
mov dword [ebp - 0x2634], eax
test eax, eax
je 0x421b66
movdqu xmm0, xmmword [ebp - 0x2650]
movdqu xmmword [0x4f8fb8], xmm0
jmp 0x421b7a
push dword [ebp - 0x2654]
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x421b7a
mov dword [ebp - 0x2634], esi
cmp dword [0x4f8fb8], 0
jne 0x421b94
mov dword [0x4f8fb8], esi
test esi, esi
jne 0x421b94
push 0x1388
call ebx
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x2634]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004aca59
mov esp, ebp
pop ebp
ret