Function at 0x1004fb30
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 0x1004fb7f
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x1004fb68
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 0x1004fb7f
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 [0x101f945c], ebx
jne 0x1004fbce
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 [0x101f945c], esi
mov dword [esp + 0x18], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x24], 2
je 0x1004fbce
mov dword [0x101f9460], esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b0
ret 8
cmp dword [0x101f9460], ebx
jne 0x1004fd56
mov edx, dword [str..PipeOCULAR_]
cmp edx, ebx
je 0x1004fd56
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 0x1004fc4b
push 0x104
push eax
lea eax, [esp + 0xb0]
push eax
call fcn.10058c5b
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 0x1004fc71
cmp dword [ebp + 0x14], 2
je 0x1004fcc2
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 0x1004fc99
cmp edi, 0xa
jg 0x1004fcc2
jmp 0x1004fc53
cmp dword [esp + 0x1c8], 2
jne 0x1004fcd4
push ebx
lea ecx, [esp + 0x1cc]
push ebx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
jne 0x1004fcd4
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 0x1004fd15
cmp eax, ebx
je 0x1004fd15
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 0x1004fd56
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x1004fd3f
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 0x1004fd56
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