Function at 0x40b6a0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44d8a8
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x468cb0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x20]
push 0x45b844
push eax
mov dword [ebp - 0x20], str.CRegInfo::Win7_DisableDiskRmb
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x18], 1
call fcn.0040a3d0
mov dword [ebp - 4], 0
push dword [0x46da94]
lea eax, [ebp - 0x20]
push str.g_bRtsUStorExit:__d_n
push eax
call fcn.0040a3d0
mov eax, dword [0x46d77c]
push dword [eax + 0x14]
push dword [eax + 0x10]
lea eax, [ebp - 0x20]
push str.OS_Version:__d__d_n
push eax
call fcn.0040a3d0
mov eax, dword [0x46d77c]
add esp, 0x24
cmp dword [eax + 0x10], 6
jb 0x40b921
cmp dword [eax + 0x14], 1
jb 0x40b921
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
push str.SYSTEMCurrentControlSetControlDeviceOverrides_
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 1
call fcn.00401c90
mov byte [ebp - 4], 2
call fcn.0040e738
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40b777
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 3
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x40b797
push str.RSPCIESTORGenDiskLocationPaths
jmp 0x40b7a5
cmp eax, 2
jne 0x40b8d8
push str.RSUSBSTORGenDiskLocationPaths
lea eax, [ebp - 0x14]
push eax
call fcn.00404280
mov edi, dword [ebp - 0x14]
add esp, 8
push dword [edi - 0xc]
lea ecx, [ebp - 0x10]
push edi
call fcn.00401380
mov eax, dword [0x46d77c]
push dword [ebp - 0x10]
cmp dword [eax], 0
lea eax, [ebp - 0x20]
mov ecx, 0xf013f
push str.SetDWORDValue1:__s_n
mov esi, 0xf003f
push eax
cmovne esi, ecx
call fcn.0040a3d0
add esp, 0xc
lea ecx, [ebp - 0x2c]
push 0
push 0
push esi
push 0
push 0
push dword [ebp - 0x10]
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0040bd60
test eax, eax
jne 0x40b860
push dword [ebp - 0x10]
lea eax, [ebp - 0x20]
push str.SetDWORDValue4:__s_n
push eax
call fcn.0040a3d0
mov ebx, dword [ebp - 0x2c]
add esp, 0xc
lea eax, [ebp + 8]
push 4
push eax
push 4
push 0
push str.Removable
push ebx
mov dword [ebp + 8], 0
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov esi, eax
test esi, esi
jne 0x40b847
push ebx
call dword [sym.imp.ADVAPI32.dll_RegFlushKey]
test ebx, ebx
je 0x40b857
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor ebx, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x28], 0
jmp 0x40b866
mov ebx, dword [ebp - 0x2c]
mov esi, dword [ebp + 8]
test esi, esi
jne 0x40b8d8
call fcn.0040e738
xor ecx, ecx
mov edx, eax
test edx, edx
setne cl
test ecx, ecx
jne 0x40b886
push 0x80004005
call fcn.00401b40
mov eax, dword [edx]
mov ecx, edx
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push str.Set_None_Removable_Disk_OK_n
push eax
mov byte [ebp - 4], 4
call fcn.00404280
mov esi, dword [ebp + 8]
push esi
lea eax, [ebp - 0x20]
push 0x45b934
push eax
call fcn.0040a3d0
add esi, 0xfffffff0
add esp, 0x14
mov byte [ebp - 4], 3
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40b8d8
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
lea edx, [edi - 0x10]
or edi, 0xffffffff
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
mov ecx, edi
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40b8f8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x10]
add edx, 0xfffffff0
lea eax, [edx + 0xc]
lock xadd dword [eax], edi
dec edi
test edi, edi
jg 0x40b916
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test ebx, ebx
je 0x40b921
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x20]
push str.EXIT________n
push eax
call fcn.0040a3d0
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4