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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x1003a2e7
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x14dc
call fcn.10037c50
mov eax, dword [0x10043330]
xor eax, esp
mov dword [esp + 0x14d8], eax
push ebx
push esi
push edi
mov eax, dword [0x10043330]
xor eax, esp
push eax
lea eax, [esp + 0x14f0]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, dword [ebx + 8]
cmp dword [ebx + 4], esi
mov dword [esp + 0x20], ebx
jbe 0x10018898
call fcn.1002b928
mov edi, dword [ebx + 4]
cmp edi, dword [ebx + 8]
jbe 0x100188a5
call fcn.1002b928
push esi
push ebx
push edi
push ebx
lea eax, [esp + 0x6c]
push eax
call fcn.10019060
mov ecx, 0xc
mov esi, str.wmic_cpu_get_processorid
lea edi, [esp + 0xe4]
rep movsd dword es:[edi], dword [esi]
push 0x3ce
xor ebx, ebx
lea ecx, [esp + 0x11a]
push ebx
push ecx
movsw word es:[edi], word [esi]
call fcn.1002fb20
push 0xfff
lea edx, [esp + 0x4f5]
push ebx
push edx
mov byte [esp + 0x4fc], bl
call fcn.1002fb20
add esp, 0x18
push 0x1000
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
push edx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x3c], 1
mov dword [esp + 0x38], ebx
mov dword [esp + 0x34], 0xc
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
je 0x10018c76
push 0x40
lea eax, [esp + 0x6c]
push ebx
push eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x44], ebx
mov dword [esp + 0x48], ebx
mov dword [esp + 0x70], ebx
call fcn.1002fb20
add esp, 0xc
lea ecx, [esp + 0x64]
push ecx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov eax, dword [esp + 0x1c]
lea edx, [esp + 0x30]
push edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xa4], eax
lea eax, [esp + 0x68]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
lea ecx, [esp + 0x104]
push ecx
push ebx
mov dword [esp + 0xb8], 0x101
mov word [esp + 0xbc], bx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x10018c76
lea edi, [ebx + 0x10]
cmp dword [esp + 0x10], 0x103
jne 0x10018c76
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [esp + 0x18]
push ebx
push ebx
lea ecx, [esp + 0x1c]
push ecx
push 0x1000
lea edx, [esp + 0x4f4]
push edx
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.KERNEL32.dll_PeekNamedPipe]
cmp eax, ebx
je 0x10018c5e
mov esi, dword [esp + 0x14]
cmp esi, ebx
jbe 0x10018c5e
push 0x1000
lea ecx, [esp + 0x4e8]
push ebx
push ecx
call fcn.1002fb20
mov ecx, dword [esp + 0x24]
add esp, 0xc
push ebx
lea edx, [esp + 0x18]
push edx
push esi
lea eax, [esp + 0x4f0]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10018c5e
mov esi, 0xf
mov dword [esp + 0xe0], esi
mov dword [esp + 0xdc], ebx
mov byte [esp + 0xcc], bl
mov dword [esp + 0x14f8], ebx
lea eax, [esp + 0x4e4]
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xb0], bl
lea edx, [eax + 1]
jmp 0x10018aa0
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x10018aa0
sub eax, edx
push eax
lea edx, [esp + 0x4e8]
push edx
lea ecx, [esp + 0xb4]
call fcn.10002fc0
push 2
push 0x1003ec5c
lea eax, [esp + 0xb4]
push eax
mov byte [esp + 0x1504], 1
call fcn.10015d20
cmp eax, 0xffffffff
je 0x10018bfb
push 0xffffffffffffffff
lea ecx, [eax + 2]
lea esi, [esp + 0x44]
lea edx, [esp + 0xb0]
call fcn.10015bc0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xb8]
mov byte [esp + 0x1504], 2
call fcn.10002de0
mov byte [esp + 0x14f8], 1
cmp dword [esp + 0x58], edi
jb 0x10018b2d
mov ecx, dword [esp + 0x44]
push ecx
call fcn.1002b322
add esp, 4
cmp dword [esp + 0xc0], 0x12
jb 0x10018bf6
push edi
xor ecx, ecx
lea esi, [esp + 0x44]
lea edx, [esp + 0xb0]
call fcn.10015bc0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xd4]
mov byte [esp + 0x1504], 3
call fcn.10002de0
mov byte [esp + 0x14f8], 1
cmp dword [esp + 0x58], edi
jb 0x10018b81
mov edx, dword [esp + 0x44]
push edx
call fcn.1002b322
add esp, 4
mov esi, dword [esp + 0x20]
lea eax, [esp + 0xc8]
push eax
call fcn.10018e00
push 0xffffffffffffffff
mov ecx, edi
lea esi, [esp + 0x44]
lea edx, [esp + 0xb0]
call fcn.10015bc0
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xb8]
mov byte [esp + 0x1504], 4
call fcn.10002de0
mov byte [esp + 0x14f8], 1
cmp dword [esp + 0x58], edi
jb 0x10018bd9
mov ecx, dword [esp + 0x44]
push ecx
call fcn.1002b322
add esp, 4
push 2
push 0x1003ec5c
lea edx, [esp + 0xb4]
push edx
call fcn.10015d20
cmp eax, 0xffffffff
jne 0x10018ae5
mov esi, 0xf
mov ecx, dword [esp + 0x20]
call fcn.10002d00
test eax, eax
ja 0x10018c9c
cmp dword [esp + 0xc4], edi
jb 0x10018c25
mov eax, dword [esp + 0xb0]
push eax
call fcn.1002b322
add esp, 4
mov dword [esp + 0x14f8], 0xffffffff
cmp dword [esp + 0xe0], edi
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xb0], bl
jb 0x10018c5e
mov ecx, dword [esp + 0xcc]
push ecx
call fcn.1002b322
add esp, 4
mov eax, dword [esp + 0x30]
lea edx, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x100189d3
xor al, al
mov ecx, dword [esp + 0x14f0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x14d8]
xor ecx, esp
call fcn.1002b6af
mov esp, ebp
pop ebp
ret
cmp dword [esp + 0xc4], edi
jb 0x10018cb5
mov ecx, dword [esp + 0xb0]
push ecx
call fcn.1002b322
add esp, 4
cmp dword [esp + 0xe0], edi
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc0], ebx
mov byte [esp + 0xb0], bl
jb 0x10018ce3
mov edx, dword [esp + 0xcc]
push edx
call fcn.1002b322
add esp, 4
mov al, 1
jmp 0x10018c78