Function at 0x40bc20
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x541ea6
mov eax, dword fs:[0]
push eax
mov eax, 0x1814
call fcn.00519540
mov eax, dword [0x594ca8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea ecx, [ebp - 0x181c]
call fcn.0040b9f0
xor edi, edi
mov dword [ebp - 4], edi
mov eax, dword [ebp - 0x181c]
mov ecx, 0x5704e4
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40bc96
cmp dx, di
je 0x40bc92
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40bc96
add eax, 4
add ecx, 4
cmp dx, di
jne 0x40bc70
xor eax, eax
jmp 0x40bc9b
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, edi
sete al
test al, al
je 0x40bf4a
lea esi, [ebp - 0x1814]
call section..text
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebx, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jle 0x40bcd9
mov dword [ebp - 0x1818], edi
jmp 0x40bd14
lea eax, [esi + esi]
call fcn.0051b8f0
mov edi, esp
test edi, edi
je 0x40bd0a
push esi
push edi
push 0xffffffffffffffff
lea edx, [ebp - 0x810]
xor ecx, ecx
push edx
push ecx
push 3
mov word [edi], cx
call ebx
neg eax
sbb eax, eax
and eax, edi
mov dword [ebp - 0x1818], eax
jmp 0x40bd14
mov dword [ebp - 0x1818], 0
lea eax, [ebp - 0xc14]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edi, [eax + 1]
cmp edi, 0x3fffffff
jg 0x40bd57
lea eax, [edi + edi]
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40bd57
push edi
push esi
push 0xffffffffffffffff
lea edx, [ebp - 0xc14]
xor ecx, ecx
push edx
push ecx
push 3
mov word [esi], cx
call ebx
neg eax
sbb eax, eax
and eax, esi
jmp 0x40bd59
xor eax, eax
mov ecx, dword [ebp - 0x1818]
mov edx, dword [ebp - 0x814]
push ecx
push edx
push eax
lea eax, [ebp - 0x181c]
push str._s__lu__s
push eax
call fcn.00403cc0
mov eax, dword [ebp - 0x181c]
add esp, 0x14
mov ecx, 0x5704e4
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40bdad
test dx, dx
je 0x40bda9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40bdad
add eax, 4
add ecx, 4
test dx, dx
jne 0x40bd87
xor eax, eax
jmp 0x40bdb2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x40bf4a
call fcn.00417597
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40bdd9
push 0x80004005
call fcn.00404860
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x1818], eax
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths
lea ecx, [ebp - 0x1818]
push str._s1905Key.exe
push ecx
mov byte [ebp - 4], 1
call fcn.00403cc0
mov edi, dword [ebp - 0x1818]
add esp, 0xc
test edi, edi
jne 0x40be16
xor eax, eax
jmp 0x40be3f
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40be29
xor eax, eax
jmp 0x40be3f
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
lea edx, [ebp - 0x1820]
push edx
lea ecx, [ebp - 0x1818]
push ecx
push 0
push 4
push 0
push 0
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x40be74
mov edx, dword [ebp - 0x1818]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ebx, dword [ebp - 0x181c]
test ebx, ebx
je 0x40bea9
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40be91
xor ebx, ebx
jmp 0x40bea9
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push ebx
push eax
call fcn.00403b60
mov ebx, eax
test edi, edi
jne 0x40beb1
xor eax, eax
jmp 0x40beda
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jle 0x40bec4
xor eax, eax
jmp 0x40beda
lea esi, [eax + eax]
mov eax, esi
call fcn.0051b8f0
mov eax, esp
push 3
push esi
push edi
push eax
call fcn.00403b60
mov ecx, dword [ebp - 0x181c]
mov esi, dword [ecx - 0xc]
lea edx, [ebp - 0x1818]
push edx
push 2
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40bf2a
mov ecx, dword [ebp - 0x1818]
lea eax, [esi + esi]
push eax
push ebx
push 1
push 0
push 0x57111c
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40bf2a
mov edx, dword [ebp - 0x1818]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [edi - 0x10]
mov byte [ebp - 4], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bf4a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x181c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40bf73
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x1830]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005155a4
mov esp, ebp
pop ebp
ret