Function at 0x4a15a0
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xa0
mov ebx, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
mov eax, 0x40080002
lea edi, [esp + 0x50]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x7c], edx
mov dword [esp + 4], 0
mov dword [esp + 0x2c], 8
mov dword [esp + 0x4c], 0
sub eax, edx
mov dword [esp + 0x84], eax
nop word [eax + eax]
call fcn.004f1e3c
mov dword [esp + 0x8c], eax
xorps xmm0, xmm0
mov eax, dword [0x5c9158]
test eax, eax
jne 0x4a162f
nop dword [eax + eax]
movaps xmmword [esp + 0x50], xmm0
push 0x10
push edi
call ebx
mov eax, dword [esp + 0x50]
xorps xmm0, xmm0
mov dword [0x5c9158], eax
mov eax, dword [0x5c9158]
test eax, eax
je 0x4a1610
mov eax, 1
lock xadd dword [0x5c9158], eax
mov dword [esp + 0x50], 0x587528
mov dword [esp + 0x54], 2
mov dword [esp + 0x60], 0
mov dword [esp + 0x34], eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x34]
mov dword [esp + 0x40], fcn.004eb5f0
mov dword [esp + 0x44], eax
lea eax, [esp + 0x3c]
mov dword [esp + 0x48], fcn.004eb5f0
mov dword [esp + 0x58], eax
mov dword [esp + 0x5c], 2
push edi
lea eax, [esp + 0x94]
push eax
call fcn.004d0480
add esp, 8
mov ecx, dword [esp + 4]
test esi, esi
setne al
and cl, al
cmp cl, 1
jne 0x4a16bb
push 1
push esi
push dword [esp + 0x14]
call fcn.0040cd20
add esp, 0xc
mov edx, dword [esp + 0x98]
mov ecx, dword [esp + 0x94]
mov eax, dword [esp + 0x90]
lea esi, [ecx + edx]
test edx, edx
mov dword [esp + 0x80], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x18], eax
mov dword [esp + 0x30], esi
je 0x4a1700
movzx eax, byte [ecx]
test al, al
js 0x4a1730
lea edx, [ecx + 1]
mov esi, eax
jmp 0x4a1784
mov dword [esp + 0x10], 0
mov esi, 4
mov edi, 8
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], 0
mov dword [esp + 8], 0
jmp 0x4a17d3
movzx edx, byte [ecx + 1]
mov esi, eax
and esi, 0x1f
and edx, 0x3f
cmp al, 0xdf
jbe 0x4a177a
mov edi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp al, 0xf0
jb 0x4a1ade
movzx eax, byte [edi + 3]
and esi, 7
shl ecx, 6
lea edx, [edi + 4]
shl esi, 0x12
and eax, 0x3f
or eax, ecx
or esi, eax
cmp esi, 0xffff
jbe 0x4a1784
jmp 0x4a1af2
shl esi, 6
lea eax, [ecx + 2]
or esi, edx
mov edx, eax
mov dword [esp + 8], esi
mov eax, 1
mov dword [esp + 0x10], 0
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
mov esi, 3
sub ecx, edx
mov edx, 0xffffffff
add ecx, 3
cmovb ecx, edx
shr ecx, 2
add ecx, eax
cmp ecx, 4
cmovae esi, ecx
cmp ecx, 0x3ffffffe
lea edi, [esi + esi + 2]
ja 0x4a1c8b
inc esi
mov ax, 1
mov dword [esp + 0x24], eax
mov eax, dword [0x59fb24]
movzx eax, byte [eax]
push 2
push edi
call fcn.0040cd10
add esp, 8
test eax, eax
je 0x4a1c84
mov ecx, eax
mov eax, dword [esp + 0x4c]
mov edx, dword [esp + 0x1c]
mov edi, ecx
inc eax
mov dword [esp + 0x88], eax
mov eax, dword [esp + 8]
mov dword [esp + 8], esi
mov esi, dword [esp + 0x10]
mov word [ecx], ax
mov ecx, 1
jmp 0x4a1835
mov esi, eax
mov eax, dword [esp + 4]
mov dword [esp + 8], ebx
mov ebx, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
mov word [edi + ecx*2], ax
inc ecx
test edx, edx
je 0x4a18a0
test si, si
je 0x4a1880
mov ebx, dword [esp + 8]
xor eax, eax
mov dword [esp + 4], esi
cmp ecx, ebx
jne 0x4a1820
mov esi, edi
mov edi, ecx
mov ecx, dword [esp + 0x30]
mov dword [esp + 0x1c], edx
movzx ebx, word [esp + 0x24]
sub ecx, edx
mov edx, 0xffffffff
add ecx, 3
cmovb ecx, edx
shr ecx, 2
cmp ax, 1
mov dword [esp + 0x10], eax
sbb ecx, 0xffffffff
add ecx, ebx
jmp 0x4a18d7
cmp edx, dword [esp + 0x30]
je 0x4a18a0
movzx eax, byte [edx]
test al, al
js 0x4a1992
mov ebx, dword [esp + 8]
mov dword [esp + 4], eax
inc edx
xor eax, eax
jmp 0x4a1848
cmp word [esp + 0x24], 1
jne 0x4a1a40
cmp ecx, dword [esp + 8]
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, ecx
mov ecx, 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 4], 0
jne 0x4a1940
lea edx, [ecx + 1]
xor eax, eax
mov dword [esp + 0x14], esi
add edx, edi
jb 0x4a1c6a
mov dword [esp + 0x20], edi
lea ebx, [ecx + edi + 1]
mov edi, dword [esp + 8]
lea ecx, [edi + edi]
cmp ecx, ebx
cmova ebx, ecx
cmp ebx, 5
jae 0x4a1906
mov ebx, 4
test ebx, ebx
js 0x4a1c6e
lea esi, [ebx + ebx]
cmp esi, 0x7ffffffe
ja 0x4a1c78
test edi, edi
je 0x4a1955
mov eax, dword [esp + 0x14]
mov dword [esp + 0x50], eax
mov eax, 2
mov dword [esp + 0x58], ecx
jmp 0x4a1957
mov ecx, edi
mov edi, esi
mov ebx, dword [esp + 8]
mov esi, dword [esp + 0x10]
xor eax, eax
xor edx, edx
jmp 0x4a1826
xor eax, eax
mov dword [esp + 0x54], eax
lea eax, [esp + 0x50]
lea ecx, [esp + 0x3c]
mov edx, 2
push eax
push esi
call fcn.0046d510
add esp, 8
cmp dword [esp + 0x3c], 1
je 0x4a1c70
mov edi, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
jmp 0x4a1822
mov ebx, edx
movzx edx, byte [edx + 1]
mov esi, eax
and esi, 0x1f
and edx, 0x3f
cmp al, 0xdf
jbe 0x4a19ed
mov dword [esp + 0x20], ecx
movzx ecx, byte [ebx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp al, 0xf0
jb 0x4a1a02
movzx eax, byte [ebx + 3]
and esi, 7
shl ecx, 6
add ebx, 4
shl esi, 0x12
and eax, 0x3f
or eax, ecx
or esi, eax
mov eax, esi
mov edx, ebx
mov ebx, dword [esp + 8]
cmp eax, 0xffff
ja 0x4a1a19
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
xor eax, eax
jmp 0x4a1848
shl esi, 6
add ebx, 2
xor eax, eax
or esi, edx
mov edx, ebx
mov ebx, dword [esp + 8]
jmp 0x4a1844
mov eax, esi
add ebx, 3
shl eax, 0xc
or eax, ecx
mov edx, ebx
mov ebx, dword [esp + 8]
cmp eax, 0xffff
jbe 0x4a19de
lea ecx, [eax + 0xff0000]
and eax, 0x3ff
shr ecx, 0xa
or eax, 0xdc00
or ecx, 0xd800
mov dword [esp + 4], ecx
mov ecx, dword [esp + 0x20]
jmp 0x4a1848
mov esi, dword [esp + 8]
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x40]
push dword [esp + 0x9c]
mov dword [esp + 0x30], edi
push edi
call sub.kernel32.dll_CreateNamedPipeW
cmp eax, 0xffffffff
mov dword [esp + 4], eax
jne 0x4a1b74
call sub.kernel32.dll_GetLastError
mov ecx, dword [esp + 0x88]
lea edi, [esp + 0x50]
cmp ecx, 9
jg 0x4a1b1f
cmp eax, 5
jne 0x4a1aa0
mov dword [esp + 0x4c], ecx
jmp 0x4a1ab4
cmp dword [esp + 0x2c], 0
je 0x4a1b1f
cmp eax, 0x57
mov dword [esp + 0x2c], 0
jne 0x4a1b1f
mov al, 1
test esi, esi
mov dword [esp + 4], eax
mov eax, esi
mov esi, dword [esp + 0x18]
je 0x4a15f0
add eax, eax
push 2
push eax
push dword [esp + 0x1c]
call fcn.0040cd20
add esp, 0xc
jmp 0x4a15f0
shl esi, 0xc
lea edx, [edi + 3]
or esi, ecx
cmp esi, 0xffff
jbe 0x4a1784
lea ecx, [esi + 0xff0000]
and esi, 0x3ff
mov eax, 2
shr ecx, 0xa
or esi, 0xdc00
mov dword [esp + 0x10], esi
or ecx, 0xd800
mov dword [esp + 8], ecx
jmp 0x4a1795
mov ecx, dword [esp + 0x28]
test esi, esi
mov byte [ecx + 4], 0
mov dword [ecx + 8], eax
mov dword [ecx], 1
je 0x4a1b45
add esi, esi
push 2
push esi
push dword [esp + 0x1c]
call fcn.0040cd20
add esp, 0xc
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4a1b5c
push 1
push eax
push dword [esp + 0x14]
call fcn.0040cd20
add esp, 0xc
mov eax, dword [esp + 4]
cmp eax, 0xffffffff
je 0x4a1c2c
push eax
call sub.kernel32.dll_CloseHandle
jmp 0x4a1c2c
test esi, esi
lea edi, [esp + 0x50]
je 0x4a1b8d
add esi, esi
push 2
push esi
push dword [esp + 0x1c]
call fcn.0040cd20
add esp, 0xc
mov eax, dword [esp + 0x7c]
mov dword [esp + 0x50], 0
mov dword [esp + 0x6c], 0
mov word [esp + 0x70], 0
xorps xmm0, xmm0
lea esi, [esp + 0x3c]
mov bl, 1
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
movups xmmword [esp + 0x58], xmm0
mov dword [esp + 0x68], esi
mov edx, dword [esp + 0xc]
lea ecx, [esp + 0x34]
push edi
push dword [esp + 0x84]
call fcn.0049c040
add esp, 8
movzx eax, byte [esp + 0x34]
cmp al, 4
jne 0x4a1c34
mov eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 4]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x18]
mov dword [ecx], 0
test eax, eax
je 0x4a1c2c
push 1
push eax
push dword [esp + 0x14]
call fcn.0040cd20
add esp, 0xc
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x37]
mov edx, dword [esp + 0x28]
movzx edi, word [esp + 0x35]
mov esi, dword [esp + 0x38]
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 0x4a1b4d
jmp 0x4a1b5c
mov edi, dword [esp + 8]
jmp 0x4a1c78
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
push edx
push eax
call fcn.004cf340
add esp, 8
jmp 0x4a1c99
mov eax, 2
jmp 0x4a1c8d
xor eax, eax
xor ebx, ebx
push edi
push eax
call fcn.004cf340
add esp, 8
ud2