Function at 0x10177a70
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
lea esi, [esp + 0x98]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x84], edx
mov dword [esp + 0x50], 0
mov dword [esp + 0x34], 8
sub eax, edx
mov dword [esp + 0x88], eax
mov al, 1
nop word cs:[eax + eax]
nop dword [eax + eax]
mov edi, eax
call sub.KERNEL32.dll_GetCurrentProcessId
mov dword [esp + 0x90], eax
mov eax, dword [0x1048f104]
test eax, eax
je 0x10177af3
jmp 0x10177b2c
mov eax, dword [esp + 0x60]
xchg dword [0x1048f104], eax
mov eax, dword [0x1048f104]
test eax, eax
jne 0x10177b2c
xorps xmm0, xmm0
movaps xmmword [esp + 0x60], xmm0
push 2
push 0x10
lea eax, [esp + 0x68]
push eax
push 0
call sub.bcrypt.dll_BCryptGenRandom
test eax, eax
jns 0x10177ae0
mov ecx, esi
call fcn.1017c800
mov eax, dword [esp + 0x98]
xchg dword [0x1048f104], eax
mov eax, dword [0x1048f104]
test eax, eax
je 0x10177af3
mov eax, 1
lock xadd dword [0x1048f104], eax
mov dword [esp + 0x60], 0x1043aadc
mov dword [esp + 0x64], 2
mov dword [esp + 0x70], 0
mov dword [esp + 0x94], eax
lea eax, [esp + 0x90]
mov dword [esp + 0x40], eax
lea eax, [esp + 0x94]
mov dword [esp + 0x44], 0x1002e030
mov dword [esp + 0x48], eax
lea eax, [esp + 0x40]
mov dword [esp + 0x4c], 0x1002e030
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], 2
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x58]
push eax
call fcn.1001b0a0
add esp, 8
mov eax, dword [esp + 0x5c]
movsd xmm0, qword [esp + 0x54]
mov dword [esp + 0x68], eax
mov eax, edi
movsd qword [esp + 0x60], xmm0
test al, 1
jne 0x10177bd2
cmp dword [esp + 0x24], 0
je 0x10177bd2
push dword [esp + 0x20]
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
movsd xmm0, qword [esp + 0x60]
mov eax, dword [esp + 0x68]
movsd qword [esp + 0x20], xmm0
test eax, eax
mov dword [esp + 0x28], eax
mov ebx, dword [esp + 0x20]
lea ecx, [ebx + eax]
mov dword [esp + 0x38], ecx
je 0x10177c00
movzx ecx, byte [ebx]
test cl, cl
js 0x10177c20
inc ebx
jmp 0x10177c7a
xor ecx, ecx
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
xor ebx, ebx
xor edx, edx
jmp 0x10177ca5
movzx edx, byte [ebx + 1]
mov eax, ecx
and eax, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x10177c70
mov esi, ecx
movzx ecx, byte [ebx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
mov edx, esi
cmp dl, 0xf0
jb 0x1017801a
movzx edx, byte [ebx + 3]
shl ecx, 6
and eax, 7
add ebx, 4
shl eax, 0x12
and edx, 0x3f
or edx, ecx
mov ecx, edx
or ecx, eax
cmp ecx, 0xffff
jbe 0x10177c7a
jmp 0x1017802e
shl eax, 6
add ebx, 2
or eax, edx
mov ecx, eax
mov dword [esp + 8], ecx
mov eax, 1
xor esi, esi
mov edx, dword [esp + 0x38]
mov ecx, 0xffffffff
sub edx, ebx
add edx, 3
cmovb edx, ecx
mov ecx, esi
shr edx, 2
add edx, eax
mov ax, 1
mov dword [esp + 0xc], eax
cmp edx, 4
mov eax, 3
cmovb edx, eax
cmp edx, 0x3ffffffe
ja 0x101781c5
lea esi, [edx + edx + 2]
test esi, esi
js 0x101781c5
mov eax, dword [0x1044f00c]
mov dword [esp + 0x10], ecx
mov edi, edx
movzx eax, byte [eax]
mov eax, dword [0x1048f0f8]
test eax, eax
jne 0x10177cf1
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x101781b8
mov dword [0x1048f0f8], eax
push esi
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x101781b8
mov ecx, eax
mov eax, dword [esp + 0x50]
mov edx, dword [esp + 0xc]
mov esi, edi
mov dword [esp + 0x18], ecx
inc esi
inc eax
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 8]
mov dword [esp + 8], 1
mov word [ecx], ax
mov eax, ecx
mov ecx, dword [esp + 0x10]
jmp 0x10177d55
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 8]
mov word [eax + edi*2], cx
inc edi
mov ecx, dword [esp + 0x3c]
mov dword [esp + 8], edi
test ebx, ebx
je 0x10177dc0
test cx, cx
je 0x10177da0
xor edi, edi
cmp dword [esp + 8], esi
jne 0x10177d40
mov eax, dword [esp + 0x38]
mov dword [esp + 0x10], ecx
mov ecx, 0xffffffff
sub eax, ebx
add eax, 3
cmovb eax, ecx
xor ecx, ecx
shr eax, 2
test di, di
setne cl
cmp dx, 1
sbb ecx, 0xffffffff
add ecx, eax
inc ecx
add ecx, dword [esp + 8]
jae 0x10177deb
jmp 0x101781a2
cmp ebx, dword [esp + 0x38]
je 0x10177dc0
movzx ecx, byte [ebx]
test cl, cl
js 0x10177ea9
inc ebx
xor edi, edi
cmp dword [esp + 8], esi
jne 0x10177d40
jmp 0x10177d66
cmp dx, 1
jne 0x10177f80
mov edi, ecx
xor ecx, ecx
cmp dword [esp + 8], esi
jne 0x10177e40
xor edx, edx
mov dword [esp + 0x10], 0
xor ebx, ebx
inc ecx
add ecx, dword [esp + 8]
jb 0x101781a2
mov dword [esp + 0x1c], ebx
lea ebx, [esi + esi]
mov dword [esp + 0x3c], edi
mov edi, esi
mov eax, 4
mov dword [esp + 0xc], edx
cmp ebx, ecx
mov dword [esp + 0x14], edi
cmova ecx, ebx
cmp ecx, 5
mov esi, ecx
cmovb esi, eax
xor edx, edx
cmp esi, 0x40000000
lea eax, [esi + esi]
setb dl
add edx, edx
test edi, edi
je 0x10177e4d
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x60], ecx
mov ecx, 2
mov dword [esp + 0x68], ebx
jmp 0x10177e4f
xor edx, edx
xor ebx, ebx
mov dword [esp + 0x3c], edi
jmp 0x10177d44
xor ecx, ecx
mov dword [esp + 0x64], ecx
lea ebx, [esp + 0x60]
lea ecx, [esp + 0x40]
push ebx
push eax
call fcn.1014f7a0
add esp, 8
cmp dword [esp + 0x40], 0
mov eax, dword [esp + 0x44]
je 0x10177e94
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
cmp eax, 0x80000001
jne 0x1017819a
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
jmp 0x10177d44
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x18], eax
jmp 0x10177d44
mov dword [esp + 0x14], esi
movzx esi, byte [ebx + 1]
mov edi, ecx
mov dword [esp + 0x10], ecx
and edi, 0x1f
and esi, 0x3f
cmp cl, 0xdf
jbe 0x10177f08
movzx ecx, byte [ebx + 2]
shl esi, 6
mov dword [esp + 0xc], edx
and ecx, 0x3f
or ecx, esi
cmp byte [esp + 0x10], 0xf0
jb 0x10177f27
movzx esi, byte [ebx + 3]
and edi, 7
shl ecx, 6
add ebx, 4
shl edi, 0x12
and esi, 0x3f
or esi, ecx
or esi, edi
mov ecx, esi
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
cmp ecx, 0xffff
jbe 0x10177d5e
jmp 0x10177f43
shl edi, 6
add ebx, 2
or edi, esi
mov esi, dword [esp + 0x14]
mov ecx, edi
xor edi, edi
cmp dword [esp + 8], esi
jne 0x10177d40
jmp 0x10177d66
shl edi, 0xc
add ebx, 3
or ecx, edi
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0xc]
cmp ecx, 0xffff
jbe 0x10177d5e
mov dword [esp + 0x1c], ebx
mov edi, ecx
add ecx, 0xff0000
mov ebx, dword [esp + 0x1c]
shr ecx, 0xa
and edi, 0x3ff
or ecx, 0xd800
or edi, 0xdc00
cmp dword [esp + 8], esi
jne 0x10177d40
jmp 0x10177d66
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x48]
push dword [esp + 0xa0]
mov eax, dword [esp + 0x34]
mov ebx, eax
push eax
call sub.KERNEL32.dll_CreateNamedPipeW
mov edi, eax
cmp eax, 0xffffffff
jne 0x101780ab
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x8c]
cmp ecx, 0xa
jge 0x10178059
cmp eax, 5
jne 0x10177fe0
mov eax, ecx
mov dword [esp + 0x50], ecx
jmp 0x10177ff4
cmp dword [esp + 0x34], 0
je 0x10178059
cmp eax, 0x57
mov dword [esp + 0x34], 0
jne 0x10178059
xor eax, eax
test esi, esi
lea esi, [esp + 0x98]
je 0x10177ac0
push ebx
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
xor eax, eax
jmp 0x10177ac0
add ebx, 3
shl eax, 0xc
or ecx, eax
cmp ecx, 0xffff
jbe 0x10177c7a
mov esi, ecx
add ecx, 0xff0000
mov eax, 2
shr ecx, 0xa
and esi, 0x3ff
or ecx, 0xd800
or esi, 0xdc00
mov dword [esp + 8], ecx
jmp 0x10177c85
mov ecx, dword [esp + 0x30]
test esi, esi
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
je 0x1017807f
push ebx
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
cmp dword [esp + 0x24], 0
je 0x10178097
push dword [esp + 0x20]
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
cmp edi, 0xffffffff
je 0x1017815d
push edi
call sub.KERNEL32.dll_CloseHandle
jmp 0x1017815d
test esi, esi
je 0x101780bd
push ebx
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [esp + 0x84]
mov esi, dword [esp + 0x20]
mov dword [esp + 0x60], 0
mov dword [esp + 0x7c], 0
mov word [esp + 0x80], 0
xorps xmm0, xmm0
mov dword [esp + 0x40], 0xc
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], 1
mov byte [esp + 0x7d], al
xor al, 1
mov byte [esp + 0x7c], al
lea eax, [esp + 0x40]
movups xmmword [esp + 0x68], xmm0
mov dword [esp + 0x78], eax
mov edx, esi
lea eax, [esp + 0x60]
lea ecx, [esp + 0x54]
push eax
push dword [esp + 0x2c]
call fcn.101746e0
add esp, 8
movzx eax, byte [esp + 0x54]
cmp al, 4
jne 0x10178165
mov ecx, dword [esp + 0x30]
cmp dword [esp + 0x24], 0
mov eax, dword [esp + 0x58]
mov dword [ecx + 4], edi
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x1017815d
push esi
push 0
push dword [0x1048f0f8]
call sub.KERNEL32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x57]
mov edx, dword [esp + 0x30]
movzx ebx, word [esp + 0x55]
mov esi, dword [esp + 0x58]
mov byte [edx + 7], cl
mov word [edx + 5], bx
mov byte [edx + 4], al
mov dword [edx + 8], esi
mov dword [edx], 1
cmp dword [esp + 0x24], 0
jne 0x10178086
jmp 0x10178097
mov esi, dword [esp + 0x14]
test eax, eax
jne 0x101781a9
call fcn.1001ac40
jmp 0x101781ca
push dword [esp + 0x48]
push eax
call fcn.1001ac80
add esp, 8
jmp 0x101781ca
push esi
push 2
call fcn.1001ac80
add esp, 8
jmp 0x101781ca
call fcn.1001ac40
ud2