Function at 0x40b710
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.0040b2c0
lea eax, [ebp - 0x1c]
push eax
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0040b310
add esp, 4
mov byte [ebp - 4], 1
call fcn.00417515
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x40b776
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 0x40b7e3
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b7e3
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b880
mov esi, esp
test esi, esi
je 0x40b7e3
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 0x40b7e5
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 0x40b811
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 0x40b820
mov dword [ebp - 0x14], ecx
jmp 0x40b868
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b860
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b880
mov esi, esp
test esi, esi
je 0x40b860
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 0x40b862
xor eax, eax
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
test ebx, ebx
jne 0x40b870
xor eax, eax
jmp 0x40b8b2
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
inc eax
cmp eax, 0x3fffffff
jg 0x40b8ad
lea edi, [eax + eax]
mov eax, edi
call fcn.0051b880
mov esi, esp
test esi, esi
je 0x40b8ad
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 0x40b8af
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 0x40b8f6
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 0x40b8f6
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 0x40b916
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 0x40b939
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 0x40b95f
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.0051553d
mov esp, ebp
pop ebp
ret