Function at 0x418310
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, 0xd0
mov esi, esp
mov dword [esi + 0xb8], ebp
mov dword [esi + 0xbc], esp
mov dword [esi + 0xc8], 0xffffffff
mov dword [esi + 0xc4], 0x421010
mov dword [esi + 0x38], ecx
lea eax, [esi + 0xc0]
mov dword [esi + 0x84], edx
mov dword [esi + 0xc], 0
mov dword [esi + 0x3c], 8
mov dword [esi + 0x5c], 0
mov ecx, dword fs:[0]
mov dword [esi + 0xc0], ecx
mov dword fs:[0], eax
mov eax, 0x40080002
mov cl, 1
sub eax, edx
mov dword [esi + 0x8c], eax
nop word [eax + eax]
mov dword [esi + 0x10], ecx
call dword [sym.imp.kernel32.dll_GetCurrentProcessId]
mov dword [esi + 0x94], eax
mov eax, dword [0x44b1f4]
mov dword [esi + 0x14], edi
test eax, eax
je 0x4184b6
mov eax, 1
lock xadd dword [0x44b1f4], eax
mov dword [esi + 0x60], 0x44476c
mov dword [esi + 0x64], 2
mov dword [esi + 0x70], 0
mov dword [esi + 0x2c], edi
mov byte [esi + 0xb], 1
mov dword [esi + 0xc8], 1
mov dword [esi + 0x44], eax
mov eax, dword [esi + 0xc]
mov byte [esi + 0xa], al
lea eax, [esi + 0x94]
mov dword [esi + 0x4c], eax
lea eax, [esi + 0x44]
mov dword [esi + 0x50], fcn.0042c250
mov dword [esi + 0x54], eax
lea eax, [esi + 0x4c]
mov dword [esi + 0x58], fcn.0042c250
mov dword [esi + 0x68], eax
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x6c], 2
mov dword [esi + 0x28], eax
lea eax, [esi + 0x60]
push eax
lea eax, [esi + 0x9c]
push eax
call fcn.00428110
add esp, 8
mov ecx, dword [esi + 0x14]
mov edx, dword [esi + 0x10]
test ecx, ecx
sete al
or dl, al
test dl, 1
jne 0x41844e
push 1
push ecx
push dword [esi + 0x1c]
call fcn.00404d20
add esp, 0xc
mov eax, dword [esi + 0x9c]
mov edx, dword [esi + 0xa0]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0xa4]
lea ecx, [edx + eax]
test eax, eax
mov dword [esi + 0x88], eax
mov dword [esi + 0x40], ecx
je 0x418520
movzx ecx, byte [edx]
movzx edi, cl
test cl, cl
js 0x418540
lea eax, [edx + 1]
mov dword [esi + 0xc], edi
mov dword [esi + 0x20], eax
jmp 0x41859f
mov eax, dword [esi + 0x60]
xchg dword [0x44b1f4], eax
mov eax, dword [0x44b1f4]
test eax, eax
jne 0x4183af
xorps xmm0, xmm0
movaps xmmword [esi + 0x60], xmm0
push 2
push 0x10
lea eax, [esi + 0x60]
push eax
push 0
call dword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
jns 0x4184a0
mov eax, dword [esi + 0x1c]
lea ecx, [esi + 0xa8]
mov dword [esi + 0x2c], edi
mov byte [esi + 0xb], 1
mov dword [esi + 0xc8], 1
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0xc]
mov byte [esi + 0xa], al
call fcn.0041d770
mov eax, dword [esi + 0xa8]
mov edi, dword [esi + 0x14]
xchg dword [0x44b1f4], eax
mov eax, dword [0x44b1f4]
test eax, eax
je 0x4184b6
jmp 0x4183af
xor edi, edi
mov dword [esi + 0xc], 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x20], 0
xor ebx, ebx
jmp 0x4185c3
mov ebx, edx
movzx edx, byte [edx + 1]
and edi, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x41858f
movzx eax, byte [ebx + 2]
shl edx, 6
and eax, 0x3f
or eax, edx
cmp cl, 0xf0
jb 0x4188d6
movzx ecx, byte [ebx + 3]
and edi, 7
shl eax, 6
shl edi, 0x12
and ecx, 0x3f
or ecx, eax
lea eax, [ebx + 4]
or edi, ecx
mov dword [esi + 0x20], eax
mov edx, ebx
cmp edi, 0xffff
jbe 0x41859c
jmp 0x4188ef
shl edi, 6
lea eax, [ebx + 2]
or edi, edx
mov dword [esi + 0x20], eax
mov edx, ebx
mov dword [esi + 0xc], edi
mov eax, 1
xor edi, edi
mov ebx, dword [esi + 0x40]
mov ecx, 0xffffffff
sub ebx, dword [esi + 0x20]
add ebx, 3
cmovb ebx, ecx
shr ebx, 2
add ebx, eax
mov ax, 1
mov dword [esi + 0x34], eax
cmp ebx, 4
mov eax, 3
mov dword [esi + 0x24], edi
cmovb ebx, eax
cmp ebx, 0x3ffffffe
ja 0x418ab1
mov edi, ebx
lea ebx, [ebx + ebx + 2]
mov dword [esi + 0x1c], edx
test ebx, ebx
js 0x418aea
movzx eax, byte [0x44b161]
push 2
push ebx
call fcn.00404d10
add esp, 8
test eax, eax
je 0x418ac9
mov ecx, eax
mov eax, dword [esi + 0x5c]
mov ebx, dword [esi + 0x20]
mov edx, edi
inc edx
mov dword [esi + 0x30], ecx
inc eax
mov dword [esi + 0x90], eax
mov eax, dword [esi + 0xc]
mov word [ecx], ax
mov eax, ecx
mov ecx, 1
jmp 0x41863b
mov edi, edx
xor edx, edx
mov word [eax + ecx*2], dx
inc ecx
mov edx, edi
mov edi, dword [esi + 0x24]
test ebx, ebx
mov dword [esi + 0xc], ecx
je 0x4186c0
test di, di
je 0x418680
xor ecx, ecx
mov dword [esi + 0x10], edi
cmp dword [esi + 0xc], edx
jne 0x4186b0
mov edi, dword [esi + 0x40]
mov eax, 0xffffffff
sub edi, ebx
add edi, 3
cmovb edi, eax
shr edi, 2
cmp cx, 1
mov dword [esi + 0x24], ecx
mov ecx, dword [esi + 0xc]
sbb edi, 0xffffffff
cmp word [esi + 0x34], 1
sbb edi, 0xffffffff
jmp 0x4186e8
cmp ebx, dword [esi + 0x40]
je 0x4186c0
mov dword [esi + 0x18], edx
movzx edx, byte [ebx]
movzx edi, dl
test dl, dl
js 0x418784
mov dword [esi + 0x10], edi
inc ebx
mov edx, dword [esi + 0x18]
xor ecx, ecx
cmp dword [esi + 0xc], edx
je 0x418654
nop word cs:[eax + eax]
nop
mov edi, edx
mov dword [esi + 0x24], ecx
jmp 0x418779
cmp word [esi + 0x34], 1
jne 0x418840
xor ebx, ebx
cmp ecx, edx
mov edi, 0
mov dword [esi + 0x34], 0
mov dword [esi + 0x10], 0
jne 0x418630
inc edi
mov dword [esi + 0x18], edx
add edi, ecx
jb 0x418a87
lea eax, [edx + edx]
mov ecx, 4
mov dword [esi + 0x20], ebx
mov ebx, edx
cmp eax, edi
cmova edi, eax
cmp edi, 5
cmovb edi, ecx
xor edx, edx
cmp edi, 0x40000000
setb cl
test ebx, ebx
je 0x41872d
mov ebx, dword [esi + 0x30]
mov dword [esi + 0x60], ebx
mov dword [esi + 0x64], 2
mov dword [esi + 0x68], eax
jmp 0x418734
mov dword [esi + 0x64], 0
mov dl, cl
lea eax, [edi + edi]
lea ebx, [esi + 0x60]
lea ecx, [esi + 0x4c]
add edx, edx
push ebx
push eax
call fcn.0040bf80
add esp, 8
cmp dword [esi + 0x4c], 0
mov eax, dword [esi + 0x50]
je 0x418773
mov ebx, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
cmp eax, 0x80000001
jne 0x418a83
mov edi, dword [esi + 0x18]
mov eax, dword [esi + 0x30]
jmp 0x418634
mov ebx, dword [esi + 0x20]
mov dword [esi + 0x30], eax
mov ecx, dword [esi + 0xc]
mov edx, dword [esi + 0x10]
jmp 0x418634
movzx ecx, byte [ebx + 1]
and edi, 0x1f
mov dword [esi + 0x24], eax
and ecx, 0x3f
cmp dl, 0xdf
mov dword [esi + 0x10], ecx
jbe 0x4187d7
movzx ecx, byte [ebx + 2]
mov eax, dword [esi + 0x10]
shl eax, 6
and ecx, 0x3f
or ecx, eax
cmp dl, 0xf0
jb 0x4187f9
movzx edx, byte [ebx + 3]
and edi, 7
shl ecx, 6
add ebx, 4
shl edi, 0x12
and edx, 0x3f
or edx, ecx
or edi, edx
mov eax, dword [esi + 0x24]
cmp edi, 0xffff
ja 0x41880c
mov dword [esi + 0x10], edi
jmp 0x41869a
shl edi, 6
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0x24]
add ebx, 2
xor ecx, ecx
add edi, dword [esi + 0x10]
mov dword [esi + 0x10], edi
cmp dword [esi + 0xc], edx
jne 0x4186b0
jmp 0x418654
shl edi, 0xc
add ebx, 3
or edi, ecx
mov eax, dword [esi + 0x24]
cmp edi, 0xffff
jbe 0x4187cf
lea edx, [edi + 0xff0000]
and edi, 0x3ff
shr edx, 0xa
or edi, 0xdc00
or edx, 0xd800
mov dword [esi + 0x10], edx
mov edx, dword [esi + 0x18]
mov ecx, edi
cmp dword [esi + 0xc], edx
je 0x418654
jmp 0x4186b0
mov dword [esi + 0x18], edx
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esi + 0x3c]
push dword [esi + 0x8c]
mov ebx, dword [esi + 0x30]
push ebx
call dword [sym.imp.kernel32.dll_CreateNamedPipeW]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x418966
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esi + 0x90]
mov edi, dword [esi + 0x14]
mov edx, dword [esi + 0x18]
cmp ecx, 9
jg 0x418917
cmp eax, 5
jne 0x4188a0
mov dword [esi + 0x5c], ecx
jmp 0x4188b2
cmp dword [esi + 0x3c], 0
je 0x418917
cmp eax, 0x57
mov dword [esi + 0x3c], 0
jne 0x418917
mov al, 1
xor ecx, ecx
test edx, edx
mov dword [esi + 0xc], eax
je 0x418390
add edx, edx
push 2
push edx
push ebx
call fcn.00404d20
add esp, 0xc
xor ecx, ecx
jmp 0x418390
shl edi, 0xc
lea ecx, [ebx + 3]
mov dword [esi + 0x20], ecx
or edi, eax
mov edx, ebx
cmp edi, 0xffff
jbe 0x41859c
lea ecx, [edi + 0xff0000]
and edi, 0x3ff
mov eax, 2
shr ecx, 0xa
or edi, 0xdc00
or ecx, 0xd800
mov dword [esi + 0xc], ecx
jmp 0x4185a6
mov ecx, dword [esi + 0x38]
test edx, edx
mov dword [ecx + 8], eax
mov dword [ecx + 4], 0
mov dword [ecx], 1
je 0x41893c
add edx, edx
push 2
push edx
push ebx
call fcn.00404d20
add esp, 0xc
test edi, edi
je 0x41894e
push 1
push edi
push dword [esi + 0x1c]
call fcn.00404d20
add esp, 0xc
mov eax, dword [esi + 0xc]
cmp eax, 0xffffffff
je 0x418a3e
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x418a3e
mov ecx, eax
mov eax, dword [esi + 0x18]
mov edi, dword [esi + 0x14]
test eax, eax
je 0x41898e
add eax, eax
push 2
push eax
push ebx
mov ebx, ecx
call fcn.00404d20
mov ecx, ebx
add esp, 0xc
mov dword [esi + 0xc8], 1
mov eax, dword [esi + 0x84]
mov edx, dword [esi + 0x1c]
mov dword [esi + 0x60], 0
mov dword [esi + 0x7c], 0
mov word [esi + 0x80], 0
xorps xmm0, xmm0
mov dword [esi + 0x4c], 0xc
mov dword [esi + 0x50], 0
mov dword [esi + 0x98], ecx
mov dword [esi + 0x54], 1
mov dword [esi + 0x2c], edi
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 0
mov dword [esi + 0xc8], 1
lea ecx, [esi + 0x44]
mov byte [esi + 0x7d], al
xor al, 1
mov dword [esi + 0x28], edx
mov byte [esi + 0x7c], al
lea eax, [esi + 0x4c]
movups xmmword [esi + 0x68], xmm0
mov dword [esi + 0x78], eax
lea eax, [esi + 0x60]
push eax
push dword [esi + 0x88]
call fcn.00416200
add esp, 8
movzx eax, byte [esi + 0x44]
cmp al, 4
jne 0x418a52
mov eax, dword [esi + 0x48]
mov ecx, dword [esi + 0x38]
mov edx, dword [esi + 0xc]
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov eax, dword [esi + 0x14]
mov dword [ecx], 0
mov ecx, dword [esi + 0x1c]
test eax, eax
je 0x418a3e
push 1
push eax
push ecx
call fcn.00404d20
add esp, 0xc
mov eax, dword [esi + 0xc0]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
movzx ecx, byte [esi + 0x47]
mov edx, dword [esi + 0x38]
movzx ebx, word [esi + 0x45]
mov edi, dword [esi + 0x48]
mov byte [edx + 7], cl
mov word [edx + 5], bx
mov byte [edx + 4], al
mov dword [edx + 8], edi
mov edi, dword [esi + 0x14]
mov dword [edx], 1
test edi, edi
jne 0x418940
jmp 0x41894e
test eax, eax
jne 0x418a98
mov dword [esi + 0xc8], 2
call fcn.00427d90
jmp 0x418b03
mov ecx, dword [esi + 0x54]
mov dword [esi + 0xc8], 2
push ecx
push eax
call fcn.0042e010
add esp, 8
jmp 0x418b03
mov eax, dword [esi + 0x14]
mov dword [esi + 0x28], edx
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x2c], eax
call fcn.00427d90
jmp 0x418b03
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], ecx
push ebx
push 2
call fcn.0042e010
add esp, 8
jmp 0x418b03
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], ecx
call fcn.00427d90
ud2