Function at 0x5c12d0
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 bl, 1
mov dword [esp + 0x24], ecx
mov dword [esp + 0x78], edx
mov dword [esp + 0x48], 0
mov dword [esp + 0x28], 8
sub eax, edx
mov dword [esp + 0x80], eax
nop word [eax + eax]
call fcn.006ae520
mov dword [esp + 0x88], eax
mov eax, dword [0x71518c]
test eax, eax
je 0x5c1343
jmp 0x5c1381
mov eax, dword [esp + 0x50]
xchg dword [0x71518c], eax
mov eax, dword [0x71518c]
test eax, eax
jne 0x5c1381
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 0x5c1330
lea ecx, [esp + 0x98]
call fcn.005c70f0
mov eax, dword [esp + 0x98]
xchg dword [0x71518c], eax
mov eax, dword [0x71518c]
test eax, eax
je 0x5c1343
mov eax, 1
lock xadd dword [0x71518c], eax
mov dword [esp + 0x50], 0x6e4e5c
mov dword [esp + 0x54], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x30], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x3c], fcn.00509680
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x44], fcn.00509680
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], 2
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.004ee530
add esp, 8
test esi, esi
sete al
or bl, al
test bl, 1
jne 0x5c140d
push 1
push esi
push dword [esp + 0x18]
call fcn.004ed020
add esp, 0xc
mov ecx, dword [esp + 0x94]
mov esi, dword [esp + 0x90]
mov eax, dword [esp + 0x8c]
lea edx, [esi + ecx]
test ecx, ecx
mov dword [esp + 0x10], esi
mov dword [esp + 0x20], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x2c], edx
je 0x5c1450
movzx eax, byte [esi]
test al, al
js 0x5c1470
lea ebx, [esi + 1]
mov edi, eax
jmp 0x5c14c0
mov dword [esp + 0x1c], 0
xor edi, edi
mov dword [esp + 0x18], 0
xor ebx, ebx
xor edx, edx
jmp 0x5c14eb
movzx edx, byte [esi + 1]
mov edi, eax
and edi, 0x1f
and edx, 0x3f
cmp al, 0xdf
jbe 0x5c14b8
movzx ecx, byte [esi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp al, 0xf0
jb 0x5c1826
movzx eax, byte [esi + 3]
and edi, 7
shl ecx, 6
lea ebx, [esi + 4]
shl edi, 0x12
and eax, 0x3f
or eax, ecx
or edi, eax
cmp edi, 0xffff
jbe 0x5c14c0
jmp 0x5c183a
shl edi, 6
lea ebx, [esi + 2]
or edi, edx
mov eax, 1
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x2c]
mov ecx, 0xffffffff
sub edx, ebx
add edx, 3
cmovb edx, ecx
shr edx, 2
add edx, eax
mov ax, 1
mov dword [esp + 0x18], eax
cmp edx, 4
mov eax, 3
mov dword [esp + 0xc], edi
cmovb edx, eax
cmp edx, 0x3ffffffe
ja 0x5c19e0
lea esi, [edx + edx + 2]
test esi, esi
js 0x5c19e0
mov eax, dword [0x6b6a34]
mov edi, edx
movzx eax, byte [eax]
push 2
push esi
call fcn.004ed010
add esp, 8
test eax, eax
je 0x5c19c7
mov ecx, eax
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0x18]
inc edi
mov dword [esp + 0x14], ecx
inc eax
mov dword [esp + 0x84], eax
mov eax, dword [esp + 0xc]
mov word [ecx], ax
mov eax, ecx
mov ecx, 1
jmp 0x5c156b
mov esi, edi
xor edi, edi
mov word [eax + ecx*2], di
inc ecx
mov edi, esi
mov esi, dword [esp + 0x1c]
test ebx, ebx
mov dword [esp + 0xc], ecx
je 0x5c15f0
test si, si
je 0x5c15d0
xor ecx, ecx
mov dword [esp + 8], esi
cmp dword [esp + 0xc], edi
jne 0x5c15c0
mov esi, dword [esp + 0x2c]
mov eax, 0xffffffff
sub esi, ebx
add esi, 3
cmovb esi, eax
shr esi, 2
cmp cx, 1
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0xc]
sbb esi, 0xffffffff
cmp dx, 1
sbb esi, 0xffffffff
jmp 0x5c1613
mov esi, edi
mov dword [esp + 0x1c], ecx
jmp 0x5c16bc
cmp ebx, dword [esp + 0x2c]
je 0x5c15f0
movzx ecx, byte [ebx]
test cl, cl
js 0x5c16c9
mov dword [esp + 8], ecx
inc ebx
xor ecx, ecx
jmp 0x5c1582
cmp dx, 1
jne 0x5c1790
xor ebx, ebx
xor edx, edx
cmp ecx, edi
mov esi, 0
mov dword [esp + 8], 0
jne 0x5c1560
inc esi
add esi, ecx
jb 0x5c19b1
lea eax, [edi + edi]
mov ecx, 4
mov dword [esp + 0x18], edx
mov dword [esp + 0x4c], edi
cmp eax, esi
cmova esi, eax
cmp esi, 5
cmovb esi, ecx
xor edx, edx
cmp esi, 0x40000000
setb cl
test edi, edi
je 0x5c165e
mov edi, ebx
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], 2
mov dword [esp + 0x58], eax
jmp 0x5c1668
mov edi, ebx
mov dword [esp + 0x54], 0
mov dl, cl
lea eax, [esi + esi]
add edx, edx
lea ebx, [esp + 0x50]
lea ecx, [esp + 0x38]
push ebx
push eax
call fcn.00589510
add esp, 8
cmp dword [esp + 0x38], 0
mov eax, dword [esp + 0x3c]
je 0x5c16b2
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
cmp eax, 0x80000001
jne 0x5c19a9
mov ebx, edi
mov esi, dword [esp + 0x4c]
mov eax, dword [esp + 0x14]
mov edi, dword [esp + 8]
jmp 0x5c1564
mov edx, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov ebx, edi
mov ecx, dword [esp + 0xc]
mov edi, dword [esp + 8]
jmp 0x5c1564
mov esi, ecx
and esi, 0x1f
mov dword [esp + 8], esi
movzx esi, byte [ebx + 1]
and esi, 0x3f
cmp cl, 0xdf
mov dword [esp + 0x1c], esi
jbe 0x5c172d
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x18], edx
movzx edx, byte [ebx + 2]
shl esi, 6
and edx, 0x3f
or edx, esi
cmp cl, 0xf0
jb 0x5c1746
movzx ecx, byte [ebx + 3]
mov esi, dword [esp + 8]
shl edx, 6
add ebx, 4
and esi, 7
and ecx, 0x3f
shl esi, 0x12
or ecx, edx
or esi, ecx
cmp esi, 0xffff
ja 0x5c175a
mov edx, dword [esp + 0x18]
mov dword [esp + 8], esi
xor ecx, ecx
jmp 0x5c1582
mov ecx, dword [esp + 8]
add ebx, 2
shl ecx, 6
add ecx, dword [esp + 0x1c]
mov dword [esp + 8], ecx
xor ecx, ecx
jmp 0x5c1582
mov esi, dword [esp + 8]
add ebx, 3
shl esi, 0xc
or esi, edx
cmp esi, 0xffff
jbe 0x5c171e
lea edx, [esi + 0xff0000]
and esi, 0x3ff
shr edx, 0xa
or esi, 0xdc00
or edx, 0xd800
mov dword [esp + 8], edx
mov edx, dword [esp + 0x18]
mov ecx, esi
jmp 0x5c1582
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x3c]
push dword [esp + 0x98]
push dword [esp + 0x30]
call sub.KERNEL32.dll_CreateNamedPipeW
mov ebx, eax
cmp eax, 0xffffffff
jne 0x5c18b7
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x84]
mov esi, dword [esp + 0x20]
cmp ecx, 9
jg 0x5c1867
cmp eax, 5
jne 0x5c17f0
mov eax, ecx
mov dword [esp + 0x48], ecx
jmp 0x5c1804
cmp dword [esp + 0x28], 0
je 0x5c1867
cmp eax, 0x57
mov dword [esp + 0x28], 0
jne 0x5c1867
xor ebx, ebx
test edi, edi
je 0x5c1310
add edi, edi
push 2
push edi
push dword [esp + 0x1c]
call fcn.004ed020
add esp, 0xc
xor ebx, ebx
jmp 0x5c1310
shl edi, 0xc
lea ebx, [esi + 3]
or edi, ecx
cmp edi, 0xffff
jbe 0x5c14c0
lea ecx, [edi + 0xff0000]
and edi, 0x3ff
mov eax, 2
shr ecx, 0xa
or edi, 0xdc00
or ecx, 0xd800
mov edx, edi
mov edi, ecx
mov dword [esp + 0x1c], edx
jmp 0x5c14cd
mov ecx, dword [esp + 0x24]
test edi, edi
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
je 0x5c1890
add edi, edi
push 2
push edi
push dword [esp + 0x1c]
call fcn.004ed020
add esp, 0xc
test esi, esi
je 0x5c18a3
push 1
push esi
push dword [esp + 0x18]
call fcn.004ed020
add esp, 0xc
cmp ebx, 0xffffffff
je 0x5c196f
push ebx
call sub.KERNEL32.dll_CloseHandle
jmp 0x5c196f
mov esi, dword [esp + 0x20]
test edi, edi
je 0x5c18d0
add edi, edi
push 2
push edi
push dword [esp + 0x1c]
call fcn.004ed020
add esp, 0xc
mov eax, dword [esp + 0x78]
mov dword [esp + 0x50], 0
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], 0
xorps xmm0, xmm0
mov dword [esp + 0x38], 0xc
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 1
mov byte [esp + 0x6d], al
xor al, 1
mov byte [esp + 0x6c], al
lea eax, [esp + 0x38]
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x68], eax
mov al, 1
mov dword [esp + 0xc], eax
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x30]
push eax
push dword [esp + 0x80]
call fcn.005ba390
add esp, 8
movzx eax, byte [esp + 0x30]
cmp al, 4
jne 0x5c1977
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
test esi, esi
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x5c196f
push 1
push esi
push dword [esp + 0x18]
call fcn.004ed020
add esp, 0xc
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x33]
mov edx, dword [esp + 0x24]
mov edi, dword [esp + 0x34]
mov byte [edx + 7], cl
movzx ecx, word [esp + 0x31]
mov word [edx + 5], cx
mov byte [edx + 4], al
mov dword [edx + 8], edi
mov dword [edx], 1
test esi, esi
jne 0x5c1894
jmp 0x5c18a3
mov edi, dword [esp + 0x4c]
test eax, eax
jne 0x5c19b8
call fcn.004ed360
jmp 0x5c19f1
push dword [esp + 0x40]
push eax
call fcn.004ed3a0
add esp, 8
jmp 0x5c19f1
mov dword [esp + 0xc], 0
push esi
push 2
mov esi, dword [esp + 0x28]
call fcn.004ed3a0
add esp, 8
jmp 0x5c19f1
mov dword [esp + 0xc], 0
mov esi, dword [esp + 0x20]
call fcn.004ed360
ud2