Function at 0x46c200
Capabilities:
Create pipe
Create process on windows
Read file on windows
Read pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6a4b6d
mov eax, dword fs:[0]
push eax
sub esp, 0x8a0
mov eax, dword [0x7e2670]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8a8], ecx
mov eax, dword [ebp + 8]
push eax
push 0x6f2a88
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov ecx, dword [ebp + 0xc]
mov dword [ecx], 0xffffffff
mov dword [ebp - 0x844], 0xc
mov dword [ebp - 0x840], 0
mov dword [ebp - 0x83c], 1
push 0
lea edx, [ebp - 0x844]
push edx
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x46c29c
xor al, al
jmp 0x46c652
push 0x44
push 0
lea edx, [ebp - 0x894]
push edx
call fcn.006665c0
add esp, 0xc
push 0
push 1
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
mov dword [ebp - 0x894], 0x44
lea ecx, [ebp - 0x894]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x854], edx
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x858], eax
mov dword [ebp - 0x868], 0x100
xor ecx, ecx
mov word [ebp - 0x864], cx
lea edx, [ebp - 0x838]
push edx
lea eax, [ebp - 0x894]
push eax
push 0
push 0
push 0x8000000
push 1
push 0
push 0
mov ecx, dword [ebp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x46c393
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x89c], eax
push 0
push 0
lea edx, [ebp - 0x898]
push edx
push 0x400
mov eax, dword [ebp - 0x89c]
push eax
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
mov ecx, dword [ebp - 0x898]
push ecx
mov edx, dword [ebp + 8]
push edx
push 0x6f2ac0
call fcn.0066610b
add esp, 0xc
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov eax, dword [ebp - 0x898]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
xor al, al
jmp 0x46c652
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x830]
push edx
push 0x6f2aac
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
mov byte [ebp - 0x824], 0
push 0x800
push 0
lea eax, [ebp - 0x823]
push eax
call fcn.006665c0
add esp, 0xc
mov dword [ebp - 0x848], 0
mov byte [ebp - 0x825], 0
push 0x6f0c52
lea ecx, [ebp - 0x14]
call fcn.0040dbe0
mov dword [ebp - 4], 0
push 1
mov ecx, dword [ebp - 0x838]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
xor edx, edx
cmp eax, 0x102
sete dl
mov byte [ebp - 0x825], dl
push 0
lea eax, [ebp - 0x848]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
movzx edx, byte [ebp - 0x825]
test edx, edx
jne 0x46c45c
cmp dword [ebp - 0x848], 0
ja 0x46c45c
mov dword [ebp - 0x8ac], 0
jmp 0x46c466
mov dword [ebp - 0x8ac], 1
cmp dword [ebp - 0x8ac], 0
je 0x46c53b
cmp dword [ebp - 0x848], 0
jbe 0x46c536
mov eax, dword [ebp - 0x848]
mov dword [ebp - 0x8a0], eax
cmp dword [ebp - 0x8a0], 0x800
jbe 0x46c4a2
mov dword [ebp - 0x8a0], 0x800
push 0
lea ecx, [ebp - 0x8a0]
push ecx
mov edx, dword [ebp - 0x8a0]
push edx
lea eax, [ebp - 0x824]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [ebp - 0x8a0]
mov byte [ebp + edx - 0x824], 0
lea eax, [ebp - 0x824]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040e920
lea ecx, [ebp - 0x824]
push ecx
push 0x6f2b10
call fcn.0066610b
add esp, 8
mov edx, dword [ebp - 0x848]
cmp edx, dword [ebp - 0x8a0]
jb 0x46c516
mov eax, dword [ebp - 0x848]
sub eax, dword [ebp - 0x8a0]
mov dword [ebp - 0x848], eax
jmp 0x46c520
mov dword [ebp - 0x848], 0
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
jmp 0x46c473
jmp 0x46c404
push 0xffffffffffffffff
mov ecx, dword [ebp - 0x838]
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x838]
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov ecx, dword [ebp - 0x838]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x834]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x6f2b14
call fcn.0066610b
add esp, 4
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax]
push ecx
push str.Process_exitcode:_d_r_n
call fcn.0066610b
add esp, 8
call fcn.006684b5
add eax, 0x20
push eax
call fcn.00668459
add esp, 4
push 0
push str.SECURE_STAGE:_SECURE
lea ecx, [ebp - 0x14]
call fcn.00404540
cmp eax, 0xffffffff
je 0x46c5ca
mov edx, dword [ebp - 0x8a8]
mov dword [edx + 0x110], 4
push 0
push str.SECURE_STAGE:_WAFER
lea ecx, [ebp - 0x14]
call fcn.00404540
cmp eax, 0xffffffff
je 0x46c5ee
mov eax, dword [ebp - 0x8a8]
mov dword [eax + 0x110], 1
push 0
push str.SECURE_STAGE:_CHIP
lea ecx, [ebp - 0x14]
call fcn.00404540
cmp eax, 0xffffffff
je 0x46c612
mov ecx, dword [ebp - 0x8a8]
mov dword [ecx + 0x110], 2
push 0
push str.SECURE_STAGE:_DEVICE
lea ecx, [ebp - 0x14]
call fcn.00404540
cmp eax, 0xffffffff
je 0x46c636
mov edx, dword [ebp - 0x8a8]
mov dword [edx + 0x110], 3
mov byte [ebp - 0x8a1], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.004014d0
mov al, byte [ebp - 0x8a1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.006665ac
mov esp, ebp
pop ebp
ret 8