Function at 0x415fe0
Capabilities:
Check os version
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x330
mov eax, dword [0x46e018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push pe_nt_image_headers32
lea eax, [ebp - 0x328]
mov esi, ecx
push 0
push eax
call fcn.0042ff40
mov edi, dword [sym.imp.KERNEL32.dll_GetVersionExW]
lea eax, [ebp - 0x32c]
add esp, 0xc
mov dword [esi], 0
mov dword [ebp - 0x32c], 0x11c
push eax
call edi
test eax, eax
jne 0x41604c
lea eax, [ebp - 0x32c]
mov dword [ebp - 0x32c], 0x114
push eax
call edi
test eax, eax
je 0x41628e
push 0x80
lea eax, [ebp - 0x318]
push str.Service_Pack_1
push eax
call fcn.0043c197
add esp, 0xc
test eax, eax
jne 0x41606e
or dword [esi], 1
jmp 0x4160d2
push 0x80
lea eax, [ebp - 0x318]
push str.Service_Pack_2
push eax
call fcn.0043c197
add esp, 0xc
test eax, eax
jne 0x416090
or dword [esi], 2
jmp 0x4160d2
push 0x80
lea eax, [ebp - 0x318]
push str.Service_Pack_3
push eax
call fcn.0043c197
add esp, 0xc
test eax, eax
jne 0x4160b2
or dword [esi], 3
jmp 0x4160d2
push 0x80
lea eax, [ebp - 0x318]
push str.Service_Pack_4
push eax
call fcn.0043c197
add esp, 0xc
test eax, eax
jne 0x4160d2
or dword [esi], 4
shl dword [esi], 0x10
push str.RtlGetVersion
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push pe_nt_image_headers32
mov ebx, eax
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.0042ff40
add esp, 0xc
mov dword [ebp - 0x124], 0x11c
test ebx, ebx
je 0x41611f
lea eax, [ebp - 0x124]
push eax
call ebx
test eax, eax
je 0x41613f
lea eax, [ebp - 0x124]
push eax
call edi
test eax, eax
jne 0x41613f
lea eax, [ebp - 0x124]
mov dword [ebp - 0x124], 0x114
push eax
call edi
cmp dword [ebp - 0x120], 0xa
jne 0x416159
cmp dword [ebp - 0x11c], 0
jne 0x416159
or dword [esi], 0xb
jmp 0x4163a9
push str.RtlGetVersion
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push pe_nt_image_headers32
mov ebx, eax
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.0042ff40
add esp, 0xc
mov dword [ebp - 0x124], 0x11c
test ebx, ebx
je 0x4161a3
lea eax, [ebp - 0x124]
push eax
call ebx
test eax, eax
je 0x4161c3
lea eax, [ebp - 0x124]
push eax
call edi
test eax, eax
jne 0x4161c3
lea eax, [ebp - 0x124]
mov dword [ebp - 0x124], 0x114
push eax
call edi
cmp dword [ebp - 0x120], 6
jne 0x4161dd
cmp dword [ebp - 0x11c], 2
jb 0x4161dd
or dword [esi], 0xa
jmp 0x4163a9
cmp dword [0x470ef0], 0
jne 0x41625b
push 0x20a
lea eax, [ebp - 0x210]
push 0
push eax
call fcn.0042ff40
add esp, 0xc
lea eax, [ebp - 0x210]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0xffffffffffffffff
push str.kernel32.dll
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.0043c6c9
add esp, 0x10
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
test edi, edi
je 0x41625b
push 0x465624
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
neg eax
push edi
sbb eax, eax
add eax, 2
mov dword [0x470ef0], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [0x470ef0], 1
jne 0x4162a1
cmp dword [ebp - 0x31c], 2
jne 0x41628e
cmp dword [ebp - 0x328], 6
jne 0x41628e
mov eax, dword [ebp - 0x324]
cmp eax, 2
je 0x4161d5
cmp eax, 1
je 0x4162e1
test eax, eax
je 0x4162f1
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042dc42
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x31c]
sub eax, 0
je 0x4163a9
sub eax, 1
je 0x41637f
sub eax, 1
jne 0x4163a9
mov eax, dword [ebp - 0x328]
cmp eax, 6
jne 0x4162f9
mov eax, dword [ebp - 0x324]
cmp eax, 2
je 0x4161d5
cmp eax, 1
jne 0x4162e9
or dword [esi], 9
jmp 0x4163a9
test eax, eax
jne 0x4163a9
or dword [esi], 8
jmp 0x4163a9
cmp eax, 5
jne 0x41632b
mov eax, dword [ebp - 0x324]
cmp eax, 2
jne 0x416311
or dword [esi], 7
jmp 0x4163a9
cmp eax, 1
jne 0x41631e
or dword [esi], 6
jmp 0x4163a9
test eax, eax
jne 0x4163a9
or dword [esi], 5
jmp 0x4163a9
cmp eax, 4
ja 0x4163a9
or dword [esi], 4
cmp eax, 4
jne 0x4163a9
lea eax, [ebp - 0x318]
push str.Service_Pack_6
push eax
call fcn.0043a9c1
add esp, 8
test eax, eax
jne 0x4163a9
mov dword [ebp - 0x330], eax
lea eax, [ebp - 0x330]
push eax
push 1
push 0
push str.SOFTWAREMicrosoftWindows_NTCurrentVersionHotfixQ246009
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push dword [ebp - 0x330]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4163a9
cmp dword [ebp - 0x328], 4
jne 0x4163a9
mov eax, dword [ebp - 0x324]
test eax, eax
jne 0x416397
or dword [esi], 1
jmp 0x4163a9
cmp eax, 0xa
jne 0x4163a1
or dword [esi], 2
jmp 0x4163a9
cmp eax, 0x5a
jne 0x4163a9
or dword [esi], 3
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042dc42
mov esp, ebp
pop ebp
ret