Function at 0x402868
Capabilities:
Set registry value

Disassembly:
push 0x18
mov eax, 0x424b4b
call fcn.0042366e
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 0x402898
mov edi, 0x80004004
jmp 0x402ac5
mov ecx, 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 eax, dword [ecx]
push edi
push ecx
call dword [eax + 0x10]
mov edi, eax
test edi, edi
js 0x402a91
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 0x402925
mov ecx, dword [ebx + 0x13c]
lea edx, [ebp - 0x1c]
push edx
push 1
push ecx
mov eax, dword [ecx]
call dword [eax + 0x10]
mov edi, eax
test edi, edi
js 0x402a91
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 0x402a91
push 4
lea eax, [ebx + 0x12c]
push eax
push 4
push 0
push 0x42a49c
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 0x402a91
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 0x402a91
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 0x402a91
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 0x402a91
cmp dword [ebp - 0x20], 2
jne 0x402a13
mov ecx, dword [ebp - 0x18]
call fcn.00410c2f
mov eax, dword [ebx + 0x148]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
jmp 0x402a77
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 0x402a91
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x402a67
call fcn.00411025
and dword [ebp - 0x14], 0
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x402a77
call fcn.00411025
and dword [ebp - 0x10], 0
mov ecx, dword [ebx + 0x148]
lea edx, [ebp - 0x10]
push edx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ecx]
push ecx
call dword [eax + 0x20]
test eax, eax
je 0x402a21
xor edi, edi
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x402a9d
call fcn.00411025
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x402aa9
call fcn.00411025
cmp dword [ebp - 0x18], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x402aba
push dword [ebp - 0x18]
call ebx
cmp dword [ebp + 8], 0
je 0x402ac5
push dword [ebp + 8]
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
call fcn.0042364c
ret 8