Function at 0x402840
Capabilities:
Create a process with modified i/o handles and window
Create pipe
Create process on windows
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42bc21
mov eax, dword fs:[0]
push eax
mov eax, 0x10c8
call fcn.0040aa20
mov eax, dword [0x43c018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
lea eax, [ebp - 0x1080]
mov dword [ebp - 0x1080], 0xc
push eax
lea eax, [ebp - 0x1060]
mov dword [ebp - 0x1078], 1
push eax
lea eax, [ebp - 0x105c]
mov dword [ebp - 0x107c], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x4028c9
mov edx, str.Failed_to_create_pipe.
call fcn.00404890
push eax
call fcn.00404b60
add esp, 4
jmp 0x402b5d
xor eax, eax
mov dword [ebp - 0x1040], 0
xorps xmm0, xmm0
mov word [ebp - 0x108a], ax
mov word [ebp - 0x1094], ax
lea ecx, [ebp - 0x1040]
mov eax, dword [ebp - 0x1060]
mov dword [ebp - 0x1088], eax
mov dword [ebp - 0x1084], eax
xor eax, eax
push 0x54
push str.wmic__namespace:_rootwmi_PATH_MSAcpi_ThermalZoneTemperature_get_CurrentTemperature
movlpd qword [ebp - 0x10c0], xmm0
movlpd qword [ebp - 0x10b8], xmm0
movlpd qword [ebp - 0x10b0], xmm0
movlpd qword [ebp - 0x10a8], xmm0
movlpd qword [ebp - 0x10a0], xmm0
movlpd qword [ebp - 0x1092], xmm0
mov dword [ebp - 0x10c4], 0x44
mov dword [ebp - 0x1098], 0x101
mov dword [ebp - 0x1030], 0
mov dword [ebp - 0x102c], 7
mov word [ebp - 0x1040], ax
call fcn.00404310
mov dword [ebp - 4], 0
mov eax, dword fs:[0x2c]
mov ecx, dword [eax]
mov eax, dword [0x43df88]
cmp eax, dword [ecx + 4]
jle 0x4029d2
push 0x43df88
call fcn.00409b68
add esp, 4
cmp dword [0x43df88], 0xffffffff
jne 0x4029d2
push 0x42c2b0
mov dword [0x43df8c], 0
mov dword [0x43df9c], 0
mov dword [0x43dfa0], 0xf
call fcn.0040a0a7
push 0x43df88
call fcn.00409b1e
add esp, 8
cmp dword [ebp - 0x102c], 8
lea eax, [ebp - 0x1040]
push 0
cmovae eax, dword [ebp - 0x1040]
push 0
push 0
push 0
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ecx, dword [0x43df9c]
mov ebx, eax
cmp ebx, ecx
ja 0x402a26
cmp dword [0x43dfa0], 0x10
mov ecx, 0x43df8c
mov dword [0x43df9c], ebx
cmovae ecx, dword [0x43df8c]
mov byte [ecx + ebx], 0
jmp 0x402a7c
mov edx, dword [0x43dfa0]
mov edi, ebx
mov eax, edx
sub edi, ecx
sub eax, ecx
cmp edi, eax
ja 0x402a61
cmp edx, 0x10
mov dword [0x43df9c], ebx
mov esi, 0x43df8c
cmovae esi, dword [0x43df8c]
push edi
add esi, ecx
push 0
push esi
call fcn.0040b660
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x402a7c
push 0
push edi
mov byte [ebp - 0x1064], 0
mov ecx, 0x43df8c
push dword [ebp - 0x1064]
push edi
call fcn.00404fd0
cmp dword [0x43dfa0], 0x10
lea eax, [ebp - 0x1040]
push 0
push 0
push ebx
mov ecx, 0x43df8c
cmovae ecx, dword [0x43df8c]
cmp dword [ebp - 0x102c], 8
push ecx
cmovae eax, dword [ebp - 0x1040]
push 0xffffffffffffffff
push eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp dword [0x43dfa0], 0x10
lea ecx, [ebp - 0x10d4]
push ecx
lea ecx, [ebp - 0x10c4]
mov eax, 0x43df8c
cmovae eax, dword [0x43df8c]
push ecx
push 0
push 0
push 0
push 1
push 0
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x402b81
mov edx, str.Failed_to_create_process.
call fcn.00404890
push eax
call fcn.00404b60
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 4
push dword [ebp - 0x105c]
call esi
push dword [ebp - 0x1060]
call esi
mov edx, dword [ebp - 0x102c]
cmp edx, 8
jb 0x402b5d
mov ecx, dword [ebp - 0x1040]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402b53
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403065
push edx
push ecx
call fcn.0040a0bc
add esp, 8
movsd xmm0, qword [0x439168]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00409a46
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x1060]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov dword [ebp - 0x1028], 0
mov dword [ebp - 0x1018], 0
mov dword [ebp - 0x1014], 7
mov word [ebp - 0x1028], ax
push eax
lea eax, [ebp - 0x1074]
mov byte [ebp - 4], 1
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
push eax
push 0xfff
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x105c]
call esi
test eax, eax
je 0x402cf9
mov eax, dword [ebp - 0x1074]
test eax, eax
je 0x402cf9
cmp eax, 0x1000
jae 0x40306a
lea edx, [ebp - 0x1010]
add eax, edx
push ecx
push eax
lea ecx, [ebp - 0x1058]
mov byte [eax], 0
mov eax, edx
push eax
call fcn.00404ba0
mov byte [ebp - 4], 2
mov ebx, eax
cmp dword [eax + 0x14], 8
jb 0x402c24
mov ebx, dword [eax]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp - 0x1014]
mov ecx, dword [ebp - 0x1018]
sub eax, ecx
cmp edx, eax
ja 0x402c75
cmp dword [ebp - 0x1014], 8
lea esi, [ebp - 0x1028]
lea eax, [edx + edx]
cmovae esi, dword [ebp - 0x1028]
lea edi, [ecx + edx]
push eax
push ebx
mov dword [ebp - 0x1018], edi
lea ecx, [esi + ecx*2]
push ecx
call fcn.0040b0d0
add esp, 0xc
xor eax, eax
mov word [esi + edi*2], ax
mov esi, dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x402c90
push edx
push ebx
mov byte [ebp - 0x1064], 0
lea ecx, [ebp - 0x1028]
push dword [ebp - 0x1064]
push edx
call fcn.00405290
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x1044]
cmp edx, 8
jb 0x402cd4
mov ecx, dword [ebp - 0x1058]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402cca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403088
push edx
push ecx
call fcn.0040a0bc
add esp, 8
push 0
lea eax, [ebp - 0x1074]
push eax
push 0xfff
lea eax, [ebp - 0x1010]
push eax
push dword [ebp - 0x105c]
call esi
test eax, eax
jne 0x402be2
push dword [ebp - 0x105c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x1014], 8
lea ecx, [ebp - 0x1028]
mov ebx, dword [ebp - 0x1028]
mov eax, dword [ebp - 0x1018]
cmovae ecx, ebx
mov dword [ebp - 0x106c], ecx
cmp eax, 0x12
jb 0x402d58
add eax, 0xffffffef
mov edx, ecx
lea eax, [ecx + eax*2]
mov dword [ebp - 0x1064], eax
nop word [eax + eax]
sub eax, edx
sar eax, 1
je 0x402d58
cmp word [edx], 0x43
je 0x402df2
add edx, 2
sub eax, 1
jne 0x402d46
mov eax, dword [ebp - 0x1014]
cmp eax, 8
jb 0x402d92
lea ecx, [eax*2 + 2]
mov eax, ebx
cmp ecx, 0x1000
jb 0x402d88
mov ebx, dword [ebx - 4]
add ecx, 0x23
sub eax, ebx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403065
push ecx
push ebx
call fcn.0040a0bc
add esp, 8
mov edx, dword [ebp - 0x102c]
xor eax, eax
mov dword [ebp - 0x1018], 0
mov dword [ebp - 0x1014], 7
mov word [ebp - 0x1028], ax
cmp edx, 8
jb 0x402b5d
mov ecx, dword [ebp - 0x1040]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402b53
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403065
jmp 0x402b53
mov ecx, str.CurrentTemperature
mov edi, edx
mov esi, 0x12
sub edi, ecx
mov ax, word [ecx + edi]
cmp ax, word [ecx]
jne 0x402ebb
add ecx, 2
sub esi, 1
jne 0x402e00
sub edx, dword [ebp - 0x106c]
sar edx, 1
cmp edx, 0xffffffff
je 0x402d58
push dword [ebp - 0x106c]
cmp dword [ebp - 0x1014], 8
lea ecx, [ebp - 0x1028]
mov edi, dword [ebp - 0x1018]
cmovae ecx, ebx
push 0xa
push ecx
push edx
mov edx, edi
call fcn.00404e80
mov esi, eax
add esp, 0x10
cmp esi, 0xffffffff
je 0x402d58
push dword [ebp - 0x106c]
cmp dword [ebp - 0x1014], 8
lea ecx, [ebp - 0x1028]
push 0xa
cmovae ecx, ebx
mov edx, edi
push ecx
push esi
call fcn.00404d30
mov ecx, eax
add esp, 0x10
cmp ecx, 0xffffffff
je 0x402d58
xor eax, eax
mov dword [ebp - 0x1058], 0
mov dword [ebp - 0x1048], 0
mov dword [ebp - 0x1044], 7
mov word [ebp - 0x1058], ax
cmp edi, esi
jb 0x40306f
jmp 0x402ec9
mov eax, dword [ebp - 0x1064]
add edx, 2
jmp 0x402d40
sub ecx, esi
lea eax, [ebp - 0x1028]
sub edi, esi
cmp edi, ecx
cmovb ecx, edi
cmp dword [ebp - 0x1014], 8
push ecx
cmovae eax, ebx
lea ecx, [ebp - 0x1058]
lea eax, [eax + esi*2]
push eax
call fcn.00404310
mov byte [ebp - 4], 3
call fcn.0040f5b9
cmp dword [ebp - 0x1044], 8
lea esi, [ebp - 0x1058]
mov edi, eax
lea eax, [ebp - 0x106c]
cmovae esi, dword [ebp - 0x1058]
push eax
push esi
mov dword [edi], 0
call fcn.0041327e
add esp, 8
fstp qword [ebp - 0x1068]
cmp esi, dword [ebp - 0x106c]
je 0x403074
cmp dword [edi], 0x22
je 0x40307e
movsd xmm0, qword [ebp - 0x1068]
subsd xmm0, qword [0x439160]
mov edx, dword [ebp - 0x1044]
divsd xmm0, qword [0x439150]
movsd qword [ebp - 0x1070], xmm0
cmp edx, 8
jb 0x402fa2
mov ecx, dword [ebp - 0x1058]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402f98
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403088
push edx
push ecx
call fcn.0040a0bc
add esp, 8
mov edx, dword [ebp - 0x1014]
xor eax, eax
mov dword [ebp - 0x1048], 0
mov dword [ebp - 0x1044], 7
mov word [ebp - 0x1058], ax
cmp edx, 8
jb 0x402fff
mov ecx, dword [ebp - 0x1028]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x402ff5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403088
push edx
push ecx
call fcn.0040a0bc
add esp, 8
mov edx, dword [ebp - 0x102c]
xor eax, eax
mov dword [ebp - 0x1018], 0
mov dword [ebp - 0x1014], 7
mov word [ebp - 0x1028], ax
cmp edx, 8
jb 0x403058
mov ecx, dword [ebp - 0x1040]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40304e
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x403088
push edx
push ecx
call fcn.0040a0bc
add esp, 8
movsd xmm0, qword [ebp - 0x1070]
jmp 0x402b65
call fcn.00413780
call fcn.00409d60
call fcn.00404590
push str.invalid_stod_argument
call fcn.00406afc
push str.stod_argument_out_of_range
call fcn.00406b3c
call fcn.00413780
int3