Function at 0x40d700
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x527020
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x587730]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x1c], edi
push str.Compsetupstarter
lea ecx, [ebp - 0x18]
mov dword [ebp - 4], 0
call fcn.00406480
mov byte [ebp - 4], 1
call fcn.0041a2c9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d75f
push 0x80004005
call fcn.00405680
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x14], eax
mov byte [ebp - 4], 2
call fcn.0041a2c9
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40d78c
push 0x80004005
call fcn.00405680
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
lea ecx, [edi + 0x18c]
push ecx
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 3
call fcn.00406ac0
mov eax, dword [edi + 0x80]
push eax
lea edx, [ebp - 0x28]
push edx
call fcn.004046d0
push eax
lea eax, [ebp - 0x24]
push 0x536ec8
mov bl, 4
push eax
mov byte [ebp - 4], bl
call fcn.00405d20
add esp, 0x14
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 5
call fcn.00406170
mov eax, dword [ebp - 0x24]
add eax, 0xfffffff0
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d80a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
mov byte [ebp - 4], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d82d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [ebp - 0x14]
mov ecx, dword [ebx - 8]
mov eax, 1
sub eax, dword [ebx - 4]
or ecx, eax
jge 0x40d84c
push 0
lea ecx, [ebp - 0x14]
call fcn.00406f10
mov ebx, dword [ebp - 0x14]
mov edx, dword [edi + 0x188]
lea ecx, [ebp - 0x20]
push ecx
push 0x2001f
push 0
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40da7f
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0050cf35
add esp, 8
test eax, eax
js 0x40d8d1
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx - 8]
jg 0x40d8d1
mov dword [ecx - 0xc], eax
mov edx, dword [ebp + 8]
xor ecx, ecx
mov word [edx + eax*2], cx
mov eax, dword [ebp + 8]
cmp dword [eax - 0xc], ecx
lea ecx, [ebp + 8]
je 0x40d8ae
push 2
push 0x53c708
call fcn.00406170
jmp 0x40d8ba
push 1
push 0x53c704
call fcn.00406dd0
lea ecx, [ebp + 8]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406ac0
mov edx, dword [ebp + 8]
mov ebx, dword [edx - 0xc]
add ebx, 3
jns 0x40d8db
push 0x80070057
call fcn.00405680
mov esi, dword [ebp - 0x10]
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, ebx
or eax, ecx
jge 0x40d8fb
push ebx
lea ecx, [ebp - 0x10]
call fcn.00406f10
mov esi, dword [ebp - 0x10]
mov eax, ebx
cmp ebx, 0xffffffff
jne 0x40d90f
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0050cf35
add esp, 8
test eax, eax
js 0x40d8d1
cmp eax, dword [esi - 8]
jg 0x40d8d1
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
lea eax, [ebx - 3]
test eax, eax
js 0x40d8d1
mov edi, dword [esi - 0xc]
cmp eax, edi
jge 0x40d8d1
cmp dword [esi - 4], 1
jle 0x40d941
push edi
lea ecx, [ebp - 0x10]
call fcn.004070f0
mov esi, dword [ebp - 0x10]
xor ecx, ecx
mov word [esi + ebx*2 - 6], cx
test edi, edi
js 0x40d8d1
cmp edi, dword [esi - 8]
jg 0x40d8d1
xor edx, edx
lea eax, [ebx - 2]
mov dword [esi - 0xc], edi
mov word [esi + edi*2], dx
test eax, eax
js 0x40d8d1
mov edi, dword [esi - 0xc]
cmp eax, edi
jge 0x40d8d1
cmp dword [esi - 4], 1
jle 0x40d982
push edi
lea ecx, [ebp - 0x10]
call fcn.004070f0
mov esi, dword [ebp - 0x10]
xor ecx, ecx
mov word [esi + ebx*2 - 4], cx
test edi, edi
js 0x40d8d1
cmp edi, dword [esi - 8]
jg 0x40d8d1
xor edx, edx
dec ebx
mov dword [esi - 0xc], edi
mov word [esi + edi*2], dx
js 0x40d8d1
mov edi, dword [esi - 0xc]
cmp ebx, edi
jge 0x40d8d1
cmp dword [esi - 4], 1
jle 0x40d9c7
push edi
lea ecx, [ebp - 0x10]
call fcn.004070f0
mov esi, dword [ebp - 0x10]
xor ecx, ecx
mov word [esi + ebx*2], cx
test edi, edi
js 0x40d8d1
cmp edi, dword [esi - 8]
jg 0x40d8d1
mov dword [esi - 0xc], edi
xor edx, edx
mov word [esi + edi*2], dx
mov eax, dword [esi - 8]
push eax
push esi
call fcn.0050cf35
add esp, 8
test eax, eax
js 0x40d8d1
cmp eax, dword [esi - 8]
jg 0x40d8d1
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
mov ecx, dword [esi - 8]
mov edi, dword [esi - 0xc]
mov eax, 1
sub eax, dword [esi - 4]
or ecx, eax
jge 0x40da2d
push 0
lea ecx, [ebp - 0x10]
call fcn.00406f10
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x20]
lea edx, [edi + edi + 2]
push edx
push esi
push 7
push 0
push 0x53a1b0
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebp - 0x18]
test eax, eax
mov eax, dword [ebp - 0x1c]
push esi
je 0x40da5b
push str._Set_MSI_Clients:__s
push edx
push 0
jmp 0x40da63
push str.__Set_MSI_Clients:__s
push edx
push 0xa
mov ecx, dword [eax + 0x24]
add eax, 0x24
push eax
mov eax, dword [ecx + 0x6c]
call eax
mov ecx, dword [ebp - 0x20]
add esp, 0x14
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x14]
add esi, 0xfffffff0
mov byte [ebp - 4], 2
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40da9f
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dabf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40dae2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40db08
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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