Function at 0x40f020
Capabilities:
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x43f748
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x456ea4]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [esp + 0x34]
push eax
lea ecx, [esp + 0x18]
call fcn.00406960
push str.SOFTWARESiemensShared_ToolsCompSetup
lea ecx, [esp + 0x38]
mov dword [esp + 0x30], 0
call fcn.00406960
mov ecx, dword [edi + 0x1c]
mov edx, dword [ecx + 0x68]
lea esi, [edi + 0x1c]
push str._In_function_SetSetupSucceeded
push 9
push esi
mov byte [esp + 0x38], 1
call edx
mov edx, dword [esp + 0x40]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
add esp, 0xc
or ecx, eax
jge 0x40f0aa
push 0
lea ecx, [esp + 0x38]
call fcn.00407500
mov edx, dword [esp + 0x34]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [esp + 0x18]
push eax
push 0x2001f
push 0
push edx
push 0x80000002
call ebp
test eax, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov dword [esp + 0x1c], eax
jne 0x40f11a
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 8]
mov esi, dword [eax - 0xc]
mov ecx, 1
sub ecx, dword [eax - 4]
or edx, ecx
jge 0x40f0f7
push 0
lea ecx, [esp + 0x18]
call fcn.00407500
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea ecx, [esi + esi + 2]
push ecx
push eax
push 1
push 0
push str.SetupSucceeded
push edx
call ebx
mov eax, dword [esp + 0x18]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40f12c
mov ecx, dword [esi]
mov edx, dword [ecx + 0x68]
push 0x4486d0
push 2
push esi
call edx
add esp, 0xc
push 0x1d
push str.SoftwareSiemensShared_Tools
lea ecx, [esp + 0x3c]
call fcn.004073e0
add edi, 0x10c
push edi
lea eax, [esp + 0x24]
push 0x442694
push eax
call fcn.00406010
add esp, 0xc
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x3c]
mov byte [esp + 0x34], 2
call fcn.00406540
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f18f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x34]
mov ecx, dword [edx - 8]
mov eax, 1
sub eax, dword [edx - 4]
or ecx, eax
jge 0x40f1b1
push 0
lea ecx, [esp + 0x38]
call fcn.00407500
mov edx, dword [esp + 0x34]
lea ecx, [esp + 0x18]
push ecx
push 0x2001f
push 0
push edx
push 0x80000002
call ebp
test eax, eax
jne 0x40f20f
mov eax, dword [esp + 0x14]
mov edx, dword [eax - 8]
mov esi, dword [eax - 0xc]
mov ecx, 1
sub ecx, dword [eax - 4]
or edx, ecx
jge 0x40f1ee
push 0
lea ecx, [esp + 0x18]
call fcn.00407500
mov eax, dword [esp + 0x14]
lea edx, [esi + esi + 2]
push edx
push eax
mov eax, dword [esp + 0x20]
push 1
push 0
push str.SetupSucceeded
push eax
call ebx
mov ecx, dword [esp + 0x18]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
mov byte [esp + 0x2c], 0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40f234
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 dword [esp + 0x2c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40f25c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 4