Function at 0x477030
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5621b6
mov eax, dword fs:[0]
push eax
sub esp, 0x150
mov eax, dword [0x5b2070]
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 esi, ecx
cmp dword [esi], 0
je 0x47706a
call fcn.00477470
cmp byte [0x5ba294], 0
jne 0x47707d
mov eax, 0x80000001
jmp 0x477397
mov eax, dword [esi]
test eax, eax
jne 0x4770fd
push 8
call fcn.004e646f
mov edi, eax
add esp, 4
mov dword [ebp - 0x158], edi
mov dword [ebp - 4], 0
push 1
call fcn.004e646f
add esp, 4
mov dword [edi + 4], eax
mov byte [eax], 0
lea eax, [ebp - 0x130]
push 0x118
push 0
push eax
call fcn.00501c30
add esp, 0xc
mov dword [ebp - 0x134], 0x11c
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x4770ec
cmp dword [ebp - 0x130], 6
mov eax, dword [edi + 4]
setae cl
mov byte [eax], cl
mov dword [ebp - 4], 0xffffffff
mov dword [esi], edi
mov dword [edi], 0
mov eax, dword [esi]
cmp dword [eax], 0
jne 0x477386
call fcn.00467920
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test al, al
jne 0x4772a4
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [ebp - 0x15c], eax
lea ecx, [ebp - 0x154]
mov eax, dword [esi]
add eax, 4
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x158], eax
xor eax, eax
push 0xc
mov dword [ebp - 0x140], 0
push str.Advapi32.dll
mov byte [ebp - 0x139], 0
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 7
mov word [ebp - 0x154], ax
call fcn.00403570
mov dword [ebp - 4], 2
lea eax, [ebp - 0x154]
push eax
call fcn.00478b30
mov ecx, eax
call fcn.00478c00
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x140]
cmp edx, 8
jb 0x4771dd
mov ecx, dword [ebp - 0x154]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4771d3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4773b5
push edx
push ecx
call fcn.004e649f
add esp, 8
xor eax, eax
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 7
mov word [ebp - 0x154], ax
test edi, edi
je 0x477386
push 0x58aa34
push edi
call ebx
mov ebx, eax
test ebx, ebx
je 0x477386
push dword [ebp - 0x15c]
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x477386
lea eax, [ebp - 0x138]
mov dword [ebp - 0x138], 0
push eax
push 0x20008
push edi
call ebx
test eax, eax
je 0x477263
push dword [ebp - 0x138]
mov ecx, dword [ebp - 0x158]
call fcn.004684b0
mov bl, al
jmp 0x477269
mov bl, byte [ebp - 0x139]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
mov ecx, dword [ebp - 0x138]
test ecx, ecx
je 0x47727f
push ecx
call edi
test bl, bl
je 0x477386
mov ecx, dword [esi]
add ecx, 4
call fcn.00467180
call fcn.00467920
test al, al
je 0x477386
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0xc
xor eax, eax
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 0
lea ecx, [ebp - 0x154]
push str.Advapi32.dll
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 7
mov word [ebp - 0x154], ax
call fcn.00403570
mov dword [ebp - 4], 3
lea eax, [ebp - 0x154]
push eax
call fcn.00478b30
mov ecx, eax
call fcn.00478c00
mov edi, eax
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x140]
cmp edx, 8
jb 0x477346
mov ecx, dword [ebp - 0x154]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x47733c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4773ba
push edx
push ecx
call fcn.004e649f
add esp, 8
xor eax, eax
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x140], 7
mov word [ebp - 0x154], ax
test edi, edi
je 0x477386
push str.RegOpenCurrentUser
push edi
call ebx
test eax, eax
je 0x477386
push dword [esi]
push dword [ebp + 8]
call eax
test eax, eax
je 0x477386
mov eax, dword [esi]
mov dword [eax], 0
mov eax, dword [esi]
cmp dword [eax], 0
jne 0x477395
mov dword [eax], 0x80000001
mov eax, dword [esi]
mov eax, dword [eax]
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.004e645e
mov esp, ebp
pop ebp
ret 4
call fcn.0050ba48
call fcn.0050ba48
int3