Function at 0x46ad00
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x49fbdc
mov eax, dword fs:[0]
push eax
sub esp, 0x154
mov eax, dword [0x4c6184]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 8]
mov ebx, ecx
mov dword [ebp - 4], 0
cmp byte [ebx + 0x158], 0
mov dword [ebp - 0x158], ebx
mov dword [ebp - 0x13c], eax
jne 0x46ad7f
cmp byte [ebp + 0x14], 0
je 0x46ad5f
mov byte [ebx + 0x120], 1
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret 0x10
mov ecx, dword [ebp + 0x10]
push 0x4d0140
mov dword [ebx + 0x140], ecx
mov dword [ebp - 0x148], 0x4d0140
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov byte [ebp - 0x144], 1
mov al, byte [ebp + 0x14]
mov dl, byte [ebp + 0xc]
mov byte [ebp - 4], 1
mov byte [ebx + 0x15a], al
mov eax, dword [ebp + 0x10]
shr eax, 1
and al, 1
mov byte [ebx + 0x159], dl
mov byte [ebx + 0x119], al
je 0x46add5
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebx + 0x11c], eax
mov al, byte [ebp + 0x10]
test al, 2
je 0x46ade7
test al, 1
jne 0x46ade7
mov esi, ebx
call fcn.004751f0
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test byte [ebp + 0x10], 0x20
mov dword [ebx + 0x3a8], eax
je 0x46ae08
mov byte [ebx + 0x15c], 1
test byte [ebp + 0x10], 8
je 0x46b044
lea ecx, [ebp - 0x134]
push ecx
call fcn.0041bb70
mov byte [ebp - 4], 2
mov eax, dword [ebx + 0x3c0]
cmp dword [eax - 0xc], 0
lea edi, [ebp - 0x134]
jne 0x46ae3e
lea eax, [ebx + 0x24]
call fcn.00417130
jmp 0x46ae50
mov ecx, dword [ebx + 0x24]
push ecx
push eax
push str._s._s
call fcn.00417b50
add esp, 0xc
mov eax, dword [0x4d0134]
mov esi, dword [eax]
mov dword [ebp - 0x154], esi
mov dword [ebp - 0x15c], eax
cmp esi, dword [ebp - 0x15c]
je 0x46af3b
lea edx, [ebp - 0x140]
push edx
call fcn.0041bb70
mov byte [ebp - 4], 3
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 0x3c0]
cmp dword [eax - 0xc], 0
lea edi, [ebp - 0x140]
jne 0x46ae9e
lea eax, [esi + 0x10]
call fcn.00417130
jmp 0x46aeb0
mov ecx, dword [esi + 0x10]
push ecx
push eax
push str._s._s
call fcn.00417b50
add esp, 0xc
mov ecx, dword [ebp - 0x134]
xor eax, eax
test ecx, ecx
setne al
test eax, eax
jne 0x46aecb
push 0x80004005
call fcn.004170a0
mov edi, dword [ebp - 0x140]
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x46aef9
test dx, dx
je 0x46aef5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x46aef9
add eax, 4
add ecx, 4
test dx, dx
jne 0x46aed3
xor eax, eax
jmp 0x46aefe
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
sete al
test al, al
je 0x46afe8
mov ecx, dword [esi + 0xc]
cmp byte [ecx + 0x14c], 0
jne 0x46afe8
lea eax, [edi - 0x10]
mov byte [ebp - 4], 2
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46af3b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp esi, dword [0x4d0134]
je 0x46b01e
mov eax, dword [esi + 0xc]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x46af71
mov eax, dword [esi + 0xc]
mov edx, dword [eax + 4]
push 0
push 0xf120
push 0x112
push edx
call dword [sym.imp.USER32.dll_SendMessageW]
mov eax, dword [esi + 0xc]
mov eax, dword [eax + 4]
push eax
call dword [sym.imp.USER32.dll_BringWindowToTop]
mov ecx, dword [esi + 0xc]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.USER32.dll_SetForegroundWindow]
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov edx, dword [eax + 0x28]
push ebx
call edx
cmp byte [ebp + 0x14], 0
je 0x46afa3
mov byte [ebx + 0x120], 1
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x134]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46afc9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp byte [ebp - 0x144], 0
je 0x46ad5f
mov ecx, dword [ebp - 0x148]
push ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x46ad5f
lea eax, [edi - 0x10]
mov byte [ebp - 4], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46b008
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebp - 0x154]
call fcn.004643e0
mov esi, dword [ebp - 0x154]
jmp 0x46ae63
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x134]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x46b044
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test byte [ebp + 0x10], 4
je 0x46b064
mov ecx, dword [ebp - 0x13c]
mov dword [ebx + 0x3b8], ecx
call dword [sym.imp.USER32.dll_GetDesktopWindow]
mov dword [ebp - 0x13c], eax
jmp 0x46b070
mov edx, dword [ebp - 0x13c]
mov dword [ebx + 0x3b8], edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x38]
mov ecx, ebx
call edx
mov eax, dword [ebx]
mov edx, dword [eax + 0x3c]
mov ecx, ebx
call edx
mov esi, 2
mov edi, eax
cmp dword [ebx + 0x34], esi
jne 0x46b0b8
test byte [ebp + 0x10], 1
mov byte [ebx + 0x1a4], 0
mov dword [ebp - 0x134], 0x44000048
jne 0x46b160
mov dword [ebp - 0x134], 0x54000048
jmp 0x46b160
cmp byte [ebx + 0x65], 0
mov dword [ebp - 0x134], 0x84080048
je 0x46b0db
cmp byte [ebx + 0x119], 0
jne 0x46b0db
mov dword [ebp - 0x134], 0x84080248
mov eax, dword [ebp + 0x10]
test al, 1
jne 0x46b0ec
or dword [ebp - 0x134], 0x10000000
cmp byte [ebx + 0x68], 0
je 0x46b0fc
or dword [ebp - 0x134], 0x20000
cmp byte [ebx + 0x69], 0
je 0x46b10c
or dword [ebp - 0x134], 0x10000
test eax, 0x100
jne 0x46b11d
or dword [ebp - 0x134], 0xc00000
cmp byte [ebx + 0x62], 0
je 0x46b126
or edi, 0x10
cmp byte [ebx + 0x64], 0
je 0x46b134
or edi, 0x40000
jmp 0x46b13a
or edi, 0x80
cmp byte [ebx + 0x63], 0
je 0x46b146
or edi, 0x8000000
cmp byte [ebx + 0x61], 0
je 0x46b14f
or edi, 8
call dword [sym.imp.USER32.dll_GetDesktopWindow]
cmp dword [ebp - 0x13c], eax
jne 0x46b160
or edi, 4
test byte [ebp + 0x10], 0x80
je 0x46b1be
push 0x114
lea eax, [ebp - 0x130]
push 0
push eax
mov byte [ebx + 0x130], 1
or edi, 0x400000
call fcn.0048a470
add esp, 0xc
lea ecx, [ebp - 0x130]
push ecx
mov dword [ebp - 0x130], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x120], esi
jne 0x46b1be
cmp dword [ebp - 0x12c], 6
jb 0x46b1be
or edi, 0x100000
mov byte [ebx + 0x133], 1
mov edx, dword [ebx + 0x54]
mov ebx, dword [edx - 0xc]
add ebx, 0x9a
push ebx
call fcn.004867fb
mov esi, eax
add esp, 4
push esi
lea ecx, [ebp - 0x14c]
mov dword [ebp - 0x150], esi
call fcn.00479730
push esi
lea eax, [ebp - 0x150]
push esi
push eax
call fcn.00418230
add esp, 0xc
push ebx
mov byte [ebp - 4], 4
mov ecx, dword [ebp - 0x150]
push 0
push ecx
call fcn.0048a470
mov ebx, dword [ebp - 0x150]
mov ecx, dword [ebp - 0x134]
mov dword [ebx + 8], edi
mov edi, dword [ebp - 0x158]
mov dword [ebx + 0xc], ecx
mov edx, 1
mov word [ebx], dx
mov eax, 0xffff
mov word [ebx + 2], ax
mov dword [ebx + 0x16], 0x640064
mov eax, dword [edi + 0x54]
mov ecx, dword [eax - 0xc]
mov esi, dword [ebp - 0x150]
add esp, 0xc
lea ecx, [ecx + ecx + 2]
push ecx
push eax
add esi, 0x1e
push esi
call fcn.0048a570
mov edx, dword [edi + 0x54]
mov eax, dword [edx - 0xc]
mov edx, dword [0x4cfcc0]
lea eax, [esi + eax*2 + 2]
mov ecx, 8
mov word [eax], cx
add esp, 0xc
mov byte [eax + 5], 1
cmp byte [edx + 0x18], 0
je 0x46b2af
mov ecx, dword [str.Segoe_UI]
mov dword [eax + 6], ecx
mov edx, dword [0x4ad8f0]
mov dword [eax + 0xa], edx
mov ecx, dword [0x4ad8f4]
mov dword [eax + 0xe], ecx
mov edx, dword [0x4ad8f8]
mov dword [eax + 0x12], edx
mov cx, word [0x4ad8fc]
mov word [eax + 0x16], cx
jmp 0x46b2c6
mov ecx, 7
mov esi, str.MS_Shell_Dlg_2
lea edi, [eax + 6]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, dword [ebp - 0x158]
cmp byte [ebp + 0xc], 0
mov byte [ebp - 0x135], 0
je 0x46b2f6
mov edx, dword [ebp - 0x148]
push edx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x13c]
push ebx
push eax
mov byte [ebp - 0x144], 0
call fcn.00475c20
jmp 0x46b303
mov ecx, dword [ebp - 0x13c]
push ebx
push ecx
call fcn.00475cf0
test eax, eax
je 0x46b30e
mov byte [ebp - 0x135], 1
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x14c]
test esi, esi
je 0x46b346
lea edx, [esi + 4]
or eax, 0xffffffff
lock xadd dword [edx], eax
jne 0x46b346
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x46b346
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
cmp byte [ebp - 0x144], 0
je 0x46b35c
mov eax, dword [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, byte [ebp - 0x135]
jmp 0x46ad61