Function at 0x431570
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], 0x437cd0
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 0x431619
mov eax, dword [esi + 0x60]
xchg dword [0x45ea4c], eax
mov eax, dword [0x45ea4c]
test eax, eax
jne 0x431670
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 0x431610
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.00432630
jmp 0x431613
mov eax, 1
lea ecx, [esi + 0x94]
lea edx, [esi + 0x40]
lock xadd dword [0x45ea4c], eax
mov dword [esi + 0x48], ecx
lea ecx, [esi + 0x48]
mov dword [esi + 0x4c], fcn.0040de80
mov dword [esi + 0x50], edx
mov dword [esi + 0x60], 0x454274
mov dword [esi + 0x64], 2
mov dword [esi + 0x70], 0
mov dword [esi + 0x54], fcn.0040de80
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.0040c910
cmp dword [esi + 0x1c], 0
mov ecx, dword [esi + 0x10]
sete al
or cl, al
test cl, 1
jne 0x43170b
mov ecx, dword [esi + 0x14]
mov edx, 1
call fcn.0040c730
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 0x431750
movzx ecx, byte [edx]
movzx edi, cl
test cl, cl
js 0x431770
lea eax, [edx + 1]
mov dword [esi + 0xc], edi
mov dword [esi + 0x18], eax
jmp 0x4317fa
xor edi, edi
mov dword [esi + 0xc], 0
xor eax, eax
mov dword [esi + 0x18], 0
xor ebx, ebx
jmp 0x43181b
mov ebx, edx
movzx edx, byte [edx + 1]
and edi, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x4317ae
movzx eax, byte [ebx + 2]
shl edx, 6
and eax, 0x3f
or eax, edx
cmp cl, 0xf0
jb 0x4317bd
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 0x4317c8
shl edi, 6
lea eax, [ebx + 2]
or edi, edx
mov dword [esi + 0x18], eax
mov edx, ebx
jmp 0x4317f7
shl edi, 0xc
lea ecx, [ebx + 3]
mov dword [esi + 0x18], ecx
or edi, eax
mov edx, ebx
cmp edi, 0xffff
jbe 0x4317f7
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 0x431801
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 0x431c75
mov edi, ebx
lea ebx, [ebx + ebx + 2]
mov dword [esi + 0x14], edx
test ebx, ebx
js 0x431caf
movzx eax, byte [0x45eaa8]
mov ecx, ebx
call fcn.0040c700
test eax, eax
je 0x431c8d
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 0x43189b
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 0x431900
mov edi, dword [esi + 0x20]
test di, di
je 0x4318e0
xor eax, eax
cmp dword [esi + 0xc], ebx
jne 0x431890
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 0x431925
cmp edx, dword [esi + 0x38]
je 0x431900
mov eax, edx
movzx edx, byte [edx]
movzx edi, dl
test dl, dl
js 0x4319d0
inc eax
mov edx, eax
xor eax, eax
jmp 0x4318ac
cmp word [esi + 0x3c], 1
jne 0x431a70
xor edx, edx
mov dword [esi + 0x10], ebx
cmp eax, ebx
mov edi, 0
mov ebx, 0
mov dword [esi + 0x3c], 0
jne 0x431970
inc ebx
add ebx, eax
jb 0x431c50
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 0x43197a
mov edi, dword [esi + 0x2c]
mov dword [esi + 0x60], edi
mov dword [esi + 0x68], ecx
mov ecx, 2
jmp 0x43197c
mov ebx, dword [esi + 0x10]
xor edi, edi
jmp 0x431896
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.0041ff80
add esp, 8
cmp dword [esi + 0x48], 0
mov ecx, dword [esi + 0x4c]
je 0x4319bf
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
cmp ecx, 0x80000001
jne 0x431c4c
mov ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0x2c]
jmp 0x431896
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
mov dword [esi + 0x2c], ecx
jmp 0x431896
mov dword [esi + 0x10], ebx
movzx ebx, byte [eax + 1]
and edi, 0x1f
and ebx, 0x3f
cmp dl, 0xdf
jbe 0x431a1a
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 0x431a26
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 0x431a2e
shl edi, 6
add eax, 2
or edi, ebx
mov edx, eax
jmp 0x431a63
shl edi, 0xc
add eax, 3
or edi, ebx
mov edx, eax
cmp edi, 0xffff
jbe 0x431a63
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 0x4318ac
mov ebx, dword [esi + 0x10]
xor eax, eax
jmp 0x4318ac
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 0x431b25
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esi + 0x90]
cmp ecx, 9
jg 0x431af4
cmp eax, 5
jne 0x431ac0
mov dword [esi + 0x58], ecx
jmp 0x431ad2
cmp dword [esi + 0x34], 0
je 0x431af4
cmp eax, 0x57
mov dword [esi + 0x34], 0
jne 0x431af4
mov al, 1
xor ecx, ecx
test ebx, ebx
mov dword [esi + 0xc], eax
je 0x4315f0
mov ecx, edi
mov edx, 2
call fcn.0040c730
xor ecx, ecx
jmp 0x4315f0
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 0x431c18
mov edx, 2
call fcn.0040c730
jmp 0x431c18
test ebx, ebx
je 0x431b3f
mov ecx, edi
mov edx, 2
call fcn.0040c730
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.00426750
add esp, 8
movzx eax, byte [esi + 0x40]
cmp al, 4
jne 0x431bf4
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 0x431c38
mov edx, 1
call fcn.0040c730
jmp 0x431c38
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 0x431c2b
mov edx, 1
call fcn.0040c730
cmp dword [esi + 0xc], 0xffffffff
je 0x431c38
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 0x431c61
mov dword [esi + 0xb8], 2
call fcn.0040c780
jmp 0x431cc8
mov edx, dword [esi + 0x50]
mov dword [esi + 0xb8], 2
call fcn.00446b30
jmp 0x431cc8
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.0040c780
jmp 0x431cc8
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.00446b30
jmp 0x431cc8
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.0040c780
ud2