Function at 0x4020e0
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Get common file path
Get system information on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x587c8b
mov eax, dword fs:[0]
push eax
mov eax, 0x13d0
call fcn.00568600
mov eax, dword [0x5f3fcc]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call fcn.00430c57
mov ecx, eax
test ecx, ecx
je 0x4023ed
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x133c], eax
mov dword [ebp - 4], 0
lea edi, [ebp - 0x330]
mov ecx, 0x17
lea eax, [ebp - 0x2d2]
mov esi, str.devcon_status_IndirectDSPVirtualDisplayDriver
rep movsd dword es:[edi], dword [esi]
push 0x132
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.0056a3b0
add esp, 0xc
mov dword [ebp - 0x134c], 0xc
lea eax, [ebp - 0x134c]
mov dword [ebp - 0x1348], 0
mov dword [ebp - 0x1344], 1
push 0
push eax
lea eax, [ebp - 0x1334]
push eax
lea eax, [ebp - 0x1338]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
push 0x40
lea eax, [ebp - 0x13c8]
mov dword [ebp - 0x13cc], 0x44
push 0
push eax
call fcn.0056a3b0
mov eax, dword [ebp - 0x1334]
add esp, 0xc
mov dword [ebp - 0x138c], eax
mov dword [ebp - 0x1390], eax
xor eax, eax
mov word [ebp - 0x139c], ax
lea eax, [ebp - 0x1a0]
push eax
push 0xc8
mov dword [ebp - 0x13a0], 0x101
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov esi, dword [sym.imp.KERNEL32.dll_GetNativeSystemInfo]
lea eax, [ebp - 0x1370]
push eax
call esi
mov ax, word [ebp - 0x1370]
cmp ax, 9
je 0x40224a
cmp ax, 6
je 0x40224a
lea eax, [ebp - 0x1370]
push eax
call esi
mov ax, word [ebp - 0x1370]
cmp ax, 9
je 0x40223e
cmp ax, 6
je 0x40223e
cmp ax, 5
jne 0x40223e
push 0xc8
push str._tool_arm64devcon.exe
jmp 0x402254
push 0xc8
push str._toolx86devcon.exe
jmp 0x402254
push 0xc8
push str._toolx64devcon.exe
lea eax, [ebp - 0x1a0]
push eax
call fcn.0056d1f8
add esp, 0xc
lea eax, [ebp - 0x13dc]
push eax
lea eax, [ebp - 0x13cc]
push eax
push 0
push 0
push 0
push 1
push 0
push 0
lea eax, [ebp - 0x330]
push eax
lea eax, [ebp - 0x1a0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push dword [ebp - 0x1334]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x1000
lea eax, [ebp - 0x1330]
push 0
push eax
call fcn.0056a3b0
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
lea eax, [ebp - 0x1340]
add esp, 0xc
push 0
push eax
push 0xfff
lea eax, [ebp - 0x1330]
push eax
push dword [ebp - 0x1338]
call esi
test eax, eax
je 0x402313
nop word [eax + eax]
lea eax, [ebp - 0x1330]
push eax
lea ecx, [ebp - 0x133c]
call fcn.004030c0
push 0
lea eax, [ebp - 0x1340]
push eax
push 0xfff
lea eax, [ebp - 0x1330]
push eax
push dword [ebp - 0x1338]
call esi
test eax, eax
jne 0x4022e0
mov esi, dword [ebp - 0x133c]
push str.Driver_is_running
push esi
call fcn.005694c1
add esp, 8
test eax, eax
je 0x4023b3
lea eax, [ebp - 0x1a0]
mov dword [ebp - 0x1380], 0
xorps xmm0, xmm0
mov dword [ebp - 0x1378], eax
lea eax, [ebp - 0x1388]
mov dword [ebp - 0x1370], 0
push eax
movlpd qword [ebp - 0x1368], xmm0
movlpd qword [ebp - 0x1360], xmm0
movlpd qword [ebp - 0x1358], xmm0
mov dword [ebp - 0x1350], 0
mov dword [ebp - 0x1388], 0x3c
mov dword [ebp - 0x137c], 0x5cd5b8
mov dword [ebp - 0x1384], 0x8000
mov dword [ebp - 0x136c], 0
mov dword [ebp - 0x1374], str.disable_IndirectDSPVirtualDisplayDriver
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4023d2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00567879
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00401cd0
int3