Function at 0x40cde0
Capabilities:
Check os version
Delete registry key
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42c91b
mov eax, dword fs:[0]
push eax
mov eax, 0x8db0
call fcn.00417900
mov eax, dword [0x43d180]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x8db4], ecx
push 0x313c
lea eax, [ebp - 0x3b74]
mov dword [ebp - 0x3b78], 0
push 0
push eax
call fcn.00417930
xor eax, eax
mov dword [ebp - 0x8da8], 0
push 0x206
push eax
mov word [ebp - 0x628], ax
xor esi, esi
lea eax, [ebp - 0x626]
mov dword [ebp - 0x8da4], esi
xor edi, edi
push eax
mov dword [ebp - 0x8db0], edi
call fcn.00417930
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x218], ax
lea eax, [ebp - 0x216]
push eax
call fcn.00417930
mov ecx, dword [ebp - 0x8db4]
lea eax, [ebp - 0x8da8]
add esp, 0x24
xor ebx, ebx
mov dword [ebp - 0x8da0], ebx
push eax
lea eax, [ebp - 0x3b78]
push eax
call fcn.0040cb10
test eax, eax
jne 0x40d218
mov dword [ebp - 0x8db8], ebx
cmp dword [ebp - 0x8da8], ebx
jbe 0x40d218
jmp 0x40ced0
cmp dword [ebp + eax - 0x3968], 1
jbe 0x40d1e2
lea edi, [ebp - 0x3964]
add edi, eax
push edi
push str.__4___DRIVER_NAME:__s_n
call fcn.00401350
add esp, 8
lea eax, [ebp - 0x628]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push str.IsWow64Process
push str.kernel32
mov dword [ebp - 0x8dac], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x40cf3d
lea eax, [ebp - 0x8dac]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call esi
push 0x5c
push edi
call fcn.0041681d
cmp dword [ebp - 0x8dac], 0
push eax
lea eax, [ebp - 0x628]
push eax
lea eax, [ebp - 0x218]
je 0x40cf63
push str._sSysnativeDrivers_s.sys
jmp 0x40cf68
push str._sSystem32Drivers_s.sys
push 0x104
push eax
call fcn.00401280
add esp, 0x1c
lea eax, [ebp - 0x3c8c]
push 0x114
push 0
push eax
call fcn.00417930
add esp, 0xc
mov dword [ebp - 0x3c8c], 0x114
lea eax, [ebp - 0x3c8c]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x3c88], 6
jne 0x40cfc4
mov eax, dword [ebp - 0x3c84]
cmp eax, 2
jne 0x40cfbb
mov al, 1
jmp 0x40cfc6
cmp eax, 3
jne 0x40cfc4
mov al, 1
jmp 0x40cfc6
xor al, al
test al, al
je 0x40d0a4
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x830], ax
lea eax, [ebp - 0x82e]
push eax
call fcn.00417930
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x420], ax
lea eax, [ebp - 0x41e]
push eax
call fcn.00417930
lea eax, [ebp - 0x830]
push eax
call fcn.0040c850
lea ecx, [ebp - 0x420]
add esp, 0x1c
lea esi, [ebp - 0x830]
mov eax, ecx
mov edx, 0x400
sub esi, eax
jmp 0x40d030
lea eax, [edx + 0x7ffffbfe]
test eax, eax
je 0x40d04e
movzx eax, word [esi + ecx]
test ax, ax
je 0x40d04e
mov word [ecx], ax
add ecx, 2
dec edx
jne 0x40d030
jmp 0x40d052
test edx, edx
jne 0x40d055
sub ecx, 2
xor eax, eax
push str.gidsigveri.dll
mov word [ecx], ax
lea eax, [ebp - 0x420]
push 0x400
push eax
call fcn.00401200
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, eax
xor eax, eax
test ecx, ecx
je 0x40d099
push str.VerifyEmbeddedSignature2
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40d211
lea ecx, [ebp - 0x218]
push ecx
call eax
jmp 0x40d0b6
mov ecx, dword [ebp - 0x8db4]
lea eax, [ebp - 0x218]
push eax
call fcn.0040d260
test eax, eax
jne 0x40d1d6
push edi
push 0x42de44
lea eax, [ebp - 0x409c]
mov dword [ebp - 0x40a4], 0x418
push 0x104
push eax
mov dword [ebp - 0x40a0], 0xc00003e8
call fcn.00401280
lea eax, [ebp - 0x40a4]
push eax
call sub.GIDBIN1.dll_GIDSDKAddEvent
mov esi, dword [ebp - 0x8da4]
add esp, 0x14
inc esi
mov dword [ebp - 0x8da4], esi
test ebx, ebx
jne 0x40d110
call fcn.0040c910
mov ebx, eax
mov eax, dword [ebp - 0x8da0]
test eax, eax
jne 0x40d141
push eax
lea eax, [ebp - 0x8da0]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push str.UntrustedDrivers
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov eax, dword [ebp - 0x8da0]
push 0
push 0
push 0
push 0
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x40d1c9
push 4
lea eax, [ebp - 0x8dbc]
mov dword [ebp - 0x8dbc], 0
push eax
push 4
push 0
push edi
push dword [ebp - 0x8da0]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x8d9c]
call fcn.00408870
push edi
push 0x42de44
lea eax, [ebp - 0xa38]
mov dword [ebp - 4], 0
push 0x104
push eax
call fcn.00401280
add esp, 0x10
lea eax, [ebp - 0xa38]
lea ecx, [ebp - 0x8d9c]
push eax
call fcn.0040a8b0
lea ecx, [ebp - 0x8d9c]
mov dword [ebp - 4], 0xffffffff
call fcn.00408930
mov edi, 0xa
mov dword [ebp - 0x8db0], edi
jmp 0x40d1e2
mov edi, dword [ebp - 0x8db0]
mov esi, dword [ebp - 0x8da4]
mov eax, dword [ebp - 0x8db8]
inc eax
mov dword [ebp - 0x8db8], eax
imul eax, eax, 0x314
cmp eax, dword [ebp - 0x8da8]
jb 0x40ced0
test esi, esi
je 0x40d218
push 0
call sub.GIDBIN1.dll_GIDSDKShowBadDWarn
add esp, 4
jmp 0x40d22f
mov eax, 0xa
jmp 0x40d242
call fcn.0040c910
mov ebx, eax
test ebx, ebx
je 0x40d22f
push str.UntrustedDrivers
push ebx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push ebx
call esi
push dword [ebp - 0x8da0]
call esi
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00416230
mov esp, ebp
pop ebp
ret