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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push ebx
push 4
lea eax, [ebp - 0x10]
push eax
xor edi, edi
inc edi
push edi
push ebx
push dword [0x4010fc]
call dword [sym.imp.iertutil.dll_Ordinal_650]
test eax, eax
js 0x4011cb
xor eax, eax
cmp dword [ebp - 0x10], eax
setne al
test eax, eax
jne 0x4011d2
push edi
call dword [sym.imp.KERNEL32.dll_SetProcessDEPPolicy]
call fcn.004013f5
push 2
pop eax
cmp dword [0x402388], eax
jne 0x401229
cmp dword [0x40237c], 6
jne 0x401229
cmp dword [0x402380], edi
jne 0x401229
lea eax, [ebp - 8]
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.msvcrt.dll_rand_s]
pop ecx
test eax, eax
jne 0x401229
movzx eax, byte [ebp - 8]
inc eax
mov dword [ebp - 8], eax
mov esi, ebx
je 0x401229
push edi
push 0x2000
push 0x10000
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
inc esi
cmp esi, dword [ebp - 8]
jb 0x401211
call dword [sym.imp.KERNEL32.dll_GetVersion]
test eax, eax
js 0x40125c
cmp al, 6
jb 0x40125c
push 0x401044
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40125c
push 0x401060
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40125c
push ebx
push ebx
push edi
push ebx
call eax
mov ebx, dword [sym.imp.msvcrt.dll_void____cdecl_operator_new_unsigned_int_]
or dword [ebp - 4], 0xffffffff
mov edi, 0x105
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__]
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x4013d0
test edi, edi
je 0x4013c8
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x401074
push 0x80000000
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4013c8
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 0x4013c8
push 2
pop eax
cmp dword [ebp - 0xc], eax
jne 0x4012f5
push 0x105
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
test eax, eax
je 0x4013c8
push 2
pop eax
cmp dword [ebp - 0xc], eax
mov eax, edi
je 0x4012f7
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 0x401320
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
or dword [ebp - 4], 0xffffffff
push 0x4010b0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x401399
push 0x4010cc
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x1c], eax
test eax, eax
je 0x401399
mov ecx, dword [ebp + 0x10]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401348
sub ecx, edx
lea eax, [ecx + 1]
xor ecx, ecx
push 2
pop edx
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_]
pop ecx
mov dword [ebp - 8], eax
test eax, eax
je 0x401399
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 0x401393
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 0x4013d8
push 0x4010e8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4013be
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 0x4013d0
push esi
call ebx
pop ecx
test edi, edi
je 0x4013d8
push edi
call ebx
pop ecx
cmp dword [ebp - 4], 0xffffffff
pop edi
pop esi
pop ebx
je 0x4013ea
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
leave
ret 0x10