Function at 0x4960e0
Capabilities:
Create pipe
Generate random numbers via winapi
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xb0
mov eax, 0x40080002
mov esi, 8
mov bl, 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x44], 0
sub eax, edx
mov dword [esp + 0x7c], eax
nop word cs:[eax + eax]
nop dword [eax + eax]
call sub.kernel32.dll_GetCurrentProcessId
mov dword [esp + 0x88], eax
jmp 0x49613a
mov eax, dword [esp + 0x50]
xchg dword [0x4e4104], eax
mov eax, dword [0x4e4104]
test eax, eax
jne 0x496180
xorps xmm0, xmm0
movaps xmmword [esp + 0x50], xmm0
push 2
push 0x10
lea eax, [esp + 0x58]
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
jns 0x496130
lea ecx, [esp + 0x98]
call fcn.00496fd0
mov eax, dword [esp + 0x98]
xchg dword [0x4e4104], eax
jmp 0x49613a
mov eax, 1
lea edi, [esp + 0x34]
lock xadd dword [0x4e4104], eax
mov dword [esp + 0x50], 0x4c9ea4
mov dword [esp + 0x54], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x58], edi
mov dword [esp + 0x5c], 2
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
mov dword [esp + 0x38], fcn.00446ca0
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], fcn.00446ca0
lea ecx, [esp + 0x8c]
lea edx, [esp + 0x50]
call fcn.00413860
cmp dword [esp + 0x10], 0
sete al
or bl, al
test bl, 1
jne 0x49620c
push dword [esp + 0xc]
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
mov eax, dword [esp + 0x90]
mov ecx, dword [esp + 0x8c]
mov dword [esp + 0x84], esi
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0xc], ecx
lea edx, [ecx + eax]
test eax, eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x28], edx
je 0x496260
movzx ebx, byte [ecx]
test bl, bl
js 0x496290
lea eax, [ecx + 1]
mov dword [esp + 8], eax
jmp 0x4962ee
mov dword [esp + 0x18], 0
xor ebx, ebx
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
xor edi, edi
jmp 0x49631b
movzx edx, byte [ecx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x4962e0
mov edi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x49661d
movzx ebx, byte [edi + 3]
and eax, 7
shl ecx, 6
lea edx, [edi + 4]
shl eax, 0x12
mov dword [esp + 8], edx
and ebx, 0x3f
or ebx, ecx
or ebx, eax
cmp ebx, 0xffff
jbe 0x4962ee
jmp 0x496637
shl eax, 6
add ecx, 2
or eax, edx
mov dword [esp + 8], ecx
mov ebx, eax
mov eax, 1
mov dword [esp + 0x18], 0
mov edi, dword [esp + 0x28]
mov ecx, 0xffffffff
sub edi, dword [esp + 8]
add edi, 3
cmovb edi, ecx
shr edi, 2
add edi, eax
mov ax, 1
mov dword [esp + 0x14], eax
cmp edi, 4
mov eax, 3
cmovb edi, eax
cmp edi, 0x3ffffffe
ja 0x4967de
lea ecx, [edi + edi + 2]
test ecx, ecx
js 0x4967de
movzx eax, byte [0x4e4158]
mov edx, 2
mov esi, ecx
call fcn.00413060
test eax, eax
je 0x4967ce
mov ecx, eax
mov eax, dword [esp + 0x44]
mov edx, dword [esp + 0x14]
inc edi
mov word [ecx], bx
mov ebx, dword [esp + 8]
mov dword [esp + 0x20], ecx
inc eax
mov dword [esp + 0x80], eax
mov eax, 1
jmp 0x496395
mov esi, edi
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x1c]
mov word [ecx + eax*2], di
inc eax
mov edi, esi
mov esi, dword [esp + 0x18]
test ebx, ebx
mov dword [esp + 8], eax
je 0x496410
test si, si
je 0x4963f0
xor eax, eax
mov dword [esp + 0x1c], esi
cmp dword [esp + 8], edi
jne 0x4963e0
mov esi, dword [esp + 0x28]
mov ecx, 0xffffffff
sub esi, ebx
add esi, 3
cmovb esi, ecx
shr esi, 2
cmp ax, 1
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
sbb esi, 0xffffffff
cmp dx, 1
sbb esi, 0xffffffff
jmp 0x496433
mov esi, edi
mov dword [esp + 0x18], eax
jmp 0x4964d4
cmp ebx, dword [esp + 0x28]
je 0x496410
movzx eax, byte [ebx]
test al, al
mov dword [esp + 0x1c], eax
js 0x4964dd
inc ebx
xor eax, eax
jmp 0x4963ac
cmp dx, 1
jne 0x496590
xor ebx, ebx
xor edx, edx
cmp eax, edi
mov esi, 0
mov dword [esp + 0x1c], 0
jne 0x496380
inc esi
mov dword [esp + 0x4c], edi
add esi, eax
jb 0x4967bc
lea ecx, [edi + edi]
mov eax, 4
mov dword [esp + 0x14], edx
cmp ecx, esi
cmova esi, ecx
cmp esi, 5
cmovb esi, eax
xor edx, edx
cmp esi, 0x40000000
setb al
test edi, edi
je 0x49647b
mov edi, ebx
mov ebx, dword [esp + 0x20]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x58], ecx
mov ecx, 2
jmp 0x49647f
mov edi, ebx
xor ecx, ecx
mov dl, al
lea ebx, [esi + esi]
mov dword [esp + 0x54], ecx
add edx, edx
lea ecx, [esp + 0x34]
lea eax, [esp + 0x50]
push eax
push ebx
call fcn.004698d0
add esp, 8
cmp dword [esp + 0x34], 0
mov ecx, dword [esp + 0x38]
je 0x4964ca
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 8]
cmp ecx, 0x80000001
jne 0x4967b8
mov esi, dword [esp + 0x4c]
mov ecx, dword [esp + 0x20]
mov ebx, edi
jmp 0x49638a
mov edx, dword [esp + 0x14]
mov ebx, edi
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 8]
jmp 0x49638a
mov esi, eax
and esi, 0x1f
mov dword [esp + 0x48], esi
movzx esi, byte [ebx + 1]
and esi, 0x3f
cmp al, 0xdf
mov dword [esp + 0x18], esi
jbe 0x49653a
mov esi, dword [esp + 0x18]
mov dword [esp + 0x14], edx
movzx edx, byte [ebx + 2]
mov eax, dword [esp + 0x48]
shl esi, 6
and edx, 0x3f
or edx, esi
cmp byte [esp + 0x1c], 0xf0
jb 0x496553
movzx esi, byte [ebx + 3]
and eax, 7
shl edx, 6
add ebx, 4
shl eax, 0x12
and esi, 0x3f
or esi, edx
or esi, eax
mov eax, esi
cmp eax, 0xffff
ja 0x496564
mov edx, dword [esp + 0x14]
jmp 0x496548
mov eax, dword [esp + 0x48]
add ebx, 2
shl eax, 6
add eax, dword [esp + 0x18]
mov dword [esp + 0x1c], eax
xor eax, eax
jmp 0x4963ac
shl eax, 0xc
add ebx, 3
or edx, eax
mov eax, edx
cmp eax, 0xffff
jbe 0x496534
lea edx, [eax + 0xff0000]
and eax, 0x3ff
shr edx, 0xa
or eax, 0xdc00
or edx, 0xd800
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x14]
jmp 0x4963ac
push 0
push 0
push 0x10000
push 0x10000
push 1
mov esi, dword [esp + 0x98]
push esi
push dword [esp + 0x94]
mov ebx, dword [esp + 0x3c]
push ebx
call sub.kernel32.dll_CreateNamedPipeW
cmp eax, 0xffffffff
mov dword [esp + 8], eax
jne 0x4966be
call sub.kernel32.dll_GetLastError
mov ecx, dword [esp + 0x80]
cmp ecx, 9
jg 0x496662
cmp eax, 5
jne 0x4965f0
mov eax, ecx
mov dword [esp + 0x44], ecx
jmp 0x4965fb
test esi, esi
je 0x496662
xor esi, esi
cmp eax, 0x57
jne 0x496662
xor ebx, ebx
test edi, edi
je 0x496120
push dword [esp + 0x20]
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
xor ebx, ebx
jmp 0x496120
shl eax, 0xc
lea edx, [edi + 3]
or ecx, eax
mov dword [esp + 8], edx
mov ebx, ecx
cmp ebx, 0xffff
jbe 0x4962ee
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
mov dword [esp + 0x18], ebx
or ecx, 0xd800
mov ebx, ecx
jmp 0x4962fb
mov ecx, dword [esp + 0x24]
mov esi, 0xffffffff
test edi, edi
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
je 0x49668d
push ebx
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
mov eax, dword [esp + 0xc]
mov edi, dword [esp + 8]
cmp dword [esp + 0x10], 0
je 0x4966aa
push eax
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
cmp edi, 0xffffffff
je 0x496771
push esi
call sub.kernel32.dll_CloseHandle
jmp 0x496771
test edi, edi
je 0x4966d0
push ebx
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
mov eax, dword [esp + 0x74]
mov dword [esp + 0x50], 0
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], 0
xorps xmm0, xmm0
mov bl, 1
mov dword [esp + 0x34], 0xc
mov dword [esp + 0x38], 0
mov dword [esp + 0x3c], 1
mov byte [esp + 0x6d], al
xor al, 1
mov byte [esp + 0x6c], al
lea eax, [esp + 0x34]
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x68], eax
mov edx, dword [esp + 0xc]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x2c]
push eax
push dword [esp + 0x7c]
call fcn.00488e00
add esp, 8
movzx eax, byte [esp + 0x2c]
cmp al, 4
jne 0x496779
cmp dword [esp + 0x10], 0
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 8]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x496771
push dword [esp + 0xc]
push 0
push dword [0x4e4100]
call sub.kernel32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 0x24]
movzx edi, word [esp + 0x2d]
movzx ecx, byte [esp + 0x2f]
mov esi, dword [esp + 0x30]
mov word [edx + 5], di
mov edi, dword [esp + 8]
mov byte [edx + 7], cl
mov byte [edx + 4], al
mov eax, dword [esp + 0xc]
mov dword [edx + 8], esi
mov dword [edx], 1
mov esi, edi
cmp dword [esp + 0x10], 0
jne 0x49669c
jmp 0x4966aa
test ecx, ecx
jne 0x4967c3
call fcn.00413410
jmp 0x4967e5
mov edx, dword [esp + 0x3c]
call fcn.00413450
jmp 0x4967e5
xor ebx, ebx
mov ecx, 2
mov edx, esi
call fcn.00413450
jmp 0x4967e5
xor ebx, ebx
call fcn.00413410
ud2