Function at 0x40d740
Capabilities:
Create pipe
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x417c29
mov eax, dword fs:[0]
push eax
sub esp, 0x60
mov eax, dword [0x42100c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x58], edi
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], 0
mov dword [ebp - 4], 0
mov dword [edi], 0
mov dword [edi + 4], 0
push 0x60
mov byte [ebp - 4], 2
call fcn.00415527
mov esi, eax
push 0x58
push 0
lea eax, [esi + 8]
push eax
call sub.VCRUNTIME140.dll_memset
lea eax, [esi + 8]
mov dword [esi], 0
push 2
push eax
mov dword [esi + 4], 0
call dword [sym.imp.MSVCP140.dll__Mtx_init_in_situ]
mov dword [esi + 0x5c], 0
add esp, 0x18
mov eax, dword [edi]
mov dword [edi], esi
mov esi, eax
mov dword [ebp - 0x50], 1
mov dword [ebp - 0x44], 0
test esi, esi
je 0x40d83d
mov ecx, dword [esi + 0x5c]
test ecx, ecx
je 0x40d800
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
lea eax, [esi + 0x38]
cmp ecx, eax
setne al
push eax
call edx
mov dword [esi + 0x5c], 0
lea eax, [esi + 8]
push eax
call dword [sym.imp.MSVCP140.dll__Mtx_destroy_in_situ]
mov eax, dword [esi + 4]
add esp, 4
test eax, eax
je 0x40d820
cmp eax, 0xffffffff
je 0x40d820
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi]
test eax, eax
je 0x40d832
cmp eax, 0xffffffff
je 0x40d832
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x60
push esi
call fcn.004158c2
add esp, 8
lea ecx, [ebp - 0x44]
call fcn.0040e0f0
mov eax, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x5c], eax
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x28]
push 9
xorps xmm0, xmm0
mov dword [ebp - 0x18], 0
push 0x41a534
movups xmmword [ebp - 0x28], xmm0
mov dword [ebp - 0x14], 0
call fcn.0040ad80
mov ecx, dword [ebp - 0x14]
mov eax, ecx
mov edx, dword [ebp - 0x18]
sub eax, edx
mov dword [ebp - 0x50], 3
mov dword [ebp - 0x58], edx
cmp esi, eax
ja 0x40d8ce
lea eax, [edx + esi]
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x18], eax
cmp ecx, 0x10
mov ecx, dword [ebp - 0x4c]
lea eax, [ebp - 0x28]
mov dword [ebp - 0x48], eax
jb 0x40d8b1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], esi
push dword [ebp - 0x44]
add eax, edx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x48]
add esp, 0xc
mov ecx, dword [ebp - 0x58]
add eax, esi
mov byte [eax + ecx], 0
jmp 0x40d8df
mov ecx, dword [ebp - 0x4c]
push esi
push ecx
push dword [ebp - 0x54]
lea ecx, [ebp - 0x28]
push esi
call fcn.0040b370
cmp dword [ebp - 0x14], 0x10
lea eax, [ebp - 0x28]
mov esi, dword [edi]
cmovae eax, dword [ebp - 0x28]
push 0
push 0
push 0x400
push 0x400
push 1
push 6
push 0x80001
push eax
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeA]
mov ecx, dword [esi]
mov dword [esi], eax
test ecx, ecx
je 0x40d91e
cmp ecx, 0xffffffff
je 0x40d91e
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [edi]
cmp dword [ecx], 0xffffffff
je 0x40d9f1
lea eax, [ebp + 0x10]
add ecx, 0x38
push eax
call fcn.0040e160
mov esi, dword [edi]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov ecx, dword [esi + 4]
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test ecx, ecx
je 0x40d95d
cmp ecx, 0xffffffff
je 0x40d95d
push ecx
call esi
push 0
push 0
push dword [edi]
push 0x40da50
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [edi + 4]
mov dword [edi + 4], eax
test ecx, ecx
je 0x40d984
cmp ecx, 0xffffffff
je 0x40d984
push ecx
call esi
mov ecx, dword [ebp - 0x14]
cmp ecx, 0x10
jb 0x40d9ba
mov edx, dword [ebp - 0x28]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x40d9b0
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40d9b0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004158c2
add esp, 8
mov ecx, dword [ebp + 0x34]
test ecx, ecx
je 0x40d9d2
mov esi, dword [ecx]
lea eax, [ebp + 0x10]
cmp ecx, eax
setne dl
movzx edx, dl
push edx
call dword [esi + 0x10]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00415439
mov esp, ebp
pop ebp
ret 0x30
push 0x41a540
lea ecx, [ebp - 0x40]
call fcn.00409940
mov byte [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x6c]
call fcn.0040d6a0
push eax
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 5
call fcn.00409880
lea ecx, [ebp - 0x6c]
mov byte [ebp - 4], 4
call fcn.004098f0
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x60]
call fcn.004012a0
push 0x41e378
lea eax, [ebp - 0x60]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3