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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x230
mov eax, dword [0x590cc0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0x228], ecx
mov ecx, dword [ebp + 0x14]
push edi
mov dword [ebp - 0x214], eax
xor edi, edi
mov dword [ebp - 0x224], ecx
xor esi, esi
mov eax, 0x58c820
lea ebx, [ebx]
cmp ebx, dword [eax]
je 0x41af74
add eax, 0x14
inc esi
cmp eax, 0x58c8e8
jl 0x41af60
jmp 0x41b1a8
cmp esi, 0xffffffff
je 0x41b1a8
mov dword [ebp - 0x21c], edi
mov dword [ebp - 0x210], edi
cmp ecx, 0xffffffff
je 0x41afb7
push str.Userenv.dll
call dword [sym.imp.KERNEL32.DLL_LoadLibraryW]
mov dword [ebp - 0x210], eax
cmp eax, edi
je 0x41afb7
push str.ExpandEnvironmentStringsForUserW
mov edx, eax
push edx
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
mov dword [ebp - 0x21c], eax
lea edi, [esi + esi*4]
add edi, edi
mov eax, dword [edi + edi + 0x58c830]
add edi, edi
test eax, eax
je 0x41b03a
mov ecx, dword [ebp - 0x21c]
test ecx, ecx
je 0x41b008
mov edx, dword [ebp + 0x10]
push edx
mov edx, dword [ebp - 0x214]
push edx
push eax
mov eax, dword [ebp - 0x224]
push eax
call ecx
mov eax, dword [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x214]
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov eax, dword [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
cmp ebx, 0x23
jne 0x41b08c
push 0x110
lea ecx, [ebp - 0x114]
push 0
push ecx
call fcn.004ba010
add esp, 0xc
lea edx, [ebp - 0x118]
push edx
mov dword [ebp - 0x118], 0x114
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
cmp dword [ebp - 0x114], 6
jae 0x41b08c
mov eax, dword [str.SOFTWAREMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders]
mov ecx, dword [str.Common_AppData]
mov dword [edi + str.SoftwareMicrosoftWindowsCurrentVersionExplorerUser_Shell_Folders], eax
mov dword [edi + str.AppData], ecx
cmp dword [ebp + 0x18], 0
mov dword [ebp - 0x220], 0
jle 0x41b197
mov ebx, dword [ebp - 0x228]
mov dword [ebp - 0x218], 0
mov eax, ebx
test ebx, ebx
jne 0x41b0bc
mov eax, dword [edi + 0x58c824]
mov ecx, dword [edi + 0x58c828]
lea edx, [ebp - 0x218]
push edx
push 1
push 0
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test esi, esi
jne 0x41b15e
xor edx, edx
push 0x206
push edx
lea eax, [ebp - 0x20a]
push eax
mov word [ebp - 0x20c], dx
call fcn.004ba010
mov eax, dword [edi + 0x58c82c]
add esp, 0xc
lea ecx, [ebp - 0x22c]
push ecx
mov ecx, dword [ebp - 0x218]
lea edx, [ebp - 0x20c]
push edx
push esi
push esi
push eax
push ecx
mov dword [ebp - 0x22c], 0x208
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test esi, esi
jne 0x41b151
lea eax, [ebp - 0x20c]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x41b140
sub eax, edx
sar eax, 1
jne 0x41b1be
mov edx, dword [ebp - 0x218]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x64
call dword [sym.imp.KERNEL32.DLL_Sleep]
test ebx, ebx
je 0x41b181
cmp dword [ebp - 0x220], 5
jle 0x41b181
test esi, esi
je 0x41b181
mov dword [ebp - 0x228], 0
mov eax, dword [ebp - 0x220]
inc eax
mov dword [ebp - 0x220], eax
cmp eax, dword [ebp + 0x18]
jl 0x41b0a0
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x41b1a8
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
pop edi
pop esi
mov eax, 0x80004005
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x21c]
test eax, eax
je 0x41b1e5
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x214]
push ecx
push edx
mov edx, dword [ebp - 0x224]
lea ecx, [ebp - 0x20c]
push ecx
push edx
call eax
jmp 0x41b1fd
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp - 0x214]
push eax
push ecx
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.DLL_ExpandEnvironmentStringsW]
mov eax, dword [ebp - 0x218]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x210]
test eax, eax
je 0x41b21b
push eax
call dword [sym.imp.KERNEL32.DLL_FreeLibrary]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004b9ff3
mov esp, ebp
pop ebp
ret