Function at 0x12f95980
Capabilities:
Check os version

Disassembly:
sub esp, 0x1b0
push ebx
push ebp
mov ebp, ecx
xor ebx, ebx
push esi
push edi
mov eax, dword [ebp + 4]
mov dword [ebp + 4], ebx
cmp eax, ebx
je 0x12f959cf
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x12f959b8
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [ebp + 8]
push eax
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x12f959cf
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp + 0xc]
push ecx
call esi
mov dword [ebp + 0xc], ebx
cmp dword [0x131c8d70], ebx
jne 0x12f95a1e
mov ecx, 0x24
xor eax, eax
lea edi, [esp + 0x18]
lea edx, [esp + 0x14]
mov esi, 1
push edx
rep stosd dword es:[edi], eax
mov dword [0x131c8d70], esi
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x24], 2
je 0x12f95a1e
mov dword [0x131c8d74], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
cmp dword [0x131c8d74], ebx
jne 0x12f95ba6
mov edx, dword [str..PipeOCULAR_]
cmp edx, ebx
je 0x12f95ba6
mov ecx, 0x45
xor eax, eax
lea edi, [esp + 0xa9]
mov byte [esp + 0xa8], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0xa8]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, esi
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x1c4]
and ecx, 3
cmp eax, ebx
rep movsb byte es:[edi], byte [esi]
je 0x12f95a9b
push 0x104
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.130536a3
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileA]
xor edi, edi
lea ecx, [esp + 0xa8]
push 0x7d0
push ecx
inc edi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
test eax, eax
jne 0x12f95ac1
cmp dword [ebp + 0x14], 2
je 0x12f95b12
push ebx
push 0x40000000
push 3
push ebx
push ebx
lea edx, [esp + 0xbc]
push 0xc0000000
push edx
call esi
cmp eax, 0xffffffff
mov dword [ebp + 4], eax
jne 0x12f95ae9
cmp edi, 0xa
jg 0x12f95b12
jmp 0x12f95aa3
cmp dword [esp + 0x1c8], 2
jne 0x12f95b24
push ebx
lea ecx, [esp + 0x1cc]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x12f95b24
mov edx, dword [ebp + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [ebp + 4], ebx
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
mov eax, dword [esp + 0x1c8]
mov esi, dword [sym.imp.KERNEL32.dll_CreateEventA]
push ebx
push ebx
push 1
push ebx
mov dword [ebp + 0x18], eax
call esi
push ebx
push ebx
push 1
push ebx
mov dword [ebp + 8], eax
call esi
mov ecx, dword [ebp + 8]
mov dword [ebp + 0xc], eax
cmp ecx, ebx
je 0x12f95b65
cmp eax, ebx
je 0x12f95b65
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x1b0
ret 8
mov eax, dword [ebp + 4]
mov dword [ebp + 4], ebx
cmp eax, ebx
je 0x12f95ba6
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x12f95b8f
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [ebp + 8]
push ecx
call esi
mov dword [ebp + 8], ebx
mov eax, dword [ebp + 0xc]
cmp eax, ebx
je 0x12f95ba6
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp + 0xc]
push edx
call esi
mov dword [ebp + 0xc], ebx
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8