Function at 0x4045b5
Capabilities:
Check os version
Query environment variable
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x938
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x92c], eax
mov eax, dword [ebp + 0x10]
push esi
push edi
mov dword [ebp - 0x930], eax
xor ebx, ebx
mov edi, edx
mov dword [ebp - 0x934], ecx
xor esi, esi
mov eax, 0x41c000
cmp edi, dword [eax]
je 0x404602
add eax, 0x14
inc esi
cmp eax, 0x41c0c8
jl 0x4045ee
jmp 0x4047d5
cmp esi, 0xffffffff
je 0x4047d5
mov dword [ebp - 0x920], ebx
mov dword [ebp - 0x91c], ebx
cmp ecx, 0xffffffff
je 0x404643
push str.Userenv.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [ebp - 0x91c], eax
cmp eax, ebx
je 0x404643
push str.ExpandEnvironmentStringsForUserW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x920], eax
imul esi, esi, 0x14
mov eax, dword [esi + 0x41c010]
cmp eax, ebx
je 0x404689
push dword [ebp + 0xc]
push dword [ebp - 0x92c]
push eax
cmp dword [ebp - 0x920], ebx
je 0x404670
push dword [ebp - 0x934]
call dword [ebp - 0x920]
jmp 0x404676
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x91c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
xor eax, eax
jmp 0x4047da
cmp edi, 0x23
jne 0x4046d9
push 0x110
lea eax, [ebp - 0x914]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x918]
push eax
mov dword [ebp - 0x918], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x914], 6
jae 0x4046d9
mov eax, dword [str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders]
mov dword [esi + str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders], eax
mov eax, dword [str.Common_AppData]
mov dword [esi + str.AppData], eax
mov dword [ebp - 0x928], ebx
cmp dword [ebp + 0x14], ebx
jle 0x4047c1
mov eax, dword [ebp - 0x930]
mov dword [ebp - 0x924], ebx
cmp eax, ebx
jne 0x4046fe
mov eax, dword [esi + 0x41c004]
lea ecx, [ebp - 0x924]
push ecx
push 1
push ebx
push dword [esi + 0x41c008]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x404789
xor eax, eax
push 0x7fe
mov word [ebp - 0x804], ax
lea eax, [ebp - 0x802]
push ebx
push eax
call sub.MSVCR100.dll_memset
add esp, 0xc
lea eax, [ebp - 0x938]
push eax
lea eax, [ebp - 0x804]
push eax
push ebx
push ebx
push dword [esi + 0x41c00c]
mov dword [ebp - 0x938], 0x800
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
cmp edi, ebx
jne 0x40477d
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.MSVCR100.dll_wcslen]
pop ecx
test eax, eax
jne 0x4047e9
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [ebp - 0x930], ebx
je 0x4047ac
cmp dword [ebp - 0x928], 5
jle 0x4047ac
cmp edi, ebx
je 0x4047ac
mov dword [ebp - 0x930], ebx
inc dword [ebp - 0x928]
mov eax, dword [ebp - 0x928]
cmp eax, dword [ebp + 0x14]
jl 0x4046e8
cmp dword [ebp - 0x91c], ebx
je 0x4047d5
push dword [ebp - 0x91c]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, 0x80004005
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401d90
leave
ret
push dword [ebp + 0xc]
lea eax, [ebp - 0x804]
push dword [ebp - 0x92c]
push eax
cmp dword [ebp - 0x920], ebx
je 0x40480f
push dword [ebp - 0x934]
call dword [ebp - 0x920]
jmp 0x404815
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push dword [ebp - 0x924]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x91c], ebx
je 0x404682
jmp 0x404676