Function at 0x10002182
Capabilities:
Check os version
Create pipe
Create thread

Disassembly:
push ebp
lea ebp, [esp - 0x1a4]
sub esp, 0x224
mov eax, dword [0x1000d0c8]
xor eax, ebp
mov dword [ebp + 0x1a0], eax
mov eax, dword [ebp + 0x1ac]
push ebx
push esi
mov dword [ebp - 0x68], eax
xor eax, eax
push 0x1fe
mov word [ebp - 0x60], ax
xor ebx, ebx
lea eax, [ebp - 0x5e]
push ebx
push eax
call fcn.10002a80
mov eax, dword [str..pipedatastate_]
add esp, 0xc
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x100021c9
push edi
sub eax, edx
lea edi, [ebp - 0x60]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x100021db
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x68]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, eax
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x100021fb
sub eax, edx
lea edi, [ebp - 0x60]
dec edi
dec edi
mov cx, word [edi + 2]
inc edi
inc edi
cmp cx, bx
jne 0x1000220c
mov ecx, eax
shr ecx, 2
push ebx
mov esi, edx
rep movsd dword es:[edi], dword [esi]
push ebx
push 3
push ebx
push ebx
mov ecx, eax
push 0xc0000000
lea eax, [ebp - 0x60]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
pop edi
cmp eax, 0xffffffff
je 0x10002250
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
jmp 0x1000235e
mov dword [ebp - 0x74], 0xc
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x7c], ebx
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
ja 0x10002272
mov dword [ebp - 0x70], ebx
jmp 0x10002298
push ebx
lea eax, [ebp - 0x70]
push eax
push 1
push str.S:_ML__NW___LW_
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorA
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x78]
push eax
push dword [ebp - 0x70]
call dword [sym.imp.ADVAPI32.dll_GetSecurityDescriptorSacl]
push 0x20c
call fcn.10002c82
mov esi, eax
mov eax, dword [ebp - 0x68]
mov edx, esi
pop ecx
mov dword [ebp - 0x80], esi
sub edx, eax
movzx ecx, word [eax]
mov word [edx + eax], cx
inc eax
inc eax
cmp cx, bx
jne 0x100022af
mov eax, dword [ebp + 0x1b0]
mov dword [esi + 0x204], eax
lea eax, [ebp - 0x74]
push eax
push ebx
mov eax, 0x1000
push eax
push eax
push 1
push 6
push 0x40003
lea eax, [ebp - 0x60]
push eax
mov byte [esi + 0x208], bl
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
lea ecx, [esi + 0x200]
mov dword [ecx], eax
cmp eax, 0xffffffff
jne 0x10002309
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x10002249
push dword [ebp - 0x64]
push ebx
push ebx
push ebx
push 4
push 6
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityInfo]
push dword [ebp - 0x70]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
push ebx
push esi
push 0x10001065
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, 0x1000dd64
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ecx, dword [0x1000dd60]
lea eax, [ebp - 0x80]
push eax
call fcn.1000212f
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
mov ecx, dword [ebp + 0x1a0]
pop esi
xor ecx, ebp
pop ebx
call fcn.100026d0
add ebp, 0x1a4
leave
ret 8