Function at 0x4971d0
Capabilities:
Create pipe
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov edi, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
mov eax, 0x40080002
mov bl, 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 8
sub eax, edx
mov dword [esp + 0x74], eax
nop word [eax + eax]
call dword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov dword [esp + 0x7c], eax
lea esi, [esp + 0x30]
xorps xmm0, xmm0
mov eax, dword [0x6019c8]
test eax, eax
jne 0x49724f
nop word [eax + eax]
movaps xmmword [esp + 0x30], xmm0
push 0x10
push esi
call edi
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
mov dword [0x6019c8], eax
mov eax, dword [0x6019c8]
test eax, eax
je 0x497230
mov eax, 1
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x24]
lock xadd dword [0x6019c8], eax
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x60], 0x4140a0
mov dword [esp + 0x64], edx
mov dword [esp + 0x30], 0x5bc0e8
mov dword [esp + 0x34], 2
mov dword [esp + 0x40], 0
mov edx, esi
mov dword [esp + 0x68], 0x4140a0
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x80]
mov dword [esp + 0x3c], 2
mov dword [esp + 0x24], eax
call fcn.0040c360
cmp dword [esp + 0x20], 0
sete al
or bl, al
test bl, 1
jne 0x4972d7
push dword [esp + 0xc]
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov edx, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x80]
lea esi, [ecx + edx]
test edx, edx
mov dword [esp + 0x70], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 8], esi
je 0x497320
movzx ebx, byte [ecx]
test bl, bl
js 0x497350
mov edx, dword [esp + 8]
lea eax, [ecx + 1]
mov dword [esp + 4], eax
jmp 0x4973b6
xor edi, edi
mov esi, 4
mov edx, 8
mov dword [esp + 4], 0
mov dword [esp + 0x14], 0
xor ebx, ebx
jmp 0x4973fa
movzx edx, byte [ecx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x4973a4
mov esi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x49764a
movzx ebx, byte [esi + 3]
and eax, 7
shl ecx, 6
lea edx, [esi + 4]
shl eax, 0x12
mov dword [esp + 4], edx
and ebx, 0x3f
or ebx, ecx
or ebx, eax
mov edx, dword [esp + 8]
cmp ebx, 0xffff
jbe 0x4973b6
jmp 0x497668
shl eax, 6
add ecx, 2
or eax, edx
mov edx, dword [esp + 8]
mov dword [esp + 4], ecx
mov ebx, eax
mov eax, 1
xor edi, edi
mov ecx, edx
mov edx, 0xffffffff
sub ecx, dword [esp + 4]
add ecx, 3
cmovb ecx, edx
shr ecx, 2
lea edx, [ecx + eax]
lea esi, [ecx + eax + 1]
mov eax, 4
cmp edx, 3
cmovb esi, eax
cmp esi, 0x40000000
jae 0x4977cf
lea edx, [esi + esi]
mov ax, 1
mov dword [esp + 0x14], eax
movzx eax, byte [0x6019e5]
xor ecx, ecx
call fcn.00499510
test eax, eax
je 0x4977cf
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 4]
mov word [eax], bx
mov dword [esp + 0x30], esi
mov esi, 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], 1
inc ecx
mov dword [esp + 0x78], ecx
mov ecx, edi
jmp 0x497457
mov ebx, ecx
xor ecx, ecx
cmp esi, dword [esp + 0x30]
je 0x497515
mov word [eax + esi*2], bx
inc esi
mov dword [esp + 0x38], esi
test edx, edx
je 0x497480
test cx, cx
jne 0x497440
cmp edx, dword [esp + 8]
je 0x497480
movzx ebx, byte [edx]
test bl, bl
js 0x4974ad
inc edx
xor ecx, ecx
jmp 0x497444
cmp word [esp + 0x14], 1
mov edi, dword [esp + 0x30]
jne 0x4975c0
xor ebx, ebx
cmp esi, edi
mov edx, 0
mov edi, 0
mov dword [esp + 0x14], 0
jne 0x49744e
jmp 0x497537
movzx edi, byte [edx + 1]
mov dword [esp + 0x10], eax
mov eax, ebx
and eax, 0x1f
and edi, 0x3f
cmp bl, 0xdf
jbe 0x497564
movzx ecx, byte [edx + 2]
shl edi, 6
mov dword [esp + 4], ecx
and dword [esp + 4], 0x3f
add dword [esp + 4], edi
cmp bl, 0xf0
mov edi, dword [esp + 4]
jb 0x497579
movzx ebx, byte [edx + 3]
and eax, 7
shl edi, 6
add edx, 4
shl eax, 0x12
and ebx, 0x3f
or ebx, edi
or ebx, eax
mov eax, dword [esp + 0x10]
cmp ebx, 0xffff
ja 0x497593
xor ecx, ecx
jmp 0x497444
mov edi, dword [esp + 8]
mov eax, 0xffffffff
sub edi, edx
add edi, 3
cmovb edi, eax
movzx eax, word [esp + 0x14]
shr edi, 2
cmp cx, 1
sbb edi, 0xffffffff
add edi, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edx
lea ecx, [esp + 0x30]
mov edx, esi
inc edi
push 2
push 2
push edi
call fcn.00500270
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x34]
jmp 0x49744e
shl eax, 6
add edx, 2
xor ecx, ecx
or eax, edi
mov ebx, eax
mov eax, dword [esp + 0x10]
jmp 0x497444
shl eax, 0xc
add edx, 3
or edi, eax
mov ebx, edi
mov eax, dword [esp + 0x10]
cmp ebx, 0xffff
jbe 0x49750e
lea edi, [ebx + 0xff0000]
and ebx, 0x3ff
shr edi, 0xa
or ebx, 0xdc00
or edi, 0xd800
mov ecx, ebx
mov ebx, edi
jmp 0x497444
mov esi, dword [esp + 0x34]
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x30]
push dword [esp + 0x8c]
push esi
call dword [sym.imp.kernel32.dll_CreateNamedPipeW]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x4976e3
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esp + 0x78]
cmp ecx, 0xa
jge 0x497691
cmp eax, 5
jne 0x497610
mov dword [esp + 0x2c], ecx
jmp 0x497624
cmp dword [esp + 0x1c], 0
je 0x497691
cmp eax, 0x57
mov dword [esp + 0x1c], 0
jne 0x497691
xor ebx, ebx
test edi, edi
mov edi, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
je 0x497210
push esi
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
xor ebx, ebx
jmp 0x497210
shl eax, 0xc
lea edx, [esi + 3]
or ecx, eax
mov dword [esp + 4], edx
mov ebx, ecx
mov edx, dword [esp + 8]
cmp ebx, 0xffff
jbe 0x4973b6
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
or ecx, 0xd800
mov edi, ebx
mov ebx, ecx
jmp 0x4973bd
mov ecx, dword [esp + 0x18]
test edi, edi
mov byte [ecx + 4], 0
mov dword [ecx + 8], eax
mov dword [ecx], 1
je 0x4976b5
push esi
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp dword [esp + 0x20], 0
je 0x4976ce
push dword [esp + 0xc]
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
cmp ebx, 0xffffffff
je 0x497792
push ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x497792
test edi, edi
je 0x4976f6
push esi
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x30], 0
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], 0
mov edx, dword [esp + 0xc]
xorps xmm0, xmm0
mov dword [esp + 0x5c], 0xc
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x4d], al
xor al, 1
mov byte [esp + 0x4c], al
lea eax, [esp + 0x5c]
movups xmmword [esp + 0x38], xmm0
mov dword [esp + 0x48], eax
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x74]
call fcn.0048ba30
add esp, 8
movzx eax, byte [esp + 0x24]
cmp al, 4
jne 0x49779a
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x28]
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x497792
push dword [esp + 0xc]
push 0
push dword [0x6019d8]
call dword [sym.imp.kernel32.dll_HeapFree]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x27]
mov edx, dword [esp + 0x18]
movzx edi, word [esp + 0x25]
mov esi, dword [esp + 0x28]
mov byte [edx + 7], cl
mov word [edx + 5], di
mov byte [edx + 4], al
mov dword [edx + 8], esi
mov dword [edx], 1
cmp dword [esp + 0x20], 0
jne 0x4976bc
jmp 0x4976ce
ud2