Function at 0x402899
Capabilities:
Set registry value

Disassembly:
push 0x18
mov eax, 0x425ab7
call fcn.00423969
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 0x4028c9
mov edi, 0x80004004
jmp 0x402b2a
mov eax, dword [ebx + 0x13c]
lea edx, [ebp - 0x1c]
push edx
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x10], edi
mov dword [ebp + 8], edi
mov ecx, dword [eax]
push edi
push eax
call dword [ecx + 0x10]
mov edi, eax
test edi, edi
js 0x402ade
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x14]
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 0x402956
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 0x402ade
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x14]
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 0x402ade
push 4
lea eax, [ebx + 0x12c]
push eax
push 4
push 0
push 0x42b61c
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402ade
push 4
lea eax, [ebx + 0x130]
push eax
push 4
push 0
push str.DefaultDrive
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402ade
push 4
lea eax, [ebx + 0x134]
push eax
push 4
push 0
push str.Priority
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402ade
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 - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
test edi, edi
js 0x402ade
cmp dword [ebp - 0x20], 2
jne 0x402a44
mov ecx, dword [ebp - 0x18]
call fcn.00410eca
mov eax, dword [ebx + 0x148]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
jmp 0x402ac0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push dword [ebp + 8]
push 1
push 0
push dword [ebp - 0x10]
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 0x402ade
cmp dword [ebp - 0x10], 0
je 0x402aa4
push dword [ebp - 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [ebp - 0x10], 0
cmp dword [ebp + 8], 0
je 0x402ac0
push dword [ebp + 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
and dword [ebp + 8], 0
mov eax, dword [ebx + 0x148]
lea edx, [ebp + 8]
push edx
lea edx, [ebp - 0x10]
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x20]
test eax, eax
je 0x402a52
xor edi, edi
cmp dword [ebp + 8], 0
je 0x402af6
push dword [ebp + 8]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x10], 0
je 0x402b0e
push dword [ebp - 0x10]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp dword [ebp - 0x18], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x402b1f
push dword [ebp - 0x18]
call ebx
cmp dword [ebp - 0x14], 0
je 0x402b2a
push dword [ebp - 0x14]
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
call fcn.00423947
ret 8