Function at 0x4017f0
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 [0x418038]
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.00408730
xorps xmm0, xmm0
add esp, 0xc
xor eax, eax
mov ecx, 0x41aca8
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 0x401863
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
sub ecx, edx
sar ecx, 1
je 0x401890
push 0x41aca8
push 0
push 0x20000
call esi
test eax, eax
jne 0x401a70
lea eax, [ebp - 0x30c]
push eax
push 0xf003f
push 0
push 0x4168d0
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4018fc
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x304]
push eax
push 0
push 0x41693c
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4018f0
lea eax, [ebp - 0x2c]
push eax
push 0
push 0x20000
call esi
test eax, eax
jne 0x401a64
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, 0x41aca8
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401916
sub ecx, edx
sar ecx, 1
jne 0x401956
push 0x41694c
push 0x416958
push 0x41a1a0
call fcn.00401e10
add esp, 0xc
xor ecx, ecx
movzx eax, word [ecx + 0x41694c]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x401940
jmp 0x401984
push 0x41aca8
push 0x416958
push 0x41a1a0
call fcn.00401e10
add esp, 0xc
xor ecx, ecx
nop
movzx eax, word [ecx + 0x41aca8]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x401970
push 0x41a1a0
lea eax, [ebp - 0x300]
push 0x104
push eax
call fcn.00404ceb
add esp, 0xc
cmp dword [0x418f08], 3
mov edx, 0x2b66
je 0x4019b0
mov edx, 0x2b70
call fcn.004016b0
test eax, eax
jne 0x401a70
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x41684c
lea eax, [ebp - 0x300]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1a
mov esi, 0x4168d0
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.00408730
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 0x401a70
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401a30
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push 0
push 0x41693c
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401a70
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.00404b4a
mov esp, ebp
pop ebp
ret