Function at 0x489770
Capabilities:
Create pipe
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x90
mov edi, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
mov eax, 0x40080002
mov bl, 1
mov dword [esp + 0x18], ecx
mov dword [esp + 0x6c], edx
mov dword [esp + 0x2c], 0
mov dword [esp + 0x1c], 8
sub eax, edx
mov dword [esp + 0x74], eax
nop word [eax + eax]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [esp + 0x7c], eax
lea esi, [esp + 0x30]
xorps xmm0, xmm0
mov eax, dword [0x623130]
test eax, eax
jne 0x4897ef
nop word [eax + eax]
movaps xmmword [esp + 0x30], xmm0
push 0x10
push esi
call edi
mov eax, dword [esp + 0x30]
xorps xmm0, xmm0
mov dword [0x623130], eax
mov eax, dword [0x623130]
test eax, eax
je 0x4897d0
mov eax, 1
lea ecx, [esp + 0x7c]
lea edx, [esp + 0x24]
lock xadd dword [0x623130], eax
mov dword [esp + 0x5c], ecx
lea ecx, [esp + 0x5c]
mov dword [esp + 0x60], 0x410e20
mov dword [esp + 0x64], edx
mov dword [esp + 0x30], 0x5e38c0
mov dword [esp + 0x34], 2
mov dword [esp + 0x40], 0
mov edx, esi
mov dword [esp + 0x68], 0x410e20
mov dword [esp + 0x38], ecx
lea ecx, [esp + 0x80]
mov dword [esp + 0x3c], 2
mov dword [esp + 0x24], eax
call fcn.0040d730
cmp dword [esp + 0x20], 0
sete al
or bl, al
test bl, 1
jne 0x489877
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov edx, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
mov eax, dword [esp + 0x80]
lea esi, [ecx + edx]
test edx, edx
mov dword [esp + 0x70], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x20], eax
mov dword [esp + 8], esi
je 0x4898c0
movzx ebx, byte [ecx]
test bl, bl
js 0x4898f0
mov edx, dword [esp + 8]
lea eax, [ecx + 1]
mov dword [esp + 4], eax
jmp 0x489956
xor edi, edi
mov esi, 4
mov edx, 8
mov dword [esp + 4], 0
mov dword [esp + 0x14], 0
xor ebx, ebx
jmp 0x48999a
movzx edx, byte [ecx + 1]
mov eax, ebx
and eax, 0x1f
and edx, 0x3f
cmp bl, 0xdf
jbe 0x489944
mov esi, ecx
movzx ecx, byte [ecx + 2]
shl edx, 6
and ecx, 0x3f
or ecx, edx
cmp bl, 0xf0
jb 0x489bea
movzx ebx, byte [esi + 3]
and eax, 7
shl ecx, 6
lea edx, [esi + 4]
shl eax, 0x12
mov dword [esp + 4], edx
and ebx, 0x3f
or ebx, ecx
or ebx, eax
mov edx, dword [esp + 8]
cmp ebx, 0xffff
jbe 0x489956
jmp 0x489c08
shl eax, 6
add ecx, 2
or eax, edx
mov edx, dword [esp + 8]
mov dword [esp + 4], ecx
mov ebx, eax
mov eax, 1
xor edi, edi
mov ecx, edx
mov edx, 0xffffffff
sub ecx, dword [esp + 4]
add ecx, 3
cmovb ecx, edx
shr ecx, 2
lea edx, [ecx + eax]
lea esi, [ecx + eax + 1]
mov eax, 4
cmp edx, 3
cmovb esi, eax
cmp esi, 0x40000000
jae 0x489d6f
lea edx, [esi + esi]
mov ax, 1
mov dword [esp + 0x14], eax
movzx eax, byte [0x62314d]
xor ecx, ecx
call fcn.0048bb80
test eax, eax
je 0x489d6f
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 4]
mov word [eax], bx
mov dword [esp + 0x30], esi
mov esi, 1
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], 1
inc ecx
mov dword [esp + 0x78], ecx
mov ecx, edi
jmp 0x4899f7
mov ebx, ecx
xor ecx, ecx
cmp esi, dword [esp + 0x30]
je 0x489ab5
mov word [eax + esi*2], bx
inc esi
mov dword [esp + 0x38], esi
test edx, edx
je 0x489a20
test cx, cx
jne 0x4899e0
cmp edx, dword [esp + 8]
je 0x489a20
movzx ebx, byte [edx]
test bl, bl
js 0x489a4d
inc edx
xor ecx, ecx
jmp 0x4899e4
cmp word [esp + 0x14], 1
mov edi, dword [esp + 0x30]
jne 0x489b60
xor ebx, ebx
cmp esi, edi
mov edx, 0
mov edi, 0
mov dword [esp + 0x14], 0
jne 0x4899ee
jmp 0x489ad7
movzx edi, byte [edx + 1]
mov dword [esp + 0x10], eax
mov eax, ebx
and eax, 0x1f
and edi, 0x3f
cmp bl, 0xdf
jbe 0x489b04
movzx ecx, byte [edx + 2]
shl edi, 6
mov dword [esp + 4], ecx
and dword [esp + 4], 0x3f
add dword [esp + 4], edi
cmp bl, 0xf0
mov edi, dword [esp + 4]
jb 0x489b19
movzx ebx, byte [edx + 3]
and eax, 7
shl edi, 6
add edx, 4
shl eax, 0x12
and ebx, 0x3f
or ebx, edi
or ebx, eax
mov eax, dword [esp + 0x10]
cmp ebx, 0xffff
ja 0x489b33
xor ecx, ecx
jmp 0x4899e4
mov edi, dword [esp + 8]
mov eax, 0xffffffff
sub edi, edx
add edi, 3
cmovb edi, eax
movzx eax, word [esp + 0x14]
shr edi, 2
cmp cx, 1
sbb edi, 0xffffffff
add edi, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 4], edx
lea ecx, [esp + 0x30]
mov edx, esi
inc edi
push 2
push 2
push edi
call fcn.004df9e0
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
add esp, 0xc
mov eax, dword [esp + 0x34]
jmp 0x4899ee
shl eax, 6
add edx, 2
xor ecx, ecx
or eax, edi
mov ebx, eax
mov eax, dword [esp + 0x10]
jmp 0x4899e4
shl eax, 0xc
add edx, 3
or edi, eax
mov ebx, edi
mov eax, dword [esp + 0x10]
cmp ebx, 0xffff
jbe 0x489aae
lea edi, [ebx + 0xff0000]
and ebx, 0x3ff
shr edi, 0xa
or ebx, 0xdc00
or edi, 0xd800
mov ecx, ebx
mov ebx, edi
jmp 0x4899e4
mov esi, dword [esp + 0x34]
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esp + 0x30]
push dword [esp + 0x8c]
push esi
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x489c83
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x78]
cmp ecx, 0xa
jge 0x489c31
cmp eax, 5
jne 0x489bb0
mov dword [esp + 0x2c], ecx
jmp 0x489bc4
cmp dword [esp + 0x1c], 0
je 0x489c31
cmp eax, 0x57
mov dword [esp + 0x1c], 0
jne 0x489c31
xor ebx, ebx
test edi, edi
mov edi, dword [sym.imp.bcryptprimitives.dll_ProcessPrng]
je 0x4897b0
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
xor ebx, ebx
jmp 0x4897b0
shl eax, 0xc
lea edx, [esi + 3]
or ecx, eax
mov dword [esp + 4], edx
mov ebx, ecx
mov edx, dword [esp + 8]
cmp ebx, 0xffff
jbe 0x489956
lea ecx, [ebx + 0xff0000]
and ebx, 0x3ff
mov eax, 2
shr ecx, 0xa
or ebx, 0xdc00
or ecx, 0xd800
mov edi, ebx
mov ebx, ecx
jmp 0x48995d
mov ecx, dword [esp + 0x18]
test edi, edi
mov byte [ecx + 4], 0
mov dword [ecx + 8], eax
mov dword [ecx], 1
je 0x489c55
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [esp + 0x20], 0
je 0x489c6e
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp ebx, 0xffffffff
je 0x489d32
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x489d32
test edi, edi
je 0x489c96
push esi
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x6c]
mov dword [esp + 0x30], 0
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], 0
mov edx, dword [esp + 0xc]
xorps xmm0, xmm0
mov dword [esp + 0x5c], 0xc
mov dword [esp + 0x60], 0
mov dword [esp + 0x64], 1
lea ecx, [esp + 0x24]
mov byte [esp + 0x4d], al
xor al, 1
mov byte [esp + 0x4c], al
lea eax, [esp + 0x5c]
movups xmmword [esp + 0x38], xmm0
mov dword [esp + 0x48], eax
lea eax, [esp + 0x30]
push eax
push dword [esp + 0x74]
call fcn.0047d940
add esp, 8
movzx eax, byte [esp + 0x24]
cmp al, 4
jne 0x489d3a
mov ecx, dword [esp + 0x18]
cmp dword [esp + 0x20], 0
mov eax, dword [esp + 0x28]
mov dword [ecx + 4], ebx
mov dword [ecx + 8], eax
mov dword [ecx], 0
je 0x489d32
push dword [esp + 0xc]
push 0
push dword [0x623140]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esp + 0x27]
mov edx, dword [esp + 0x18]
movzx edi, word [esp + 0x25]
mov esi, dword [esp + 0x28]
mov byte [edx + 7], cl
mov word [edx + 5], di
mov byte [edx + 4], al
mov dword [edx + 8], esi
mov dword [edx], 1
cmp dword [esp + 0x20], 0
jne 0x489c5c
jmp 0x489c6e
ud2