Function at 0x527300
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, 0xa0
mov eax, 0x40080002
mov bl, 1
lea esi, [esp + 0x88]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x74], edx
mov dword [esp + 0x40], 0
mov dword [esp + 0x28], 8
sub eax, edx
mov dword [esp + 0x78], eax
nop dword [eax + eax]
call sub.kernel32.dll_GetCurrentProcessId
mov dword [esp + 0x80], eax
mov eax, dword [0x5da104]
test eax, eax
je 0x527373
jmp 0x5273ac
mov eax, dword [esp + 0x50]
xchg dword [0x5da104], eax
mov eax, dword [0x5da104]
test eax, eax
jne 0x5273ac
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 0x527360
mov ecx, esi
call dbg.fallback_rng
mov eax, dword [esp + 0x88]
xchg dword [0x5da104], eax
mov eax, dword [0x5da104]
test eax, eax
je 0x527373
mov eax, 1
lea esi, [esp + 0x80]
lea edi, [esp + 0x84]
lock xadd dword [0x5da104], eax
mov dword [esp + 0x30], esi
lea esi, [esp + 0x30]
mov dword [esp + 0x34], sym.core::fmt::num::imp::__LT_impl_u20_core..fmt..Display_u20_for_u20_u32_GT_::fmt::ha05222cc52361d66
mov dword [esp + 0x38], edi
mov dword [esp + 0x50], 0x5bbca0
mov dword [esp + 0x54], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x3c], sym.core::fmt::num::imp::__LT_impl_u20_core..fmt..Display_u20_for_u20_u32_GT_::fmt::ha05222cc52361d66
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], 2
mov dword [esp + 0x84], eax
lea ecx, [esp + 0x44]
lea edx, [esp + 0x50]
call dbg.format_inner
cmp dword [esp + 0x1c], 0
movsd xmm0, qword [esp + 0x44]
mov eax, dword [esp + 0x4c]
sete cl
movsd qword [esp + 0x50], xmm0
mov dword [esp + 0x58], eax
or bl, cl
test bl, 1
jne 0x52744f
push dword [esp + 0x18]
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
movsd xmm0, qword [esp + 0x50]
mov eax, dword [esp + 0x58]
movsd qword [esp + 0x18], xmm0
test eax, eax
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0x18]
lea ecx, [ebx + eax]
mov dword [esp + 0x2c], ecx
je 0x527480
movzx ecx, byte [ebx]
test cl, cl
js 0x5274a0
inc ebx
jmp 0x5274fa
mov dword [esp + 4], 0
mov dword [esp + 8], 0
xor ecx, ecx
xor ebx, ebx
xor edi, edi
jmp 0x527525
movzx edx, byte [ebx + 1]
mov eax, ecx
and eax, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x5274f0
mov esi, ecx
movzx ecx, byte [ebx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
mov edx, esi
cmp dl, 0xf0
jb 0x52786c
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 0x5274fa
jmp 0x527880
shl eax, 6
add ebx, 2
or eax, edx
mov ecx, eax
mov dword [esp + 8], ecx
mov eax, 1
mov dword [esp + 4], 0
mov edi, dword [esp + 0x2c]
mov ecx, 0xffffffff
sub edi, ebx
add edi, 3
cmovb edi, ecx
mov cx, 1
shr edi, 2
add edi, eax
cmp edi, 4
mov eax, 3
cmovb edi, eax
cmp edi, 0x3ffffffe
ja 0x527a1a
lea edx, [edi + edi + 2]
test edx, edx
js 0x527a1a
mov dword [esp + 0xc], ecx
movzx eax, byte [0x5da16c]
mov eax, dword [0x5da100]
mov dword [esp], edx
test eax, eax
jne 0x527574
call sub.kernel32.dll_GetProcessHeap
test eax, eax
je 0x527a0b
mov dword [0x5da100], eax
mov edx, dword [esp]
push edx
push 0
push eax
call sub.kernel32.dll_HeapAlloc
test eax, eax
je 0x527a0b
mov esi, eax
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0xc]
inc edi
mov ecx, esi
inc eax
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 8]
mov dword [esp + 8], 1
mov word [esi], ax
mov eax, dword [esp + 4]
jmp 0x5275cc
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 8]
mov word [ecx + edi*2], ax
inc edi
mov eax, dword [esp + 0x10]
mov dword [esp + 8], edi
mov edi, esi
mov esi, dword [esp]
test ebx, ebx
mov dword [esp], esi
je 0x527640
test ax, ax
je 0x527620
xor esi, esi
cmp dword [esp + 8], edi
jne 0x5275b0
mov dword [esp + 4], eax
mov eax, dword [esp + 0x2c]
mov ecx, 0xffffffff
sub eax, ebx
add eax, 3
cmovb eax, ecx
shr eax, 2
cmp si, 1
sbb eax, 0xffffffff
cmp dx, 1
sbb eax, 0xffffffff
inc eax
add eax, dword [esp + 8]
jae 0x52766d
jmp 0x5279f9
cmp ebx, dword [esp + 0x2c]
je 0x527640
movzx eax, byte [ebx]
test al, al
js 0x527728
inc ebx
jmp 0x5275d8
cmp dx, 1
jne 0x5277e0
mov ebx, eax
xor eax, eax
cmp dword [esp + 8], edi
jne 0x5276c0
mov esi, ebx
xor edx, edx
xor ebx, ebx
mov dword [esp + 4], 0
inc eax
add eax, dword [esp + 8]
jb 0x5279f9
lea ecx, [edi + edi]
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], edx
mov dword [esp + 0x14], edi
cmp ecx, eax
cmova eax, ecx
cmp eax, 5
mov esi, eax
mov eax, 4
cmovb esi, eax
xor edx, edx
cmp esi, 0x40000000
lea eax, [esi + esi]
setb dl
add edx, edx
test edi, edi
je 0x5276cf
mov edi, ebx
mov ebx, dword [esp]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x58], ecx
mov ecx, 2
jmp 0x5276d3
mov dword [esp + 0x10], ebx
mov esi, edi
xor ebx, ebx
xor edx, edx
jmp 0x5275b6
mov edi, ebx
xor ecx, ecx
mov dword [esp + 0x54], ecx
lea ecx, [esp + 0x30]
lea ebx, [esp + 0x50]
push ebx
push eax
call sym.alloc::raw_vec::finish_grow::h08d8585e04d9ec33
add esp, 8
cmp dword [esp + 0x30], 0
mov ecx, dword [esp + 0x34]
je 0x527716
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 4]
cmp ecx, 0x80000001
jne 0x5279f1
mov esi, dword [esp + 0x14]
mov ecx, dword [esp]
mov ebx, edi
jmp 0x5275b6
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 4]
mov dword [esp], ecx
mov ebx, edi
jmp 0x5275b6
mov esi, eax
mov dword [esp + 4], eax
and esi, 0x1f
mov dword [esp + 0x14], esi
movzx esi, byte [ebx + 1]
and esi, 0x3f
cmp al, 0xdf
mov dword [esp + 0x10], esi
jbe 0x52778d
mov esi, dword [esp + 0x10]
mov dword [esp + 0xc], edx
movzx edx, byte [ebx + 2]
mov eax, dword [esp + 0x14]
shl esi, 6
and edx, 0x3f
or edx, esi
cmp byte [esp + 4], 0xf0
jb 0x5277a2
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
mov edx, dword [esp + 0xc]
cmp eax, 0xffff
jbe 0x5275d8
jmp 0x5277bb
mov eax, dword [esp + 0x14]
add ebx, 2
xor esi, esi
shl eax, 6
add eax, dword [esp + 0x10]
jmp 0x5275da
shl eax, 0xc
add ebx, 3
or edx, eax
mov eax, edx
mov edx, dword [esp + 0xc]
cmp eax, 0xffff
jbe 0x5275d8
mov esi, eax
add eax, 0xff0000
shr eax, 0xa
and esi, 0x3ff
or eax, 0xd800
or esi, 0xdc00
jmp 0x5275da
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x3c]
push dword [esp + 0x90]
push esi
call sub.kernel32.dll_CreateNamedPipeW
mov ebx, eax
cmp eax, 0xffffffff
jne 0x527906
call sub.kernel32.dll_GetLastError
mov ecx, dword [esp + 0x7c]
cmp ecx, 0xa
jge 0x5278ad
cmp eax, 5
jne 0x527830
mov eax, ecx
mov dword [esp + 0x40], ecx
jmp 0x527844
cmp dword [esp + 0x28], 0
je 0x5278ad
cmp eax, 0x57
mov dword [esp + 0x28], 0
jne 0x5278ad
xor ebx, ebx
test edi, edi
lea esi, [esp + 0x88]
je 0x527340
push dword [esp]
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
xor ebx, ebx
jmp 0x527340
add ebx, 3
shl eax, 0xc
or ecx, eax
cmp ecx, 0xffff
jbe 0x5274fa
mov eax, ecx
add ecx, 0xff0000
and eax, 0x3ff
shr ecx, 0xa
or eax, 0xdc00
mov dword [esp + 4], eax
mov eax, 2
or ecx, 0xd800
mov dword [esp + 8], ecx
jmp 0x52750b
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 0x5278da
push dword [esp]
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
cmp dword [esp + 0x1c], 0
je 0x5278f2
push dword [esp + 0x18]
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
cmp ebx, 0xffffffff
je 0x5279b2
push esi
call sub.kernel32.dll_CloseHandle
jmp 0x5279b2
test edi, edi
je 0x527918
push esi
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
mov eax, dword [esp + 0x74]
mov esi, dword [esp + 0x18]
mov dword [esp + 0x50], 0
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], 0
xorps xmm0, xmm0
mov dword [esp + 0x30], 0xc
mov dword [esp + 0x34], 0
mov dword [esp + 0x38], 1
mov byte [esp + 0x6d], al
xor al, 1
mov byte [esp + 0x6c], al
lea eax, [esp + 0x30]
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x68], eax
mov edx, esi
lea eax, [esp + 0x50]
lea ecx, [esp + 0x44]
push eax
push dword [esp + 0x24]
call dbg.open
add esp, 8
movzx eax, byte [esp + 0x44]
cmp al, 4
jne 0x5279ba
mov ecx, dword [esp + 0x24]
cmp dword [esp + 0x1c], 0
mov eax, dword [esp + 0x48]
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x5279b2
push esi
push 0
push dword [0x5da100]
call sub.kernel32.dll_HeapFree
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x47]
mov edx, dword [esp + 0x24]
movzx edi, word [esp + 0x45]
mov esi, dword [esp + 0x48]
mov byte [edx + 7], cl
mov word [edx + 5], di
mov byte [edx + 4], al
mov dword [edx + 8], esi
mov dword [edx], 1
mov esi, ebx
cmp dword [esp + 0x1c], 0
jne 0x5278e1
jmp 0x5278f2
mov edi, dword [esp + 0x14]
test ecx, ecx
jne 0x527a00
call sym.alloc::raw_vec::capacity_overflow::h894971bc65aab54c
jmp 0x527a1f
mov edx, dword [esp + 0x38]
call dbg.handle_alloc_error
jmp 0x527a1f
mov edx, dword [esp]
mov ecx, 2
call dbg.handle_alloc_error
jmp 0x527a1f
call sym.alloc::raw_vec::capacity_overflow::h894971bc65aab54c
ud2