Function at 0x54f580
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 + 0x4c], 0
mov dword [esp + 0x28], 8
sub eax, edx
mov dword [esp + 0x80], eax
jmp 0x54f5d2
mov eax, edx
mov dword [esp + 0x4c], edx
mov edx, 2
call fcn.004256e0
xor ebx, ebx
call sub.KERNEL32.DLL_GetCurrentProcessId
mov dword [esp + 0x88], eax
jmp 0x54f5ea
mov eax, dword [esp + 0x50]
xchg dword [0x706124], eax
mov eax, dword [0x706124]
test eax, eax
jne 0x54f630
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 0x54f5e0
lea ecx, [esp + 0x98]
call fcn.005503e0
mov eax, dword [esp + 0x98]
xchg dword [0x706124], eax
jmp 0x54f5ea
mov eax, 1
lea esi, [esp + 0x3c]
lock xadd dword [0x706124], eax
mov dword [esp + 0x50], 0x69da28
mov dword [esp + 0x54], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], 2
mov dword [esp + 0x34], eax
lea eax, [esp + 0x88]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x40], fcn.0043a0b0
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], fcn.0043a0b0
lea ecx, [esp + 0x8c]
lea edx, [esp + 0x50]
call fcn.004348c0
cmp dword [esp + 0x20], 0
sete al
or bl, al
test bl, 1
jne 0x54f6b7
mov ecx, edi
mov edx, 1
call fcn.004256e0
mov ecx, dword [esp + 0x94]
mov edi, dword [esp + 0x90]
mov eax, dword [esp + 0x8c]
lea edx, [edi + ecx]
test ecx, ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x2c], edx
je 0x54f700
movzx ebx, byte [edi]
test bl, bl
js 0x54f730
lea eax, [edi + 1]
mov dword [esp + 8], eax
jmp 0x54f78c
mov edx, edi
mov dword [esp + 4], 0
xor ebx, ebx
mov dword [esp + 0x14], 0
mov dword [esp + 8], 0
xor esi, esi
jmp 0x54f7bb
movzx edx, byte [edi + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x54f77e
movzx ecx, byte [edi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x54faac
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 0x54f78c
jmp 0x54fac6
shl eax, 6
lea ecx, [edi + 2]
or eax, edx
mov dword [esp + 8], ecx
mov ebx, eax
mov edx, edi
mov eax, 1
mov dword [esp + 4], 0
mov esi, dword [esp + 0x2c]
mov ecx, 0xffffffff
sub esi, dword [esp + 8]
add esi, 3
cmovb esi, ecx
shr esi, 2
add esi, eax
mov ax, 1
mov dword [esp + 0x14], eax
cmp esi, 4
mov eax, 3
cmovb esi, eax
cmp esi, 0x3ffffffe
ja 0x54fc65
lea ecx, [esi + esi + 2]
test ecx, ecx
js 0x54fc65
mov dword [esp + 0x1c], edx
mov edi, ebx
movzx eax, byte [0x706188]
mov edx, 2
mov ebx, ecx
call fcn.00425680
test eax, eax
je 0x54fc4b
mov ecx, eax
mov eax, dword [esp + 0x4c]
mov ebx, dword [esp + 8]
inc esi
mov dword [esp + 0x10], 1
mov word [ecx], di
mov edi, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
inc eax
mov dword [esp + 0x84], eax
jmp 0x54f843
mov esi, dword [esp + 0x18]
xor edx, edx
mov eax, dword [esp + 0x10]
mov word [ecx + eax*2], dx
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 4]
test ebx, ebx
je 0x54f8c0
test ax, ax
je 0x54f8a0
xor edx, edx
mov dword [esp + 0xc], eax
cmp dword [esp + 0x10], esi
jne 0x54f890
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x2c]
mov ecx, 0xffffffff
mov eax, edx
sub esi, ebx
add esi, 3
cmovb esi, ecx
shr esi, 2
cmp dx, 1
mov edx, dword [esp + 0xc]
sbb esi, 0xffffffff
cmp di, 1
sbb esi, 0xffffffff
jmp 0x54f8ec
mov eax, edx
mov dword [esp + 4], eax
jmp 0x54f98d
cmp ebx, dword [esp + 0x2c]
je 0x54f8c0
movzx edx, byte [ebx]
test dl, dl
js 0x54f996
mov dword [esp + 0xc], edx
inc ebx
xor edx, edx
jmp 0x54f856
cmp di, 1
jne 0x54fa40
mov eax, esi
xor ebx, ebx
xor edi, edi
mov eax, dword [esp + 4]
cmp dword [esp + 0x10], esi
mov dword [esp + 0x18], esi
mov edx, 0
mov esi, 0
jne 0x54f830
inc esi
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x30]
add esi, dword [esp + 0x10]
jb 0x54fc39
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov ecx, 4
mov dword [esp + 0xc], edx
mov dword [esp + 0x50], edi
mov dword [esp + 8], ebx
mov dword [esp + 0x54], 2
add eax, eax
cmp eax, esi
mov dword [esp + 0x58], eax
cmova esi, eax
cmp esi, 5
cmovb esi, ecx
xor edx, edx
cmp esi, 0x40000000
lea eax, [esi + esi]
setb dl
add edx, edx
lea ecx, [esp + 0x3c]
lea ebx, [esp + 0x50]
push ebx
push eax
call fcn.00449e70
add esp, 8
cmp dword [esp + 0x3c], 0
mov ecx, dword [esp + 0x40]
je 0x54f981
mov edx, dword [esp + 0xc]
cmp ecx, 0x80000001
jne 0x54fc35
mov ecx, edi
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0x14]
jmp 0x54f836
mov ebx, dword [esp + 8]
mov edi, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov edx, dword [esp + 0xc]
jmp 0x54f836
mov dword [esp + 0x18], esi
movzx esi, byte [ebx + 1]
mov eax, edx
and eax, 0x1f
and esi, 0x3f
cmp dl, 0xdf
jbe 0x54f9d9
mov dword [esp + 0x14], edi
movzx edi, byte [ebx + 2]
shl esi, 6
and edi, 0x3f
or edi, esi
cmp dl, 0xf0
jb 0x54f9ec
movzx esi, byte [ebx + 3]
shl edi, 6
and eax, 7
add ebx, 4
shl eax, 0x12
and esi, 0x3f
or esi, edi
mov edi, esi
jmp 0x54f9f2
shl eax, 6
add ebx, 2
xor edx, edx
or eax, esi
mov esi, dword [esp + 0x18]
jmp 0x54f852
add ebx, 3
shl eax, 0xc
mov esi, dword [esp + 0x18]
or edi, eax
cmp edi, 0xffff
jbe 0x54fa25
lea eax, [edi + 0xff0000]
and edi, 0x3ff
or edi, 0xdc00
shr eax, 0xa
mov edx, edi
mov edi, dword [esp + 0x14]
or eax, 0xd800
jmp 0x54f852
mov dword [esp + 0xc], edi
mov edi, dword [esp + 0x14]
xor edx, edx
jmp 0x54f856
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x3c]
push dword [esp + 0x98]
mov eax, dword [esp + 0x4c]
mov esi, eax
push eax
call sub.KERNEL32.DLL_CreateNamedPipeW
mov ebx, eax
cmp eax, 0xffffffff
jne 0x54fb3d
call sub.KERNEL32.DLL_GetLastError
mov edx, dword [esp + 0x84]
mov edi, dword [esp + 0x1c]
mov ecx, esi
cmp edx, 9
jg 0x54faf3
cmp eax, 5
je 0x54f5c0
cmp dword [esp + 0x28], 0
je 0x54faf3
cmp eax, 0x57
mov dword [esp + 0x28], 0
je 0x54f5c6
jmp 0x54faf3
shl eax, 0xc
lea edx, [edi + 3]
or ecx, eax
mov dword [esp + 8], edx
mov ebx, ecx
cmp ebx, 0xffff
jbe 0x54f78c
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov edx, edi
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
mov dword [esp + 4], ebx
or ecx, 0xd800
mov ebx, ecx
jmp 0x54f79b
mov edx, dword [esp + 0x24]
mov dword [edx + 8], eax
mov dword [edx + 4], 0
mov dword [edx], 1
mov edx, 2
call fcn.004256e0
mov esi, 0xffffffff
cmp dword [esp + 0x20], 0
je 0x54fb29
mov ecx, edi
mov edx, 1
call fcn.004256e0
cmp ebx, 0xffffffff
je 0x54fbf2
push esi
call sub.KERNEL32.DLL_CloseHandle
jmp 0x54fbf2
mov dword [esp + 0x10], ebx
mov ecx, esi
mov edx, 2
call fcn.004256e0
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 + 0x3c], 0xc
mov dword [esp + 0x40], 0
mov dword [esp + 0x44], 1
mov byte [esp + 0x6d], al
xor al, 1
mov byte [esp + 0x6c], al
lea eax, [esp + 0x3c]
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x68], eax
mov al, 1
mov dword [esp + 4], eax
mov edi, dword [esp + 0x1c]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x34]
mov edx, edi
push eax
push dword [esp + 0x80]
call fcn.00540550
add esp, 8
movzx eax, byte [esp + 0x34]
cmp al, 4
jne 0x54fbfa
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x10]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x54fbf2
mov ecx, edi
mov edx, 1
call fcn.004256e0
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [esp + 0x24]
movzx ebx, word [esp + 0x35]
movzx ecx, byte [esp + 0x37]
mov esi, dword [esp + 0x38]
mov word [edx + 5], bx
mov ebx, dword [esp + 0x10]
mov byte [edx + 7], cl
mov byte [edx + 4], al
mov dword [edx + 8], esi
mov dword [edx], 1
mov esi, ebx
cmp dword [esp + 0x20], 0
jne 0x54fb1d
jmp 0x54fb29
test ecx, ecx
jne 0x54fc40
call fcn.004341f0
jmp 0x54fc74
mov edx, dword [esp + 0x44]
call fcn.00434230
jmp 0x54fc74
mov dword [esp + 4], 0
mov edi, dword [esp + 0x1c]
mov ecx, 2
mov edx, ebx
call fcn.00434230
jmp 0x54fc74
mov dword [esp + 4], 0
mov edi, edx
call fcn.004341f0
ud2