Function at 0x10076fd0
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 sub.KERNEL32.dll_GetCurrentProcessId
mov dword [esp + 0x88], eax
mov eax, dword [0x101120fc]
test eax, eax
je 0x10077043
jmp 0x10077081
mov eax, dword [esp + 0x50]
xchg dword [0x101120fc], eax
mov eax, dword [0x101120fc]
test eax, eax
jne 0x10077081
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 0x10077030
lea ecx, [esp + 0x98]
call fcn.1007d0a0
mov eax, dword [esp + 0x98]
xchg dword [0x101120fc], eax
mov eax, dword [0x101120fc]
test eax, eax
je 0x10077043
mov eax, 1
lock xadd dword [0x101120fc], eax
mov dword [esp + 0x50], 0x100ddd14
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.100bfe40
mov dword [esp + 0x40], eax
lea eax, [esp + 0x38]
mov dword [esp + 0x44], fcn.100bfe40
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], 2
lea eax, [esp + 0x50]
push eax
lea eax, [esp + 0x90]
push eax
call fcn.100a4530
add esp, 8
mov ecx, dword [esp + 0x18]
test ecx, ecx
sete al
or bl, al
test bl, 1
jne 0x10077111
push 1
push ecx
push dword [esp + 0x1c]
call fcn.10004680
add esp, 0xc
mov ecx, dword [esp + 0x94]
mov esi, dword [esp + 0x8c]
mov eax, dword [esp + 0x90]
lea edx, [esi + ecx]
test ecx, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], eax
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x2c], edx
je 0x10077150
movzx eax, byte [esi]
test al, al
js 0x10077170
lea ecx, [esi + 1]
mov ebx, eax
mov dword [esp + 0xc], ecx
jmp 0x100771c8
mov dword [esp + 0x1c], 0
xor ebx, ebx
xor eax, eax
mov dword [esp + 0xc], 0
xor edx, edx
jmp 0x100771f1
movzx edx, byte [esi + 1]
mov ebx, eax
and ebx, 0x1f
and edx, 0x3f
cmp al, 0xdf
jbe 0x100771bc
movzx ecx, byte [esi + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp al, 0xf0
jb 0x10077523
movzx edx, byte [esi + 3]
and ebx, 7
shl ecx, 6
lea eax, [esi + 4]
shl ebx, 0x12
mov dword [esp + 0xc], eax
and edx, 0x3f
or edx, ecx
or ebx, edx
cmp ebx, 0xffff
jbe 0x100771c8
jmp 0x1007753b
shl ebx, 6
lea eax, [esi + 2]
mov dword [esp + 0xc], eax
or ebx, edx
mov eax, 1
mov dword [esp + 0x1c], 0
mov edx, dword [esp + 0x2c]
mov ecx, 0xffffffff
sub edx, dword [esp + 0xc]
add edx, 3
cmovb edx, ecx
shr edx, 2
add edx, eax
mov ax, 1
cmp edx, 4
mov ecx, 3
mov dword [esp + 8], eax
cmovb edx, ecx
cmp edx, 0x3ffffffe
ja 0x100776db
lea esi, [edx + edx + 2]
test esi, esi
js 0x100776db
mov eax, dword [0x100f5654]
mov edi, edx
movzx eax, byte [eax]
push 2
push esi
call fcn.10004670
add esp, 8
test eax, eax
je 0x100776c6
mov ecx, eax
mov eax, dword [esp + 0x48]
mov edx, dword [esp + 0xc]
mov esi, edi
mov word [ecx], bx
mov dword [esp + 0x20], ecx
inc esi
mov ebx, 1
inc eax
mov dword [esp + 0x84], eax
mov eax, ecx
mov ecx, dword [esp + 0x1c]
jmp 0x1007726b
mov ecx, edi
mov edi, dword [esp + 4]
mov word [eax + ebx*2], di
inc ebx
test edx, edx
je 0x100772d0
test cx, cx
je 0x100772b0
xor edi, edi
mov dword [esp + 4], ecx
cmp ebx, esi
jne 0x10077260
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0x2c]
mov eax, 0xffffffff
mov ecx, edi
sub esi, edx
add esi, 3
cmovb esi, eax
shr esi, 2
cmp di, 1
mov edi, dword [esp + 4]
sbb esi, 0xffffffff
cmp word [esp + 8], 1
sbb esi, 0xffffffff
jmp 0x100772f8
cmp edx, dword [esp + 0x2c]
je 0x100772d0
movzx ecx, byte [edx]
test cl, cl
js 0x100773c4
inc edx
mov dword [esp + 4], ecx
xor edi, edi
cmp ebx, esi
jne 0x10077260
jmp 0x1007727e
cmp word [esp + 8], 1
jne 0x10077490
xor edx, edx
mov dword [esp + 0x10], esi
cmp ebx, esi
mov edi, 0
mov esi, 0
mov dword [esp + 8], 0
jne 0x10077350
inc esi
add esi, ebx
jb 0x100776b0
mov dword [esp + 4], edi
mov edi, dword [esp + 0x10]
mov dword [esp + 0x1c], ecx
mov ecx, 4
mov dword [esp + 0xc], edx
mov dword [esp + 0x4c], ebx
lea eax, [edi + 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 0x1007735b
mov edi, dword [esp + 0x20]
mov dword [esp + 0x50], edi
mov dword [esp + 0x54], 2
mov dword [esp + 0x58], eax
jmp 0x10077363
mov esi, dword [esp + 0x10]
xor edi, edi
jmp 0x10077266
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.1003eda0
add esp, 8
cmp dword [esp + 0x38], 0
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 4]
je 0x100773af
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
cmp eax, 0x80000001
jne 0x100776ac
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0xc]
jmp 0x10077266
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x4c]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x20], eax
jmp 0x10077266
mov dword [esp + 0x10], esi
movzx esi, byte [edx + 1]
mov edi, ecx
and edi, 0x1f
and esi, 0x3f
cmp cl, 0xdf
jbe 0x1007742a
mov dword [esp + 4], edi
movzx edi, byte [edx + 2]
shl esi, 6
and edi, 0x3f
or edi, esi
cmp cl, 0xf0
jb 0x10077449
mov esi, dword [esp + 4]
movzx ecx, byte [edx + 3]
shl edi, 6
add edx, 4
and esi, 7
and ecx, 0x3f
shl esi, 0x12
or ecx, edi
mov edi, esi
or edi, ecx
mov esi, dword [esp + 0x10]
cmp edi, 0xffff
ja 0x10077463
mov dword [esp + 4], edi
xor edi, edi
cmp ebx, esi
jne 0x10077260
jmp 0x1007727e
shl edi, 6
add edx, 2
or edi, esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], edi
xor edi, edi
cmp ebx, esi
je 0x1007727e
jmp 0x10077260
mov ecx, dword [esp + 4]
add edx, 3
shl ecx, 0xc
or ecx, edi
mov edi, ecx
mov esi, dword [esp + 0x10]
cmp edi, 0xffff
jbe 0x10077417
lea ecx, [edi + 0xff0000]
and edi, 0x3ff
shr ecx, 0xa
or edi, 0xdc00
or ecx, 0xd800
mov dword [esp + 4], ecx
cmp ebx, esi
jne 0x10077260
jmp 0x1007727e
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x3c]
push dword [esp + 0x98]
mov eax, dword [esp + 0x3c]
mov edi, eax
push eax
call sub.KERNEL32.dll_CreateNamedPipeW
mov ebx, eax
cmp eax, 0xffffffff
jne 0x100775b9
call sub.KERNEL32.dll_GetLastError
mov ecx, dword [esp + 0x84]
cmp ecx, 9
jg 0x10077568
cmp eax, 5
jne 0x100774f0
mov eax, ecx
mov dword [esp + 0x48], ecx
jmp 0x10077504
cmp dword [esp + 0x28], 0
je 0x10077568
cmp eax, 0x57
mov dword [esp + 0x28], 0
jne 0x10077568
xor ebx, ebx
test esi, esi
je 0x10077010
add esi, esi
push 2
push esi
push edi
call fcn.10004680
add esp, 0xc
xor ebx, ebx
jmp 0x10077010
shl ebx, 0xc
lea eax, [esi + 3]
mov dword [esp + 0xc], eax
or ebx, ecx
cmp ebx, 0xffff
jbe 0x100771c8
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
or ecx, 0xd800
mov edx, ebx
mov ebx, ecx
mov dword [esp + 0x1c], edx
jmp 0x100771d5
mov ecx, dword [esp + 0x24]
test esi, esi
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
je 0x1007758e
add esi, esi
push 2
push esi
push edi
call fcn.10004680
add esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x100775a5
push 1
push eax
push dword [esp + 0x1c]
call fcn.10004680
add esp, 0xc
cmp ebx, 0xffffffff
je 0x1007766e
push ebx
call sub.KERNEL32.dll_CloseHandle
jmp 0x1007766e
test esi, esi
je 0x100775cb
add esi, esi
push 2
push esi
push edi
call fcn.10004680
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 + 4], eax
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x50]
lea ecx, [esp + 0x30]
push eax
push dword [esp + 0x80]
call fcn.1006ff00
add esp, 8
movzx eax, byte [esp + 0x30]
cmp al, 4
jne 0x10077676
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x34]
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x18]
mov dword [ecx], 0
test eax, eax
je 0x1007766e
push 1
push eax
push dword [esp + 0x1c]
call fcn.10004680
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]
movzx edi, word [esp + 0x31]
mov esi, dword [esp + 0x34]
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 eax, dword [esp + 0x18]
test eax, eax
jne 0x10077596
jmp 0x100775a5
test eax, eax
jne 0x100776b7
call fcn.100a3290
jmp 0x100776e8
push dword [esp + 0x40]
push eax
call fcn.100a32d0
add esp, 8
jmp 0x100776e8
mov dword [esp + 4], 0
push esi
push 2
call fcn.100a32d0
add esp, 8
jmp 0x100776e8
mov dword [esp + 4], 0
call fcn.100a3290
ud2