Function at 0x415160
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x576bc6
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x5c4104]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 1
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
cmp esi, edi
je 0x4153ed
mov ebx, dword [ebp + 8]
add ebx, 0xfffffff0
push ecx
mov dword [ebp - 0x130], esp
mov dword [ebp - 0x144], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x4151c6
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x4151d8
cmp ecx, dword [ebx]
jne 0x4151d8
lock inc dword [eax]
jmp 0x41521c
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov dword [ebp - 0x134], eax
test eax, eax
je 0x4154b1
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
mov ebx, dword [ebp - 0x134]
lea ecx, [edx*2 + 2]
push ecx
push eax
lea edx, [edx*2 + 2]
lea ecx, [ebx + 0x10]
call fcn.00406950
add esp, 8
mov ecx, dword [ebp - 0x144]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 2
mov eax, dword [esi]
lea ebx, [eax - 0x10]
mov dword [ebp - 0x138], eax
push ecx
mov ecx, dword [ebx]
mov dword [ebp - 0x13c], esp
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x41524d
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x41525f
cmp ecx, dword [ebx]
jne 0x41525f
lock inc dword [eax]
jmp 0x4152a7
lea eax, [ebx + 4]
push 2
push dword [eax]
mov dword [ebp - 0x134], eax
mov eax, dword [ecx]
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x4154b1
mov edx, dword [ebp - 0x134]
mov ecx, dword [edx]
mov dword [ebx + 4], ecx
mov edx, dword [edx]
lea ecx, [edx*2 + 2]
push ecx
push dword [ebp - 0x138]
lea edx, [edx*2 + 2]
lea ecx, [ebx + 0x10]
call fcn.00406950
add esp, 8
mov ecx, dword [ebp - 0x13c]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov ecx, SysReAllocStringLen
mov byte [ebp - 4], 1
call fcn.00415bc0
mov ebx, dword [ebp + 8]
add esp, 4
add ebx, 0xfffffff0
mov dword [ebp - 0x130], esp
mov dword [ebp - 0x148], esp
mov ecx, dword [ebx]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x4152e5
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x4152f7
cmp ecx, dword [ebx]
jne 0x4152f7
lock inc dword [eax]
jmp 0x41533b
mov eax, dword [ecx]
push 2
push dword [ebx + 4]
call dword [eax]
mov dword [ebp - 0x138], eax
test eax, eax
je 0x4154b1
mov ecx, dword [ebx + 4]
mov dword [eax + 4], ecx
lea eax, [ebx + 0x10]
mov edx, dword [ebx + 4]
mov ebx, dword [ebp - 0x138]
lea ecx, [edx*2 + 2]
push ecx
push eax
lea edx, [edx*2 + 2]
lea ecx, [ebx + 0x10]
call fcn.00406950
add esp, 8
mov ecx, dword [ebp - 0x148]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov byte [ebp - 4], 3
mov eax, dword [esi]
lea ebx, [eax - 0x10]
mov dword [ebp - 0x134], eax
push ecx
mov ecx, dword [ebx]
mov dword [ebp - 0x140], esp
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x41536c
call dword [eax + 0x10]
mov ecx, eax
cmp dword [ebx + 0xc], 0
lea eax, [ebx + 0xc]
jl 0x41537e
cmp ecx, dword [ebx]
jne 0x41537e
lock inc dword [eax]
jmp 0x4153c6
lea eax, [ebx + 4]
push 2
push dword [eax]
mov dword [ebp - 0x138], eax
mov eax, dword [ecx]
call dword [eax]
mov ebx, eax
test ebx, ebx
je 0x4154b1
mov edx, dword [ebp - 0x138]
mov ecx, dword [edx]
mov dword [ebx + 4], ecx
mov edx, dword [edx]
lea ecx, [edx*2 + 2]
push ecx
push dword [ebp - 0x134]
lea edx, [edx*2 + 2]
lea ecx, [ebx + 0x10]
call fcn.00406950
add esp, 8
mov ecx, dword [ebp - 0x140]
lea eax, [ebx + 0x10]
mov dword [ecx], eax
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
mov byte [ebp - 4], 1
call fcn.00415bc0
add esi, 4
add esp, 8
cmp esi, edi
jne 0x4151a3
push 0x11c
lea eax, [ebp - 0x12c]
push 0
push eax
call fcn.0051f290
mov esi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x12c]
add esp, 0xc
mov dword [ebp - 0x12c], 0x11c
push eax
call esi
cmp dword [ebp - 0x128], 0xa
je 0x41546f
push 0x11c
lea eax, [ebp - 0x12c]
push 0
push eax
call fcn.0051f290
add esp, 0xc
mov dword [ebp - 0x12c], 0x11c
lea eax, [ebp - 0x12c]
push eax
call esi
cmp dword [ebp - 0x128], 6
jne 0x415565
mov eax, dword [ebp - 0x124]
cmp eax, 2
je 0x41546f
cmp eax, 3
jne 0x415565
push ecx
mov ebx, esp
mov dword [ebp - 0x130], ebx
mov esi, dword [ebp + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x41548c
call dword [eax + 0x10]
mov ecx, eax
cmp dword [esi - 4], 0
lea eax, [esi - 4]
jl 0x4154a2
cmp ecx, dword [esi - 0x10]
jne 0x4154a2
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x4154da
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x4154b6
call fcn.00405700
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
lea eax, [edx*2 + 2]
push eax
push esi
lea edx, [edx*2 + 2]
call fcn.00406950
add esp, 8
lea eax, [edi + 0x10]
mov ecx, SysReAllocStringLen
mov dword [ebx], eax
call fcn.00411040
mov ebx, esp
mov dword [ebp - 0x130], ebx
mov esi, dword [ebp + 8]
mov ecx, dword [esi - 0x10]
mov eax, dword [ecx]
cmp eax, vtable.ATL::CAtlStringMgr.0
je 0x415505
call dword [eax + 0x10]
mov ecx, eax
cmp dword [esi - 4], 0
lea eax, [esi - 4]
jl 0x41551b
cmp ecx, dword [esi - 0x10]
jne 0x41551b
lea edi, [esi - 0x10]
lock inc dword [eax]
jmp 0x415553
mov eax, dword [ecx]
push 2
push dword [esi - 0xc]
call dword [eax]
mov edi, eax
test edi, edi
jne 0x41552f
call fcn.00405700
mov eax, dword [esi - 0xc]
lea ecx, [edi + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 0xc]
lea eax, [edx*2 + 2]
push eax
push esi
lea edx, [edx*2 + 2]
call fcn.00406950
add esp, 8
lea eax, [edi + 0x10]
mov ecx, reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebx], eax
call fcn.00411040
add esp, 4
push 0
push 0
push 0x3000
push 0x8000000
call dword [sym.imp.SHELL32.dll_SHChangeNotify]
mov byte [ebp - 4], 0
or eax, 0xffffffff
mov ecx, dword [ebp + 8]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4155bf
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4155bb
mov edx, dword [edx + 4]
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CWin32Heap.0
jne 0x4155bb
push 0
push dword [edx + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x4155bf
mov ecx, edx
call esi
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x415630
push dword [ebp - 0x130]
mov edx, dword [ebp + 0x10]
push ecx
call fcn.004217b0
mov eax, dword [ebp + 0x14]
add esp, 8
mov ecx, dword [ebp + 0xc]
sub eax, ecx
sar eax, 2
cmp eax, 0x3fffffff
jbe 0x4155ef
call fcn.00529b11
shl eax, 2
cmp eax, 0x1000
jb 0x415627
test cl, 0x1f
je 0x415603
call fcn.00529b11
mov eax, dword [ecx - 4]
cmp eax, ecx
jb 0x41560f
call fcn.00529b11
sub ecx, eax
cmp ecx, 4
jae 0x41561b
call fcn.00529b11
cmp ecx, 0x23
jbe 0x415625
call fcn.00529b11
mov ecx, eax
push ecx
call fcn.0051a89c
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0051b15a
mov esp, ebp
pop ebp
ret