Function at 0x431220
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], 0x437930
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 0x4312c9
mov eax, dword [esi + 0x60]
xchg dword [0x45da4c], eax
mov eax, dword [0x45da4c]
test eax, eax
jne 0x431320
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 0x4312c0
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.004322e0
jmp 0x4312c3
mov eax, 1
lea ecx, [esi + 0x94]
lea edx, [esi + 0x40]
lock xadd dword [0x45da4c], eax
mov dword [esi + 0x48], ecx
lea ecx, [esi + 0x48]
mov dword [esi + 0x4c], fcn.0040db00
mov dword [esi + 0x50], edx
mov dword [esi + 0x60], 0x453214
mov dword [esi + 0x64], 2
mov dword [esi + 0x70], 0
mov dword [esi + 0x54], fcn.0040db00
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.0040c7c0
cmp dword [esi + 0x1c], 0
mov ecx, dword [esi + 0x10]
sete al
or cl, al
test cl, 1
jne 0x4313bb
mov ecx, dword [esi + 0x14]
mov edx, 1
call fcn.0040c5e0
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 0x431400
movzx ecx, byte [edx]
movzx edi, cl
test cl, cl
js 0x431420
lea eax, [edx + 1]
mov dword [esi + 0xc], edi
mov dword [esi + 0x18], eax
jmp 0x4314aa
xor edi, edi
mov dword [esi + 0xc], 0
xor eax, eax
mov dword [esi + 0x18], 0
xor ebx, ebx
jmp 0x4314cb
mov ebx, edx
movzx edx, byte [edx + 1]
and edi, 0x1f
and edx, 0x3f
cmp cl, 0xdf
jbe 0x43145e
movzx eax, byte [ebx + 2]
shl edx, 6
and eax, 0x3f
or eax, edx
cmp cl, 0xf0
jb 0x43146d
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 0x431478
shl edi, 6
lea eax, [ebx + 2]
or edi, edx
mov dword [esi + 0x18], eax
mov edx, ebx
jmp 0x4314a7
shl edi, 0xc
lea ecx, [ebx + 3]
mov dword [esi + 0x18], ecx
or edi, eax
mov edx, ebx
cmp edi, 0xffff
jbe 0x4314a7
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 0x4314b1
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 0x431925
mov edi, ebx
lea ebx, [ebx + ebx + 2]
mov dword [esi + 0x14], edx
test ebx, ebx
js 0x43195f
movzx eax, byte [0x45daa8]
mov ecx, ebx
call fcn.0040c5b0
test eax, eax
je 0x43193d
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 0x43154b
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 0x4315b0
mov edi, dword [esi + 0x20]
test di, di
je 0x431590
xor eax, eax
cmp dword [esi + 0xc], ebx
jne 0x431540
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 0x4315d5
cmp edx, dword [esi + 0x38]
je 0x4315b0
mov eax, edx
movzx edx, byte [edx]
movzx edi, dl
test dl, dl
js 0x431680
inc eax
mov edx, eax
xor eax, eax
jmp 0x43155c
cmp word [esi + 0x3c], 1
jne 0x431720
xor edx, edx
mov dword [esi + 0x10], ebx
cmp eax, ebx
mov edi, 0
mov ebx, 0
mov dword [esi + 0x3c], 0
jne 0x431620
inc ebx
add ebx, eax
jb 0x431900
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 0x43162a
mov edi, dword [esi + 0x2c]
mov dword [esi + 0x60], edi
mov dword [esi + 0x68], ecx
mov ecx, 2
jmp 0x43162c
mov ebx, dword [esi + 0x10]
xor edi, edi
jmp 0x431546
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.0041fc30
add esp, 8
cmp dword [esi + 0x48], 0
mov ecx, dword [esi + 0x4c]
je 0x43166f
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
cmp ecx, 0x80000001
jne 0x4318fc
mov ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0x2c]
jmp 0x431546
mov edx, dword [esi + 0x18]
mov eax, dword [esi + 0xc]
mov edi, dword [esi + 0x5c]
mov dword [esi + 0x2c], ecx
jmp 0x431546
mov dword [esi + 0x10], ebx
movzx ebx, byte [eax + 1]
and edi, 0x1f
and ebx, 0x3f
cmp dl, 0xdf
jbe 0x4316ca
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 0x4316d6
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 0x4316de
shl edi, 6
add eax, 2
or edi, ebx
mov edx, eax
jmp 0x431713
shl edi, 0xc
add eax, 3
or edi, ebx
mov edx, eax
cmp edi, 0xffff
jbe 0x431713
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 0x43155c
mov ebx, dword [esi + 0x10]
xor eax, eax
jmp 0x43155c
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 0x4317d5
call dword [sym.imp.kernel32.dll_GetLastError]
mov ecx, dword [esi + 0x90]
cmp ecx, 9
jg 0x4317a4
cmp eax, 5
jne 0x431770
mov dword [esi + 0x58], ecx
jmp 0x431782
cmp dword [esi + 0x34], 0
je 0x4317a4
cmp eax, 0x57
mov dword [esi + 0x34], 0
jne 0x4317a4
mov al, 1
xor ecx, ecx
test ebx, ebx
mov dword [esi + 0xc], eax
je 0x4312a0
mov ecx, edi
mov edx, 2
call fcn.0040c5e0
xor ecx, ecx
jmp 0x4312a0
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 0x4318c8
mov edx, 2
call fcn.0040c5e0
jmp 0x4318c8
test ebx, ebx
je 0x4317ef
mov ecx, edi
mov edx, 2
call fcn.0040c5e0
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.00426400
add esp, 8
movzx eax, byte [esi + 0x40]
cmp al, 4
jne 0x4318a4
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 0x4318e8
mov edx, 1
call fcn.0040c5e0
jmp 0x4318e8
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 0x4318db
mov edx, 1
call fcn.0040c5e0
cmp dword [esi + 0xc], 0xffffffff
je 0x4318e8
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 0x431911
mov dword [esi + 0xb8], 2
call fcn.0040c630
jmp 0x431978
mov edx, dword [esi + 0x50]
mov dword [esi + 0xb8], 2
call fcn.00446790
jmp 0x431978
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.0040c630
jmp 0x431978
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.00446790
jmp 0x431978
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.0040c630
ud2