Function at 0x4bebb0
Capabilities:
Create pipe
Generate random numbers via winapi

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x80
movzx eax, byte [ebp + 0xc]
mov ecx, 0x40080002
mov bl, 1
lea edi, [esp + 0x30]
mov dword [esp + 0x2c], 0
mov dword [esp + 8], 8
sub ecx, eax
mov dword [esp + 0x5c], ecx
jmp 0x4bebf6
mov esi, dword [esp + 4]
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0x60], eax
mov eax, dword [0x574a40]
test eax, eax
je 0x4bec23
jmp 0x4bec58
mov eax, dword [esp + 0x30]
xchg dword [0x574a40], eax
mov eax, dword [0x574a40]
test eax, eax
jne 0x4bec58
xorps xmm0, xmm0
movaps xmmword [esp + 0x30], xmm0
push 2
push 0x10
push edi
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
jns 0x4bec10
lea ecx, [esp + 0x68]
call fcn.004bf290
mov eax, dword [esp + 0x68]
xchg dword [0x574a40], eax
mov eax, dword [0x574a40]
test eax, eax
je 0x4bec23
mov eax, 1
lock xadd dword [0x574a40], eax
mov dword [esp + 0x38], 0x563e6c
mov dword [esp + 0x3c], 2
mov dword [esp + 0x30], 0
mov dword [esp + 0x64], eax
lea eax, [esp + 0x60]
mov dword [esp + 0xc], eax
lea eax, [esp + 0x64]
mov dword [esp + 0x10], fcn.004d9300
mov dword [esp + 0x14], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x18], fcn.004d9300
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], 2
push edi
lea eax, [esp + 0x20]
push eax
call fcn.004d1060
add esp, 8
test esi, esi
sete al
or bl, al
test bl, 1
jne 0x4becda
push 1
push esi
push dword [esp + 8]
call fcn.0040dc90
add esp, 0xc
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x24]
mov dword [esp + 4], eax
lea eax, [ecx + esi]
mov dword [esp], ecx
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], ecx
mov word [esp + 0x38], 0
mov dword [esp + 0x3c], 1
push edi
lea eax, [esp + 0x10]
push eax
call fcn.004cc3a0
add esp, 8
mov ebx, dword [esp + 0x10]
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x1c]
push dword [esp + 0x74]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
cmp eax, 0xffffffff
mov dword [esp + 0x28], eax
jne 0x4bedfc
mov eax, dword [esp + 0x2c]
lea esi, [eax + 1]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp esi, 0xa
jge 0x4beda3
cmp eax, 5
jne 0x4bed70
mov dword [esp + 0x2c], esi
jmp 0x4bed84
cmp dword [esp + 8], 0
je 0x4beda3
cmp eax, 0x57
mov dword [esp + 8], 0
jne 0x4beda3
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4bebf0
add eax, eax
push 2
push eax
push ebx
call fcn.0040dc90
add esp, 0xc
jmp 0x4bebf0
mov esi, dword [ebp + 8]
mov dword [esi + 4], 0
mov dword [esi + 8], eax
mov eax, dword [esp + 0xc]
mov dword [esi], 1
test eax, eax
je 0x4bedcc
add eax, eax
push 2
push eax
push ebx
call fcn.0040dc90
add esp, 0xc
mov ecx, dword [esp + 4]
mov eax, dword [esp]
test ecx, ecx
je 0x4bede3
push 1
push ecx
push eax
call fcn.0040dc90
add esp, 0xc
mov eax, dword [esp + 0x28]
cmp eax, 0xffffffff
je 0x4beea9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x4beea9
mov eax, dword [esp + 0xc]
test eax, eax
je 0x4bee12
add eax, eax
push 2
push eax
push ebx
call fcn.0040dc90
add esp, 0xc
movzx eax, byte [ebp + 0xc]
mov dword [esp + 0x30], 0
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], 0
mov dword [esp + 0xc], 0xc
xorps xmm0, xmm0
mov dword [esp + 0x10], 0
mov byte [esp + 0x4d], al
xor al, 1
mov byte [esp + 0x4c], al
movzx eax, byte [ebp + 0x10]
movups xmmword [esp + 0x38], xmm0
mov dword [esp + 0x14], eax
lea eax, [esp + 0xc]
mov dword [esp + 0x48], eax
push edi
push esi
push dword [esp + 8]
lea eax, [esp + 0x28]
push eax
call fcn.004c5160
add esp, 0x10
movzx eax, byte [esp + 0x1c]
cmp al, 4
jne 0x4beeb3
mov eax, dword [esp + 0x20]
mov esi, dword [ebp + 8]
mov ecx, dword [esp + 0x28]
mov dword [esi + 4], ecx
mov dword [esi + 8], eax
mov eax, dword [esp + 4]
mov dword [esi], 0
test eax, eax
je 0x4beea9
push 1
push eax
push dword [esp + 8]
call fcn.0040dc90
add esp, 0xc
mov eax, esi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x1f]
mov esi, dword [ebp + 8]
movzx edi, word [esp + 0x1d]
mov edx, dword [esp + 0x20]
mov byte [esi + 7], cl
mov word [esi + 5], di
mov byte [esi + 4], al
mov dword [esi + 8], edx
mov dword [esi], 1
mov ecx, dword [esp + 4]
mov eax, dword [esp]
test ecx, ecx
jne 0x4bedd7
jmp 0x4bede3