Function at 0x40287a
Capabilities:
Set registry value

Disassembly:
push 0x18
mov eax, 0x424410
call fcn.004223b5
mov ebx, dword [ebp + 8]
lea esi, [ebx + 0x10]
push esi
mov dword [ebp - 0x24], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
xor edi, edi
mov dword [ebp - 4], edi
cmp dword [ebx + 0xc], edi
je 0x4028aa
mov edi, 0x80004004
jmp 0x402ad7
mov eax, dword [ebx + 0x13c]
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 0x1c], edi
mov dword [ebp + 8], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x10]
mov edi, eax
test edi, edi
js 0x402aa3
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp + 8]
push ecx
xor ecx, ecx
lea eax, [ebx + 0x2c]
push ecx
push 0x2001f
push ecx
push ecx
push ecx
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
cmp eax, 0x3fa
jne 0x402937
mov eax, dword [ebx + 0x13c]
lea edx, [ebp - 0x1c]
push edx
push 1
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov edi, eax
test edi, edi
js 0x402aa3
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp + 8]
push eax
xor eax, eax
push eax
push 0x2001f
push eax
push eax
push eax
lea eax, [ebx + 0x2c]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
push 4
lea eax, [ebx + 0x12c]
push eax
push 4
push 0
push 0x42a48c
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
push 4
lea eax, [ebx + 0x130]
push eax
push 4
push 0
push str.DefaultDrive
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
push 4
lea eax, [ebx + 0x134]
push eax
push 4
push 0
push str.Priority
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
xor eax, eax
push eax
push 0x2001f
push eax
push eax
push eax
push str.Properties
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
cmp dword [ebp - 0x20], 2
jne 0x402a25
mov ecx, dword [ebp - 0x18]
call fcn.00410f3a
mov eax, dword [ebx + 0x148]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
jmp 0x402a89
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push dword [ebp - 0x10]
push 1
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402aa3
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x402a79
call fcn.00411336
and dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x402a89
call fcn.00411336
and dword [ebp - 0x10], 0
mov eax, dword [ebx + 0x148]
lea edx, [ebp - 0x10]
push edx
lea edx, [ebp - 0x14]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
test eax, eax
je 0x402a33
xor edi, edi
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x402aaf
call fcn.00411336
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x402abb
call fcn.00411336
cmp dword [ebp - 0x18], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x402acc
push dword [ebp - 0x18]
call ebx
cmp dword [ebp + 8], 0
je 0x402ad7
push dword [ebp + 8]
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
call fcn.00422395
ret 8