Function at 0x40b780
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x541ee8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
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 esi, [ebp - 0x20]
call fcn.0040b330
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0040b380
add esp, 4
mov byte [ebp - 4], 1
call fcn.00417597
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b7e6
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 - 0x14], eax
push str.SoftwareMicrosoftWindowsCurrentVersionApp_Paths
lea ecx, [ebp - 0x14]
push str._s1905Key.exe
push ecx
mov byte [ebp - 4], 2
call fcn.00403cc0
mov ebx, dword [ebp - 0x14]
add esp, 0xc
test ebx, ebx
je 0x40b853
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b853
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40b853
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40b855
xor eax, eax
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x18]
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 0x40b881
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
test ecx, ecx
jne 0x40b890
mov dword [ebp - 0x14], ecx
jmp 0x40b8d8
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b8d0
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40b8d0
mov eax, dword [ebp - 0x18]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push eax
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40b8d2
xor eax, eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
test ebx, ebx
jne 0x40b8e0
xor eax, eax
jmp 0x40b922
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b91d
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b8f0
mov esi, esp
test esi, esi
je 0x40b91d
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ebx
push 0
push 3
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x40b91f
xor eax, eax
mov ecx, dword [ebp - 0x1c]
mov esi, dword [ecx - 0xc]
lea ecx, [ebp - 0x18]
push ecx
push 2
push 0
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40b966
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
lea edx, [esi + esi]
push edx
push eax
push 1
push 0
push 0x570674
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x40b966
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
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 0x40b986
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b9a9
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 - 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b9cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x30]
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