Function at 0x492120
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 [0xfd51f0]
test eax, eax
jne 0x49219f
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 [0xfd51f0], eax
mov eax, dword [0xfd51f0]
test eax, eax
je 0x492180
mov eax, 1
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x24]
lock xadd dword [0xfd51f0], eax
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x60], 0x419240
mov dword [esp + 0x64], edx
mov dword [esp + 0x30], 0xf94df0
mov dword [esp + 0x34], 2
mov dword [esp + 0x40], 0
mov edx, esi
mov dword [esp + 0x68], 0x419240
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x80]
mov dword [esp + 0x3c], 2
mov dword [esp + 0x24], eax
call fcn.00415500
cmp dword [esp + 0x20], 0
sete al
or bl, al
test bl, 1
jne 0x492227
push dword [esp + 0xc]
push 0
push dword [0xfd5200]
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 0x492270
movzx ebx, byte [ecx]
test bl, bl
js 0x4922a0
mov edx, dword [esp + 8]
lea eax, [ecx + 1]
mov dword [esp + 4], eax
jmp 0x492306
xor edi, edi
mov esi, 4
mov edx, 8
mov dword [esp + 4], 0
mov dword [esp + 0x14], 0
xor ebx, ebx
jmp 0x49234a
movzx edx, byte [ecx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x4922f4
mov esi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x49259a
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 0x492306
jmp 0x4925b8
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 0x49271f
lea edx, [esi + esi]
mov ax, 1
mov dword [esp + 0x14], eax
movzx eax, byte [0xfd520d]
xor ecx, ecx
call fcn.00494530
test eax, eax
je 0x49271f
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 0x4923a7
mov ebx, ecx
xor ecx, ecx
cmp esi, dword [esp + 0x30]
je 0x492465
mov word [eax + esi*2], bx
inc esi
mov dword [esp + 0x38], esi
test edx, edx
je 0x4923d0
test cx, cx
jne 0x492390
cmp edx, dword [esp + 8]
je 0x4923d0
movzx ebx, byte [edx]
test bl, bl
js 0x4923fd
inc edx
xor ecx, ecx
jmp 0x492394
cmp word [esp + 0x14], 1
mov edi, dword [esp + 0x30]
jne 0x492510
xor ebx, ebx
cmp esi, edi
mov edx, 0
mov edi, 0
mov dword [esp + 0x14], 0
jne 0x49239e
jmp 0x492487
movzx edi, byte [edx + 1]
mov dword [esp + 0x10], eax
mov eax, ebx
and eax, 0x1f
and edi, 0x3f
cmp bl, 0xdf
jbe 0x4924b4
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 0x4924c9
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 0x4924e3
xor ecx, ecx
jmp 0x492394
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.004ea1e0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x34]
jmp 0x49239e
shl eax, 6
add edx, 2
xor ecx, ecx
or eax, edi
mov ebx, eax
mov eax, dword [esp + 0x10]
jmp 0x492394
shl eax, 0xc
add edx, 3
or edi, eax
mov ebx, edi
mov eax, dword [esp + 0x10]
cmp ebx, 0xffff
jbe 0x49245e
lea edi, [ebx + 0xff0000]
and ebx, 0x3ff
shr edi, 0xa
or ebx, 0xdc00
or edi, 0xd800
mov ecx, ebx
mov ebx, edi
jmp 0x492394
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 0x492633
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x78]
cmp ecx, 0xa
jge 0x4925e1
cmp eax, 5
jne 0x492560
mov dword [esp + 0x2c], ecx
jmp 0x492574
cmp dword [esp + 0x1c], 0
je 0x4925e1
cmp eax, 0x57
mov dword [esp + 0x1c], 0
jne 0x4925e1
xor ebx, ebx
test edi, edi
mov edi, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
je 0x492160
push esi
push 0
push dword [0xfd5200]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
jmp 0x492160
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 0x492306
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 0x49230d
mov ecx, dword [esp + 0x18]
test edi, edi
mov byte [ecx + 4], 0
mov dword [ecx + 8], eax
mov dword [ecx], 1
je 0x492605
push esi
push 0
push dword [0xfd5200]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x20], 0
je 0x49261e
push dword [esp + 0xc]
push 0
push dword [0xfd5200]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp ebx, 0xffffffff
je 0x4926e2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4926e2
test edi, edi
je 0x492646
push esi
push 0
push dword [0xfd5200]
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.004862a0
add esp, 8
movzx eax, byte [esp + 0x24]
cmp al, 4
jne 0x4926ea
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 0x4926e2
push dword [esp + 0xc]
push 0
push dword [0xfd5200]
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 0x49260c
jmp 0x49261e
ud2