Function at 0x431140
Capabilities:
Access peb ldr_data
Check os version
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, 0xc0
mov esi, esp
mov dword [esi + 0xa8], ebp
mov dword [esi + 0xac], esp
mov dword [esi + 0xb8], 0xffffffff
mov dword [esi + 0xb4], 0x4378b0
mov dword [esi + 0x30], ecx
lea eax, [esi + 0xb0]
mov dword [esi + 0x84], edx
mov dword [esi + 0xc], 0
mov dword [esi + 0x34], 8
mov dword [esi + 0x58], 0
mov ecx, dword fs:[0]
mov dword [esi + 0xb0], 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
jmp 0x4311e9
mov eax, dword [esi + 0x60]
xchg dword [0x45ca3c], eax
mov eax, dword [0x45ca3c]
test eax, eax
jne 0x431240
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 0x4311e0
mov eax, dword [esi + 0x1c]
mov byte [esi + 0xb], 1
mov dword [esi + 0xb8], 1
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0x14]
mov dword [esi + 0x28], eax
mov eax, dword [esi + 0xc]
mov byte [esi + 0xa], al
call fcn.00432200
jmp 0x4311e3
mov eax, 1
lea ecx, [esi + 0x94]
lea edx, [esi + 0x40]
lock xadd dword [0x45ca3c], eax
mov dword [esi + 0x48], ecx
lea ecx, [esi + 0x48]
mov dword [esi + 0x4c], fcn.0040d9c0
mov dword [esi + 0x50], edx
mov dword [esi + 0x60], 0x453124
mov dword [esi + 0x64], 2
mov dword [esi + 0x70], 0
mov dword [esi + 0x54], fcn.0040d9c0
mov byte [esi + 0xb], 1
mov dword [esi + 0xb8], 1
mov dword [esi + 0x68], ecx
mov edx, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x6c], 2
mov dword [esi + 0x40], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0x24], edx
mov dword [esi + 0x28], ecx
lea ecx, [esi + 0x9c]
lea edx, [esi + 0x60]
mov byte [esi + 0xa], al
call fcn.0040c460
cmp dword [esi + 0x1c], 0
mov ecx, dword [esi + 0x10]
sete al
or cl, al
test cl, 1
jne 0x4312db
mov ecx, dword [esi + 0x14]
mov edx, 1
call fcn.0040c280
mov eax, dword [esi + 0xa0]
mov edx, dword [esi + 0x9c]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0xa4]
lea ecx, [edx + eax]
test eax, eax
mov dword [esi + 0x88], eax
mov dword [esi + 0x38], ecx
je 0x431320
movzx ecx, byte [edx]
movzx edi, cl
test cl, cl
js 0x431340
lea eax, [edx + 1]
mov dword [esi + 0xc], edi
mov dword [esi + 0x18], eax
jmp 0x4313ca
xor edi, edi
mov dword [esi + 0xc], 0
xor eax, eax
mov dword [esi + 0x18], 0
xor ebx, ebx
jmp 0x4313eb
mov ebx, edx
movzx edx, byte [edx + 1]
and edi, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x43137e
movzx eax, byte [ebx + 2]
shl edx, 6
and eax, 0x3f
or eax, edx
cmp cl, 0xf0
jb 0x43138d
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 + 0x18], eax
jmp 0x431398
shl edi, 6
lea eax, [ebx + 2]
or edi, edx
mov dword [esi + 0x18], eax
mov edx, ebx
jmp 0x4313c7
shl edi, 0xc
lea ecx, [ebx + 3]
mov dword [esi + 0x18], ecx
or edi, eax
mov edx, ebx
cmp edi, 0xffff
jbe 0x4313c7
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 0x4313d1
mov dword [esi + 0xc], edi
mov eax, 1
xor edi, edi
mov ebx, dword [esi + 0x38]
mov ecx, 0xffffffff
sub ebx, dword [esi + 0x18]
add ebx, 3
cmovb ebx, ecx
shr ebx, 2
add ebx, eax
mov ax, 1
cmp ebx, 4
mov ecx, 3
mov dword [esi + 0x20], edi
mov dword [esi + 0x3c], eax
cmovb ebx, ecx
cmp ebx, 0x3ffffffe
ja 0x431845
mov edi, ebx
lea ebx, [ebx + ebx + 2]
mov dword [esi + 0x14], edx
test ebx, ebx
js 0x43187f
movzx eax, byte [0x45ca98]
mov ecx, ebx
call fcn.0040c250
test eax, eax
je 0x43185d
mov edx, eax
mov eax, dword [esi + 0x58]
inc edi
mov ecx, edx
mov dword [esi + 0x2c], edx
mov ebx, edi
inc eax
mov dword [esi + 0x90], eax
mov eax, dword [esi + 0xc]
mov word [edx], ax
mov edx, dword [esi + 0x18]
mov eax, 1
jmp 0x43146b
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0xc]
mov word [ecx + eax*2], di
inc eax
test edx, edx
mov dword [esi + 0xc], eax
je 0x4314d0
mov edi, dword [esi + 0x20]
test di, di
je 0x4314b0
xor eax, eax
cmp dword [esi + 0xc], ebx
jne 0x431460
mov dword [esi + 0x10], ebx
mov ebx, dword [esi + 0x38]
mov ecx, 0xffffffff
sub ebx, edx
add ebx, 3
cmovb ebx, ecx
shr ebx, 2
cmp ax, 1
mov dword [esi + 0x20], eax
mov eax, dword [esi + 0xc]
sbb ebx, 0xffffffff
cmp word [esi + 0x3c], 1
sbb ebx, 0xffffffff
jmp 0x4314f5
cmp edx, dword [esi + 0x38]
je 0x4314d0
mov eax, edx
movzx edx, byte [edx]
movzx edi, dl
test dl, dl
js 0x4315a0
inc eax
mov edx, eax
xor eax, eax
jmp 0x43147c
cmp word [esi + 0x3c], 1
jne 0x431640
xor edx, edx
mov dword [esi + 0x10], ebx
cmp eax, ebx
mov edi, 0
mov ebx, 0
mov dword [esi + 0x3c], 0
jne 0x431540
inc ebx
add ebx, eax
jb 0x431820
mov dword [esi + 0x5c], edi
mov edi, dword [esi + 0x10]
mov eax, 4
mov dword [esi + 0x18], edx
lea ecx, [edi + edi]
cmp ecx, ebx
cmova ebx, ecx
cmp ebx, 5
cmovb ebx, eax
xor edx, edx
cmp ebx, 0x40000000
setb al
test edi, edi
je 0x43154a
mov edi, dword [esi + 0x2c]
mov dword [esi + 0x60], edi
mov dword [esi + 0x68], ecx
mov ecx, 2
jmp 0x43154c
mov ebx, dword [esi + 0x10]
xor edi, edi
jmp 0x431466
xor ecx, ecx
mov dl, al
mov dword [esi + 0x64], ecx
lea ecx, [esi + 0x48]
lea eax, [esi + 0x60]
lea edi, [ebx + ebx]
add edx, edx
push eax
push edi
call fcn.0041fb50
add esp, 8
cmp dword [esi + 0x48], 0
mov ecx, dword [esi + 0x4c]
je 0x43158f
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
cmp ecx, 0x80000001
jne 0x43181c
mov ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0x2c]
jmp 0x431466
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
mov dword [esi + 0x2c], ecx
jmp 0x431466
mov dword [esi + 0x10], ebx
movzx ebx, byte [eax + 1]
and edi, 0x1f
and ebx, 0x3f
cmp dl, 0xdf
jbe 0x4315ea
mov dword [esi + 0x18], ebx
movzx ebx, byte [eax + 2]
mov dword [esi + 0x20], ebx
mov ebx, dword [esi + 0x18]
and dword [esi + 0x20], 0x3f
shl ebx, 6
add dword [esi + 0x20], ebx
cmp dl, 0xf0
mov ebx, dword [esi + 0x20]
jb 0x4315f6
movzx edx, byte [eax + 3]
and edi, 7
shl ebx, 6
add eax, 4
shl edi, 0x12
and edx, 0x3f
or edx, ebx
or edi, edx
jmp 0x4315fe
shl edi, 6
add eax, 2
or edi, ebx
mov edx, eax
jmp 0x431633
shl edi, 0xc
add eax, 3
or edi, ebx
mov edx, eax
cmp edi, 0xffff
jbe 0x431633
mov ebx, edx
lea edx, [edi + 0xff0000]
and edi, 0x3ff
shr edx, 0xa
or edi, 0xdc00
or edx, 0xd800
mov eax, edi
mov edi, edx
mov edx, ebx
mov ebx, dword [esi + 0x10]
jmp 0x43147c
mov ebx, dword [esi + 0x10]
xor eax, eax
jmp 0x43147c
push 0
push 0
push 0x10000
push 0x10000
push 1
push dword [esi + 0x34]
push dword [esi + 0x8c]
mov edi, dword [esi + 0x2c]
push edi
call dword [sym.imp.kernel32.dll_CreateNamedPipeW]
cmp eax, 0xffffffff
mov dword [esi + 0xc], eax
jne 0x4316f5
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esi + 0x90]
cmp ecx, 9
jg 0x4316c4
cmp eax, 5
jne 0x431690
mov dword [esi + 0x58], ecx
jmp 0x4316a2
cmp dword [esi + 0x34], 0
je 0x4316c4
cmp eax, 0x57
mov dword [esi + 0x34], 0
jne 0x4316c4
mov al, 1
xor ecx, ecx
test ebx, ebx
mov dword [esi + 0xc], eax
je 0x4311c0
mov ecx, edi
mov edx, 2
call fcn.0040c280
xor ecx, ecx
jmp 0x4311c0
mov edx, dword [esi + 0x30]
mov ecx, edi
mov edi, 0xffffffff
test ebx, ebx
mov dword [edx + 8], eax
mov dword [edx + 4], 0
mov dword [edx], 1
je 0x4317e8
mov edx, 2
call fcn.0040c280
jmp 0x4317e8
test ebx, ebx
je 0x43170f
mov ecx, edi
mov edx, 2
call fcn.0040c280
mov dword [esi + 0xb8], 1
mov eax, dword [esi + 0x84]
mov dword [esi + 0x60], 0
mov dword [esi + 0x7c], 0
mov word [esi + 0x80], 0
xorps xmm0, xmm0
mov edx, dword [esi + 0x14]
mov dword [esi + 0x48], 0xc
mov dword [esi + 0x4c], 0
mov dword [esi + 0x50], 1
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 0
mov dword [esi + 0xb8], 1
lea ecx, [esi + 0x40]
mov byte [esi + 0x7d], al
xor al, 1
mov dword [esi + 0x28], edx
mov byte [esi + 0x7c], al
lea eax, [esi + 0x48]
movups xmmword [esi + 0x68], xmm0
mov dword [esi + 0x78], eax
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x24], eax
mov eax, dword [esi + 0xc]
mov dword [esi + 0x98], eax
lea eax, [esi + 0x60]
push eax
push dword [esi + 0x88]
call fcn.00426320
add esp, 8
movzx eax, byte [esi + 0x40]
cmp al, 4
jne 0x4317c4
mov eax, dword [esi + 0x44]
mov ecx, dword [esi + 0x30]
mov edx, dword [esi + 0xc]
cmp dword [esi + 0x1c], 0
mov dword [ecx + 4], edx
mov dword [ecx + 8], eax
mov dword [ecx], 0
mov ecx, dword [esi + 0x14]
je 0x431808
mov edx, 1
call fcn.0040c280
jmp 0x431808
movzx ecx, byte [esi + 0x43]
mov edx, dword [esi + 0x30]
movzx ebx, word [esi + 0x41]
mov edi, dword [esi + 0x44]
mov byte [edx + 7], cl
mov word [edx + 5], bx
mov byte [edx + 4], al
mov dword [edx + 8], edi
mov edi, dword [esi + 0xc]
mov dword [edx], 1
mov ecx, dword [esi + 0x14]
cmp dword [esi + 0x1c], 0
je 0x4317fb
mov edx, 1
call fcn.0040c280
cmp dword [esi + 0xc], 0xffffffff
je 0x431808
push edi
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [esi + 0xb0]
mov dword fs:[0], eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
test ecx, ecx
jne 0x431831
mov dword [esi + 0xb8], 2
call fcn.0040c2d0
jmp 0x431898
mov edx, dword [esi + 0x50]
mov dword [esi + 0xb8], 2
call fcn.00446130
jmp 0x431898
mov eax, dword [esi + 0x1c]
mov dword [esi + 0x28], edx
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x24], eax
call fcn.0040c2d0
jmp 0x431898
mov ecx, dword [esi + 0x14]
mov eax, dword [esi + 0x1c]
mov edx, ebx
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x28], ecx
mov ecx, 2
mov dword [esi + 0x24], eax
call fcn.00446130
jmp 0x431898
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x14]
mov byte [esi + 0xa], 1
mov byte [esi + 0xb], 1
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], ecx
call fcn.0040c2d0
ud2