Function at 0x405810
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x40a95b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push ebp
push esi
mov dword [esp + 0x24], ecx
xor esi, esi
push edi
lea ecx, [esp + 0x14]
mov dword [esp + 0x20], esi
call sub.MFC42.DLL_CString::CString
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, 1
mov dword [esp + 0x144], esi
mov dword [esp + 0x24], edi
push edi
push str.SystemControlSet0
lea eax, [esp + 0x1c]
push str._s_0.2d
push eax
call sub.MFC42.DLL_CString::Format
mov edx, dword [esp + 0x24]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
add esp, 0x10
lea ecx, [esp + 0x10]
push ecx
push edx
push 0x80000002
call esi
test eax, eax
jne 0x405a26
lea eax, [esp + 0x14]
push str.ServicesESudisk
lea ecx, [esp + 0x30]
push eax
push ecx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea edx, [esp + 0x10]
push edx
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
lea ecx, [esp + 0x2c]
sete bl
call fcn.0040960e
test bl, bl
je 0x405a26
mov ecx, dword [esp + 0x10]
lea eax, [esp + 0x18]
push 4
push eax
xor ebx, ebx
push 4
push ebx
push str.Type
push ecx
mov dword [esp + 0x30], 1
call ebp
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x18]
push 4
push edx
push 4
push ebx
push str.ErrorControl
push eax
mov dword [esp + 0x30], ebx
call ebp
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x18]
push 4
push ecx
push 4
push ebx
push str.Start
push edx
mov dword [esp + 0x30], ebx
call ebp
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
push str.ControlClass4D36E967_E325_11CE_BFC1_08002BE10318
lea edx, [esp + 0x38]
push ecx
push edx
call sub.MFC42.DLL_operator
mov eax, dword [eax]
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x80000002
call esi
test eax, eax
lea ecx, [esp + 0x34]
sete bl
call fcn.0040960e
test bl, bl
je 0x405a26
lea edx, [esp + 0x1c]
lea eax, [esp + 0x38]
push edx
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push eax
push ecx
push 0
push str.UpperFilters
push edx
mov dword [esp + 0x34], 0x104
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405a26
mov eax, dword [esp + 0x1c]
push str.ESudisk
lea ecx, [esp + 0x3c]
push eax
push ecx
mov ecx, dword [esp + 0x34]
call fcn.00405a70
test eax, eax
jne 0x405a0f
mov edi, str.ESudisk
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov edx, dword [esp + 0x1c]
not ecx
sub edi, ecx
lea ebx, [esp + edx + 0x37]
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ESudisk
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
add edx, ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x1c], edx
mov byte [esp + edx + 0x38], al
inc edx
push edx
mov edx, dword [esp + 0x34]
push ecx
push edx
push eax
mov eax, dword [esp + 0x20]
push str.UpperFilters
push eax
call ebp
test eax, eax
jne 0x405a17
mov dword [esp + 0x20], 1
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x24]
inc edi
cmp edi, 0x14
mov dword [esp + 0x24], edi
jl 0x405858
lea ecx, [esp + 0x14]
mov dword [esp + 0x144], 0xffffffff
call fcn.0040960e
mov ecx, dword [esp + 0x13c]
mov eax, dword [esp + 0x20]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x138
ret