Function at 0x401850
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, 0x310
mov eax, dword [0x417038]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x300], ax
lea eax, [ebp - 0x2fe]
push eax
call fcn.004082f0
xorps xmm0, xmm0
add esp, 0xc
xor eax, eax
mov ecx, 0x419ca8
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x308], 0x104
mov word [ebp - 0x2c], ax
movq qword [ebp - 0x2a], xmm0
movq qword [ebp - 0x22], xmm0
movq qword [ebp - 0x1a], xmm0
movq qword [ebp - 0x12], xmm0
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4018c3
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
sub ecx, edx
sar ecx, 1
je 0x4018f0
push 0x419ca8
push 0
push 0x20000
call esi
test eax, eax
jne 0x401ae0
lea eax, [ebp - 0x30c]
push eax
push 0xf003f
push 0
push 0x415930
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40195c
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x304]
push eax
push 0
push 0x41599c
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401950
lea eax, [ebp - 0x2c]
push eax
push 0
push 0x20000
call esi
test eax, eax
jne 0x401ad4
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x300]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov ecx, 0x419ca8
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401976
sub ecx, edx
sar ecx, 1
jne 0x4019b6
push 0x4159ac
push 0x4159b8
push 0x4191a0
call fcn.00401e80
add esp, 0xc
xor ecx, ecx
movzx eax, word [ecx + str.opert]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4019a0
jmp 0x4019e4
push 0x419ca8
push 0x4159d4
push 0x4191a0
call fcn.00401e80
add esp, 0xc
xor ecx, ecx
nop
movzx eax, word [ecx + 0x419ca8]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4019d0
push 0x4191a0
lea eax, [ebp - 0x300]
push 0x104
push eax
call fcn.004048a7
add esp, 0xc
cmp dword [0x417f08], 3
jne 0x401a12
mov edx, 0x2b66
mov ecx, 0x415910
jmp 0x401a1c
mov edx, 0x2b70
mov ecx, 0x415920
call fcn.00401710
test eax, eax
jne 0x401ae0
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x4159e4
lea eax, [ebp - 0x300]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1a
mov esi, 0x4159e8
lea edi, [ebp - 0xf8]
rep movsd dword es:[edi], dword [esi]
push 0x5e
lea eax, [ebp - 0x8e]
push 0
push eax
movsw word es:[edi], word [esi]
call fcn.004082f0
add esp, 0xc
lea eax, [ebp - 0x30c]
push eax
push 3
push 0
lea eax, [ebp - 0xf8]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401ae0
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401aa0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push 0
push str.TrayKey
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401ae0
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
xor eax, eax
pop esi
call fcn.00404706
mov esp, ebp
pop ebp
ret