Function at 0x401fdf
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 [0x422040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
mov word [ebp - 0x238], ax
xor ebx, ebx
lea eax, [ebp - 0x236]
push ebx
push eax
call fcn.0040c310
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
stosw word es:[edi], ax
mov edi, 0x424b28
mov esi, 0x104
mov eax, edi
mov dword [ebp - 0x310], ebx
mov dword [ebp - 0x314], esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x402040
sub eax, edx
sar eax, 1
je 0x402065
push edi
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
jne 0x402249
lea eax, [ebp - 0x304]
push eax
push 0xf003f
push ebx
push 0x41ddf8
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4020df
lea eax, [ebp - 0x314]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x310]
push eax
push ebx
push 0x41e060
push dword [ebp - 0x304]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4020d3
lea eax, [ebp - 0x2c]
push eax
push ebx
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
je 0x4020d3
push dword [ebp - 0x304]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x402249
push dword [ebp - 0x304]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x238]
push eax
push esi
mov dword [ebp - 0x30c], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov eax, edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x4020f8
sub eax, edx
sar eax, 1
lea eax, [ebp - 0x238]
jne 0x402134
push 0x41e070
push esi
push eax
call fcn.00409047
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + 0x41e070]
mov word [ebp + eax - 0x2c], cx
inc eax
inc eax
cmp cx, bx
jne 0x40211f
jmp 0x402154
push edi
push esi
push eax
call fcn.00409047
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + 0x424b28]
mov word [ebp + eax - 0x2c], cx
inc eax
inc eax
cmp cx, bx
jne 0x402141
push 0x41dd9c
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.00409047
lea eax, [ebp - 0x30c]
add esp, 0xc
push eax
call fcn.00404a90
pop ecx
mov dword [ebp - 0x308], eax
cmp eax, ebx
je 0x402249
push eax
lea eax, [ebp - 0x238]
push eax
mov eax, dword [ebp - 0x30c]
call fcn.00404b10
pop ecx
pop ecx
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push ebx
push 0x41dce8
lea eax, [ebp - 0x238]
push eax
push ebx
push ebx
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
push 0x1a
pop ecx
mov esi, 0x41ddf8
lea edi, [ebp - 0x300]
rep movsd dword es:[edi], dword [esi]
push 0x5e
lea eax, [ebp - 0x296]
push ebx
push eax
movsw word es:[edi], word [esi]
call fcn.0040c310
add esp, 0xc
lea eax, [ebp - 0x304]
push eax
push 3
push ebx
lea eax, [ebp - 0x300]
push eax
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40223d
lea eax, [ebp - 0x2c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x402202
sub eax, edx
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push ebx
push 0x41e060
push dword [ebp - 0x304]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40223d
push dword [ebp - 0x304]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp - 0x308]
call fcn.00409875
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00409038
leave
ret