Function at 0x40d850
Capabilities:
Delete registry value
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x43f548
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push ebp
push esi
push edi
mov eax, dword [0x456ea4]
xor eax, esp
push eax
lea eax, [esp + 0x3c]
mov dword fs:[0], eax
mov ebp, ecx
call fcn.0041890e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d893
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x18], eax
mov dword [esp + 0x44], 0
call fcn.0041890e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d8c5
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x14], eax
mov byte [esp + 0x44], 1
call fcn.0041890e
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d8f4
push 0x80004005
call fcn.00406210
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [esp + 0x28], edi
lea ecx, [ebp + 0x14c]
mov byte [esp + 0x44], 2
call fcn.004217e5
push 0x1d
push str.SoftwareSiemensShared_Tools
lea ecx, [esp + 0x20]
call fcn.004073e0
lea ecx, [ebp + 0x10c]
push ecx
lea edx, [esp + 0x30]
push 0x442694
push edx
call fcn.00406010
push str.Clients
push eax
lea eax, [esp + 0x44]
mov bl, 3
push eax
mov byte [esp + 0x5c], bl
call fcn.00405f60
add esp, 0x18
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x20]
mov byte [esp + 0x4c], 4
call fcn.00406540
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov byte [esp + 0x44], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d98c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
mov byte [esp + 0x44], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d9b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x18]
mov eax, 1
sub eax, dword [ecx - 4]
mov ecx, dword [ecx - 8]
or ecx, eax
jge 0x40d9cf
push 0
lea ecx, [esp + 0x1c]
call fcn.00407500
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x1c]
push ecx
push 0x2001f
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40dc18
push eax
push eax
lea eax, [esp + 0x28]
push eax
mov eax, dword [esp + 0x28]
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x40]
push edx
push 0
push 0
push 0
push 0
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x40db7e
mov esi, dword [esp + 0x20]
add dword [esp + 0x24], 1
add esi, 1
xor ebx, ebx
cmp dword [esp + 0x30], ebx
mov dword [esp + 0x20], esi
jbe 0x40db94
jmp 0x40da45
mov esi, dword [esp + 0x20]
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], esi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, esi
or eax, ecx
jge 0x40da70
push esi
lea ecx, [esp + 0x2c]
call fcn.00407500
mov edi, dword [esp + 0x28]
test esi, esi
jl 0x40db74
cmp esi, dword [edi - 8]
jg 0x40db74
mov dword [edi - 0xc], esi
mov word [edi + esi*2], 0
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x2c]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x40dab1
push esi
lea ecx, [esp + 0x18]
call fcn.00407500
mov edx, dword [esp + 0x14]
test esi, esi
mov eax, edx
jl 0x40db74
cmp esi, dword [edx - 8]
jg 0x40db74
mov dword [edx - 0xc], esi
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x34]
push ecx
push edi
mov word [edx + esi*2], 0
lea edx, [esp + 0x40]
push edx
mov edx, dword [esp + 0x28]
push 0
lea ecx, [esp + 0x3c]
push ecx
push eax
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40db4e
mov edx, dword [esp + 0x14]
test edx, edx
je 0x40db12
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40db01
sub eax, esi
sar eax, 1
js 0x40db74
cmp eax, dword [edx - 8]
jg 0x40db74
mov dword [edx - 0xc], eax
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x14]
mov word [ecx + eax*2], 0
push edx
lea ecx, [ebp + 0x14c]
call fcn.00421886
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x1c]
push edx
lea eax, [ebp + 0x1c]
push str.Save_Client:__s
push 0xa
push eax
mov eax, dword [ecx + 0x68]
call eax
jmp 0x40db62
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0x68]
push ebx
lea eax, [ebp + 0x1c]
push str.Save_Client:_EnumValue__d__failed
push 0
push eax
call edx
add ebx, 1
add esp, 0x10
cmp ebx, dword [esp + 0x30]
jb 0x40da41
jmp 0x40db94
push 0x80070057
call fcn.00406210
mov ecx, dword [ebp + 0x1c]
mov edx, dword [ecx + 0x68]
lea eax, [ebp + 0x1c]
push str.Save_Clients:_QueryInfoKey_failed
push 0
push eax
call edx
add esp, 0xc
cmp byte [esp + 0x4c], 0
je 0x40dc0d
mov esi, dword [ebp + 0x150]
test esi, esi
je 0x40dc0d
mov ebx, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
test esi, esi
mov eax, esi
je 0x40dc9c
mov esi, dword [esi]
add eax, 8
push eax
lea ecx, [esp + 0x18]
call fcn.00407040
mov edx, dword [esp + 0x14]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
or ecx, eax
jge 0x40dbe6
push 0
lea ecx, [esp + 0x18]
call fcn.00407500
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
push edx
push eax
call ebx
mov edx, dword [esp + 0x14]
mov ecx, dword [ebp + 0x1c]
push edx
lea eax, [ebp + 0x1c]
push str.Delete_Client:__s
push 0xa
push eax
mov eax, dword [ecx + 0x68]
call eax
add esp, 0x10
test esi, esi
jne 0x40dbab
mov ecx, dword [esp + 0x1c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [edi - 0x10]
mov byte [esp + 0x44], 1
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40dc39
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x44], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dc5e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x44], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dc86
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x3c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x34
ret 4
call fcn.0041864b
int3