Function at 0x4016d7
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 [0x417038]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x300], ax
xor esi, esi
lea eax, [ebp - 0x2fe]
push esi
push eax
call fcn.004082d0
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, 0x419ca8
mov ecx, ebx
stosw word es:[edi], ax
mov dword [ebp - 0x304], esi
mov dword [ebp - 0x308], 0x104
lea edx, [ecx + 2]
xor edi, edi
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x401739
mov esi, dword [sym.imp.KERNEL32.dll_OpenEventW]
sub ecx, edx
sar ecx, 1
je 0x401761
push ebx
push edi
push 0x20000
call esi
test eax, eax
jne 0x401935
lea eax, [ebp - 0x30c]
push eax
push 0xf003f
push edi
push 0x4158d0
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4017d5
lea eax, [ebp - 0x308]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x304]
push eax
push edi
push 0x41593c
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4017cd
lea eax, [ebp - 0x2c]
push eax
push edi
push 0x20000
call esi
test eax, eax
je 0x4017cd
push dword [ebp - 0x30c]
call ebx
jmp 0x401935
push dword [ebp - 0x30c]
call ebx
lea eax, [ebp - 0x300]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x419ca8
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x4017f1
sub ecx, edx
sar ecx, 1
jne 0x401832
push 0x41594c
push 0x415958
mov esi, 0x4191a0
push esi
call fcn.00401c20
add esp, 0xc
mov ecx, edi
movzx eax, word [ecx + 0x41594c]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40181c
jmp 0x40185c
push esi
push 0x415958
mov esi, 0x4191a0
push esi
call fcn.00401c20
add esp, 0xc
mov ecx, edi
movzx eax, word [ecx + 0x419ca8]
mov word [ebp + ecx - 0x2c], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x401848
push esi
lea eax, [ebp - 0x300]
push 0x104
push eax
call fcn.0040488b
add esp, 0xc
cmp dword [0x417f08], 3
mov edx, 0x2b66
je 0x401882
add edx, 0xa
call fcn.004015a1
test eax, eax
jne 0x401935
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push edi
push 0x41584c
lea eax, [ebp - 0x300]
push eax
push edi
push edi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1a
pop ecx
mov esi, 0x4158d0
lea edi, [ebp - 0xf8]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x5e
xor esi, esi
lea eax, [ebp - 0x8e]
push esi
push eax
call fcn.004082d0
add esp, 0xc
lea eax, [ebp - 0x30c]
push eax
push 3
push esi
lea eax, [ebp - 0xf8]
push eax
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x401935
lea ecx, [ebp - 0x2c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x4018fa
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push esi
push 0x41593c
push dword [ebp - 0x30c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x401935
push dword [ebp - 0x30c]
call ebx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004046ea
leave
ret