Function at 0x406130
Capabilities:
Create process on windows
Get number of processors
Read file on windows
Read pipe
Terminate process

Disassembly:
push 0xffffffffffffffff
push 0x4a6838
mov eax, dword fs:[0]
push eax
mov eax, 0x13b4
call fcn.00455d00
mov eax, dword [0x4ccecc]
xor eax, esp
mov dword [esp + 0x13b0], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4ccecc]
xor eax, esp
push eax
lea eax, [esp + 0x13c8]
mov dword fs:[0], eax
mov eax, dword [esp + 0x13d8]
mov ebp, dword [esp + 0x13dc]
xor ebx, ebx
mov dword [esp + 0x64], eax
xor eax, eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov eax, 7
xor edx, edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x38], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x174], eax
mov dword [esp + 0x170], ebx
mov word [esp + 0x160], dx
mov dword [esp + 0x13d0], ebx
mov dword [esp + 0x158], eax
xor eax, eax
mov dword [esp + 0x154], ebx
mov word [esp + 0x144], ax
mov dword [esp + 0x190], 0xf
mov dword [esp + 0x18c], ebx
mov byte [esp + 0x17c], bl
mov byte [esp + 0x13d0], 2
lea ecx, [esp + 0x28]
push ecx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x64]
push ecx
lea eax, [esp + 0x40]
lea ecx, [esp + 0x4c]
lea edi, [esp + 0x2c]
mov dword [esp + 0x70], 1
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x68], 0xc
call fcn.0040de30
add esp, 0x10
test eax, eax
jne 0x406286
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esp + 0x18], 0x57
mov esi, 8
jmp 0x40680e
push 0x44
lea edx, [esp + 0xc0]
push ebx
push edx
call fcn.00455040
mov eax, dword [esp + 0x28]
add esp, 0xc
push ebx
push ebx
mov dword [esp + 0xfc], eax
mov eax, dword [esp + 0x28]
push ebx
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0xcc], 0x44
mov dword [esp + 0xf8], 0x100
mov dword [esp + 0x108], eax
mov dword [esp + 0x10c], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esp + 0x34], eax
cmp eax, ebx
je 0x40626e
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 3
push 1
push ebx
lea edx, [esp + 0x30]
push edx
call esi
push eax
call esi
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x40626e
push 0x206
lea ecx, [esp + 0x1ba]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x1c0], ax
call fcn.00455040
add esp, 0xc
push 0x104
lea edx, [esp + 0x1b8]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [esp + 0x1b4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 1
mov eax, 0x4b61b4
lea esi, [esp + 0x160]
call fcn.004093f0
lea eax, [esp + 0x1b4]
lea edx, [eax + 2]
jmp 0x406370
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x406370
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x1b8]
lea ecx, [esp + 0x160]
call fcn.00409310
push 0xe
mov eax, 0x4b63ec
lea ecx, [esp + 0x160]
call fcn.00409310
push 1
mov eax, 0x4b61b4
lea ecx, [esp + 0x160]
call fcn.00409310
mov eax, ebp
lea ecx, [eax + 2]
mov edi, edi
mov dx, word [eax]
add eax, 2
cmp dx, bx
jne 0x4063c0
sub eax, ecx
sar eax, 1
push eax
mov eax, ebp
lea esi, [esp + 0x144]
call fcn.004093f0
xor ecx, ecx
mov ebp, 7
push 4
mov eax, 0x4b640c
lea esi, [esp + 0x10c]
mov dword [esp + 0x124], ebp
mov dword [esp + 0x120], ebx
mov word [esp + 0x110], cx
call fcn.004093f0
mov edx, esi
push edx
lea eax, [esp + 0x160]
push eax
lea edi, [esp + 0xa8]
mov byte [esp + 0x13d8], 3
call fcn.0040b9b0
push eax
mov ebx, 0x4b61c8
lea esi, [esp + 0x90]
mov byte [esp + 0x13dc], 4
call fcn.0040b8f0
add esp, 0xc
lea ecx, [esp + 0x140]
push ecx
push eax
lea edi, [esp + 0x70]
mov byte [esp + 0x13d8], 5
call fcn.0040b9b0
push eax
mov ebx, 0x4b61c0
lea esi, [esp + 0x130]
mov byte [esp + 0x13dc], 6
call fcn.0040b8f0
add esp, 0xc
mov esi, 8
cmp dword [esp + 0x80], esi
jb 0x40649c
mov edx, dword [esp + 0x6c]
push edx
call fcn.00442977
add esp, 4
xor ebx, ebx
xor eax, eax
mov dword [esp + 0x80], ebp
mov dword [esp + 0x7c], ebx
mov word [esp + 0x6c], ax
cmp dword [esp + 0x9c], esi
jb 0x4064c9
mov ecx, dword [esp + 0x88]
push ecx
call fcn.00442977
add esp, 4
xor edx, edx
mov dword [esp + 0x9c], ebp
mov dword [esp + 0x98], ebx
mov word [esp + 0x88], dx
mov byte [esp + 0x13d0], 0xa
cmp dword [esp + 0xb8], esi
jb 0x406502
mov eax, dword [esp + 0xa4]
push eax
call fcn.00442977
add esp, 4
mov eax, dword [esp + 0x128]
xor ecx, ecx
mov dword [esp + 0xb8], ebp
mov dword [esp + 0xb4], ebx
mov word [esp + 0xa4], cx
cmp dword [esp + 0x13c], esi
jae 0x406531
lea eax, [esp + 0x128]
lea edx, [esp + 0x48]
push edx
lea ecx, [esp + 0xc0]
push ecx
push ebx
push ebx
push 0x8000200
push 1
push ebx
push ebx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4065c4
mov dword [esp + 0x18], 0x57
cmp dword [esp + 0x13c], esi
jb 0x406576
mov edx, dword [esp + 0x128]
push edx
call fcn.00442977
add esp, 4
xor eax, eax
mov byte [esp + 0x13d0], 2
mov dword [esp + 0x13c], ebp
mov dword [esp + 0x138], ebx
mov word [esp + 0x128], ax
cmp dword [esp + 0x120], esi
jb 0x4065af
mov ecx, dword [esp + 0x10c]
push ecx
call fcn.00442977
add esp, 4
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edx, edx
mov word [esp + 0x10c], dx
jmp 0x4067fe
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call edi
mov ecx, dword [esp + 0x20]
push ecx
mov dword [esp + 0x20], ebx
call edi
mov edx, dword [esp + 0x28]
push edx
mov dword [esp + 0x24], ebx
call edi
mov eax, dword [esp + 0x24]
push eax
mov dword [esp + 0x2c], ebx
call edi
push 0x1001
lea ecx, [esp + 0x3c0]
push ebx
push ecx
mov dword [esp + 0x30], ebx
call fcn.00455040
mov esi, dword [esp + 0x70]
mov edx, dword [esi + 0x60]
add esp, 0xc
or edx, dword [esi + 0x64]
mov dword [esp + 0x40], 0x64
mov dword [esp + 0x2c], ebx
jne 0x406630
mov dword [esi + 0x60], 1
mov dword [esi + 0x64], ebx
mov edi, edi
mov eax, dword [esp + 0x48]
push 5
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x40664c
sub dword [esp + 0x40], 1
js 0x40679d
mov eax, dword [esp + 0x30]
push ebx
push ebx
lea ecx, [esp + 0x34]
push ecx
push 0x1000
lea edx, [esp + 0x3cc]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
test eax, eax
je 0x40679d
cmp dword [esp + 0x2c], ebx
je 0x406630
mov eax, dword [esp + 0x30]
push ebx
lea ecx, [esp + 0x30]
push ecx
push 0x1000
lea edx, [esp + 0x3c8]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40679d
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40679d
lea ecx, [esp + 0x3bc]
push str.ERR:
push ecx
mov byte [esp + eax + 0x3c4], bl
call fcn.0044e5d0
add esp, 8
test eax, eax
jne 0x406795
lea edx, [esp + 0x3bc]
push 0x4b6420
push edx
call fcn.0044e5d0
add esp, 8
cmp eax, ebx
je 0x406776
mov edx, dword [eax + 7]
xor ecx, ecx
mov dword [esp + 0x195], ecx
mov dword [esp + 0x199], ecx
mov dword [esp + 0x19d], ecx
mov dword [esp + 0x1a1], ecx
mov dword [esp + 0x1a5], ecx
mov dword [esp + 0x1a9], ecx
mov dword [esp + 0x1ad], ecx
mov word [esp + 0x1b1], cx
mov byte [esp + 0x1b3], cl
mov ecx, dword [eax + 3]
mov dword [esp + 0x194], ecx
lea ecx, [esp + 0x194]
mov dword [esp + 0x198], edx
call fcn.004174d0
push ebx
push 0x64
push edx
push eax
call fcn.004555c0
mov ecx, dword [esi + 0x64]
push ecx
mov ecx, dword [esi + 0x60]
push ecx
push edx
push eax
call fcn.00455600
mov edx, dword [esp + 0x44]
push eax
push edx
call fcn.0041c7d0
mov dword [esp + 0x18], eax
cmp dword [esp + 0x18], 0xffffdac9
jne 0x406630
mov eax, dword [esp + 0x48]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jmp 0x406630
mov dword [esp + 0x18], 0xa
mov esi, 8
cmp dword [esp + 0x13c], esi
jb 0x4067bb
mov ecx, dword [esp + 0x128]
push ecx
call fcn.00442977
add esp, 4
xor edx, edx
mov byte [esp + 0x13d0], 2
mov dword [esp + 0x13c], ebp
mov dword [esp + 0x138], ebx
mov word [esp + 0x128], dx
cmp dword [esp + 0x120], esi
jb 0x4067f4
mov eax, dword [esp + 0x10c]
push eax
call fcn.00442977
add esp, 4
xor ecx, ecx
mov word [esp + 0x10c], cx
mov dword [esp + 0x11c], ebx
xor ebx, ebx
mov dword [esp + 0x120], ebp
mov eax, dword [esp + 0x48]
cmp eax, ebx
je 0x406819
push eax
call edi
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x406824
push eax
call edi
mov eax, dword [esp + 0x34]
cmp eax, ebx
je 0x40682f
push eax
call edi
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40683a
push eax
call edi
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x406845
push eax
call edi
mov eax, dword [esp + 0x30]
cmp eax, ebx
je 0x406850
push eax
call edi
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x40685b
push eax
call edi
mov eax, dword [esp + 0x38]
cmp eax, ebx
je 0x406866
push eax
call edi
mov eax, dword [esp + 0x28]
cmp eax, ebx
je 0x406871
push eax
call edi
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x40687c
push eax
call edi
cmp dword [esp + 0x18], ebx
jne 0x406892
mov edx, dword [esp + 0x44]
push 0x64
push edx
call fcn.0041c7d0
mov dword [esp + 0x18], eax
cmp dword [esp + 0x190], 0x10
jb 0x4068ac
mov eax, dword [esp + 0x17c]
push eax
call fcn.00442977
add esp, 4
mov dword [esp + 0x190], 0xf
mov dword [esp + 0x18c], ebx
mov byte [esp + 0x17c], bl
cmp dword [esp + 0x158], esi
jb 0x4068de
mov ecx, dword [esp + 0x144]
push ecx
call fcn.00442977
add esp, 4
xor edx, edx
mov dword [esp + 0x158], 7
mov dword [esp + 0x154], ebx
mov word [esp + 0x144], dx
cmp dword [esp + 0x174], esi
jb 0x406913
mov eax, dword [esp + 0x160]
push eax
call fcn.00442977
add esp, 4
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x13c8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x13b0]
xor ecx, esp
call fcn.0044e200
add esp, 0x13c0
ret 8