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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
lea eax, [ebp - 0x10]
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
push ebx
push ebx
push 4
push eax
inc edi
push edi
push ebx
push dword [0x401118]
call dword [sym.imp.iertutil.dll_Ordinal_650]
test eax, eax
js 0x40121b
xor eax, eax
cmp dword [ebp - 0x10], eax
setne al
test eax, eax
jne 0x401222
push edi
call dword [sym.imp.KERNEL32.dll_SetProcessDEPPolicy]
call fcn.0040144d
push 2
pop eax
cmp dword [0x402378], eax
jne 0x401279
cmp dword [0x40236c], 6
jne 0x401279
cmp dword [0x402370], edi
jne 0x401279
lea eax, [ebp - 8]
mov dword [ebp - 8], ebx
push eax
call dword [sym.imp.msvcrt.dll_rand_s]
pop ecx
test eax, eax
jne 0x401279
movzx eax, byte [ebp - 8]
mov esi, ebx
inc eax
mov dword [ebp - 8], eax
je 0x401279
push edi
push 0x2000
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
inc esi
cmp esi, dword [ebp - 8]
jb 0x401261
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
js 0x4012b2
and eax, 0xff
cmp eax, 6
jb 0x4012b2
push 0x401060
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4012b2
push 0x40107c
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4012b2
push ebx
push ebx
push edi
push ebx
call eax
or dword [ebp - 4], 0xffffffff
mov edi, 0x105
mov ebx, dword [sym.imp.msvcrt.dll_void____cdecl_operator_new_unsigned_int_]
push edi
mov dword [ebp - 0x14], edi
call ebx
push edi
mov esi, eax
call ebx
mov ebx, dword [sym.imp.msvcrt.dll_void___cdecl_operator_delete_void__]
mov edi, eax
pop ecx
pop ecx
test esi, esi
je 0x401426
test edi, edi
je 0x40141e
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x401090
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40141e
lea eax, [ebp - 0x14]
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40141e
push 2
pop eax
cmp dword [ebp - 0xc], eax
jne 0x40134b
push 0x105
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x40141e
push 2
pop eax
cmp dword [ebp - 0xc], eax
mov eax, edi
je 0x40134d
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push esi
mov dword [ebp - 0x10], eax
call ebx
push edi
call ebx
pop ecx
xor edi, edi
xor esi, esi
cmp dword [ebp - 4], 0xffffffff
pop ecx
je 0x401376
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or dword [ebp - 4], 0xffffffff
push 0x4010cc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4013ef
push 0x4010e8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x4013ef
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40139e
sub ecx, edx
push 2
pop edx
lea eax, [ecx + 1]
xor ecx, ecx
mov dword [ebp - 0x18], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call dword [sym.imp.msvcrt.dll_void____cdecl_operator_new_unsigned_int_]
mov dword [ebp - 8], eax
pop ecx
test eax, eax
je 0x4013ef
push dword [ebp - 0x18]
push eax
push 0xffffffffffffffff
push dword [ebp + 0x10]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
jle 0x4013e9
push 0
push dword [ebp - 8]
call dword [ebp - 0x1c]
push dword [ebp - 8]
call ebx
pop ecx
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x40142e
push 0x401104
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x401414
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test esi, esi
je 0x401426
push esi
call ebx
pop ecx
test edi, edi
je 0x40142e
push edi
call ebx
pop ecx
cmp dword [ebp - 4], 0xffffffff
pop edi
pop esi
pop ebx
je 0x401440
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10