Function at 0x407e90
Capabilities:
Check os version
Get common file path
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x43efc2
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x4516f8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x114
lea eax, [ebp - 0x124]
push 0
push eax
call fcn.0042af90
add esp, 0xc
lea ecx, [ebp - 0x124]
push ecx
mov dword [ebp - 0x124], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x40844a
mov edx, dword [ebp - 0x120]
push edx
push str._OSVersion__MajorVersion___d_r_n
mov eax, 0x4556b4
call fcn.00401370
mov eax, dword [ebp - 0x11c]
push eax
push str._OSVersion__MinorVersion___d_r_n
mov eax, 0x4556b4
call fcn.00401370
mov eax, dword [ebp - 0x11c]
add esp, 0x10
cmp dword [ebp - 0x120], 6
jne 0x408437
cmp eax, 2
jne 0x408437
call fcn.0040b4b0
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x407f57
push 0x80004005
call fcn.004021b0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x130], edi
push 0
mov dword [ebp - 4], 0
mov ebx, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0
call ebx
test eax, eax
jbe 0x407fc8
push eax
push eax
lea ecx, [ebp - 0x130]
call fcn.00401f20
push eax
call ebx
mov edi, dword [ebp - 0x130]
mov eax, dword [edi - 8]
push eax
push edi
call fcn.00428f86
add esp, 8
test eax, eax
jl 0x40800c
cmp eax, dword [edi - 8]
jg 0x40800c
mov dword [edi - 0xc], eax
xor ecx, ecx
mov word [edi + eax*2], cx
push edi
push str._SystemDir___s_r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [edi - 0xc], 0
jne 0x408016
push str._SystemDir__Get_SystemDir_Failed._r_n
mov eax, 0x4556b4
call fcn.00401370
lea eax, [edi - 0x10]
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40844a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40844a
push 0x80070057
call fcn.004021b0
lea ecx, [ebp - 0x134]
call fcn.00402220
push str.usbmon.dll
push edi
lea ecx, [ebp - 0x134]
push str._s_s
push ecx
mov byte [ebp - 4], 1
call fcn.004049b0
mov edi, dword [ebp - 0x134]
push edi
push str._ModulePath__ModulePath___s_r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 0x14
add edi, 0xfffffff0
mov dword [ebp - 0x128], esp
mov ebx, esp
push edi
call fcn.00401a60
add esp, 4
lea edx, [ebp - 0x12c]
add eax, 0x10
push edx
mov dword [ebx], eax
call fcn.00408610
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x12c]
push eax
push str._GetFileVersion__File_Version___s__r_n
mov eax, 0x4556b4
call fcn.00401370
mov ecx, dword [ebp - 0x12c]
add esp, 8
cmp dword [ecx - 0xc], 0
je 0x408414
lea ecx, [ebp - 0x14c]
call fcn.0040e3ba
push 0
lea ecx, [ebp - 0x12c]
mov byte [ebp - 4], 3
call fcn.00401f20
test eax, eax
je 0x4080d4
lea ebx, [ebp - 0x14c]
mov edi, eax
call fcn.00408470
mov eax, dword [ebp - 0x144]
cmp eax, 5
jl 0x4081ed
dec eax
push eax
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [ebp - 0x144], 0
jg 0x408105
call fcn.0040bb22
mov edx, dword [ebp - 0x148]
movzx eax, word [edx]
push eax
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [ebp - 0x144], 1
jg 0x40812f
call fcn.0040bb22
mov ecx, dword [ebp - 0x148]
movzx eax, word [ecx + 2]
movzx edx, ax
push edx
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [ebp - 0x144], 2
jg 0x40815d
call fcn.0040bb22
mov eax, dword [ebp - 0x148]
movzx eax, word [eax + 4]
movzx ecx, ax
push ecx
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [ebp - 0x144], 3
jg 0x40818b
call fcn.0040bb22
mov edx, dword [ebp - 0x148]
movzx eax, word [edx + 6]
push eax
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
cmp dword [ebp - 0x144], 4
jg 0x4081b6
call fcn.0040bb22
mov ecx, dword [ebp - 0x148]
movzx eax, word [ecx + 8]
movzx edx, ax
push edx
push str._GetFileVersion__File_Version___d__r_n
mov eax, 0x4556b4
call fcn.00401370
mov eax, dword [ebp - 0x144]
add esp, 8
add eax, 0xfffffffc
push eax
push 4
lea ecx, [ebp - 0x14c]
call fcn.0040e536
lea ecx, [ebp - 0x160]
call fcn.0040e3ba
lea ecx, [ebp - 0x128]
call fcn.00402220
mov byte [ebp - 4], 5
push str.6.2.9200.20569
lea ecx, [ebp - 0x128]
mov dword [ebp - 0x138], 0
call fcn.004020a0
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x160]
call fcn.0040e3e1
push 0
lea ecx, [ebp - 0x128]
call fcn.00401f20
test eax, eax
je 0x40824e
lea ebx, [ebp - 0x160]
mov edi, eax
call fcn.00408470
mov ecx, dword [ebp - 0x128]
push ecx
push str._CheckVersion__CheckVersion___s__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
lea edx, [ebp - 0x160]
push edx
lea eax, [ebp - 0x14c]
push eax
call fcn.00408530
cmp eax, 1
je 0x40836b
test eax, eax
je 0x40836b
push str.6.2.9200.16465
lea ecx, [ebp - 0x128]
call fcn.004020a0
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x160]
call fcn.0040e3e1
push 0
lea ecx, [ebp - 0x128]
call fcn.00401f20
test eax, eax
je 0x4082c8
lea ebx, [ebp - 0x160]
mov edi, eax
call fcn.00408470
mov ecx, dword [ebp - 0x128]
push ecx
push str._CheckVersion__CheckVersion___s__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
lea edx, [ebp - 0x160]
push edx
lea eax, [ebp - 0x14c]
push eax
call fcn.00408530
cmp eax, 1
je 0x4082fd
test eax, eax
jne 0x408375
push str.6.2.9200.20000
lea ecx, [ebp - 0x128]
call fcn.004020a0
push 0xffffffffffffffff
push 0
lea ecx, [ebp - 0x160]
call fcn.0040e3e1
push 0
lea ecx, [ebp - 0x128]
call fcn.00401f20
test eax, eax
je 0x40833a
lea ebx, [ebp - 0x160]
mov edi, eax
call fcn.00408470
mov ecx, dword [ebp - 0x128]
push ecx
push str._CheckVersion__CheckVersion___s__r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
lea edx, [ebp - 0x160]
push edx
lea eax, [ebp - 0x14c]
push eax
call fcn.00408530
cmp eax, 0xffffffff
jne 0x408375
mov dword [ebp - 0x138], 1
push 0
lea ecx, [ebp - 0x164]
push ecx
push 0
call fcn.00402510
dec eax
neg eax
sbb eax, eax
and eax, 0xffffff00
add eax, 0x100
or eax, 0x20006
push eax
push 0
push 0
push 0
push str.SoftwareEPSONEBPrinter4
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x4083eb
push 4
lea edx, [ebp - 0x138]
push edx
push 4
push eax
mov eax, dword [ebp - 0x164]
push str.Win8_KB2785094
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov ecx, dword [ebp - 0x138]
push ecx
push str.WriteRegistry_Win8_KB2785094___d_r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
lea ecx, [ebp - 0x128]
call fcn.0040adc0
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 3
call fcn.0040e3d1
lea ecx, [ebp - 0x14c]
mov byte [ebp - 4], 2
call fcn.0040e3d1
lea ecx, [ebp - 0x12c]
call fcn.0040adc0
lea ecx, [ebp - 0x134]
call fcn.0040adc0
lea ecx, [ebp - 0x130]
call fcn.0040adc0
jmp 0x40844a
push eax
push str._OSVersion__This_OS_is_not_the_target_OS._r_n
mov eax, 0x4556b4
call fcn.00401370
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004288f2
mov esp, ebp
pop ebp
ret