Function at 0x405e50
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, 0x4c8
mov eax, dword [0x439c20]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x440], ax
push 0x206
push 0
lea ecx, [ebp - 0x43e]
push ecx
call fcn.0041ca90
add esp, 0xc
xor edx, edx
mov word [ebp - 0x238], dx
push 0x206
push 0
lea eax, [ebp - 0x236]
push eax
call fcn.0041ca90
add esp, 0xc
xor ecx, ecx
mov word [ebp - 0x464], cx
xor edx, edx
mov dword [ebp - 0x462], edx
mov dword [ebp - 0x45e], edx
mov dword [ebp - 0x45a], edx
mov dword [ebp - 0x456], edx
mov dword [ebp - 0x452], edx
mov dword [ebp - 0x44e], edx
mov dword [ebp - 0x44a], edx
mov word [ebp - 0x446], dx
mov dword [ebp - 0x468], 0
mov dword [ebp - 0x444], 0
mov dword [ebp - 0x46c], 0x104
xor eax, eax
mov word [ebp - 0x2c], ax
xor ecx, ecx
mov dword [ebp - 0x2a], ecx
mov dword [ebp - 0x26], ecx
mov dword [ebp - 0x22], ecx
mov dword [ebp - 0x1e], ecx
mov dword [ebp - 0x1a], ecx
mov dword [ebp - 0x16], ecx
mov dword [ebp - 0x12], ecx
mov dword [ebp - 0xe], ecx
mov dword [ebp - 0xa], ecx
mov word [ebp - 6], cx
mov dword [ebp - 0x47c], 0x43e5e8
mov edx, dword [ebp - 0x47c]
add edx, 2
mov dword [ebp - 0x480], edx
mov eax, dword [ebp - 0x47c]
mov cx, word [eax]
mov word [ebp - 0x482], cx
add dword [ebp - 0x47c], 2
cmp word [ebp - 0x482], 0
jne 0x405f3b
mov edx, dword [ebp - 0x47c]
sub edx, dword [ebp - 0x480]
sar edx, 1
mov dword [ebp - 0x488], edx
je 0x405f9a
push 0x43e5e8
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x468], eax
cmp dword [ebp - 0x468], 0
je 0x405f9a
xor eax, eax
jmp 0x4062e3
lea eax, [ebp - 0x30]
push eax
push 0xf003f
push 0
push 0x434cc8
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40601b
lea ecx, [ebp - 0x46c]
push ecx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x444]
push eax
push 0
push 0x434d34
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406011
lea edx, [ebp - 0x2c]
push edx
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x468], eax
cmp dword [ebp - 0x468], 0
je 0x406011
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x4062e3
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x474], 0
mov dword [ebp - 0x470], 0
lea edx, [ebp - 0x440]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x48c], 0x43e608
mov eax, dword [ebp - 0x48c]
add eax, 2
mov dword [ebp - 0x490], eax
mov ecx, dword [ebp - 0x48c]
mov dx, word [ecx]
mov word [ebp - 0x492], dx
add dword [ebp - 0x48c], 2
cmp word [ebp - 0x492], 0
jne 0x40605a
mov eax, dword [ebp - 0x48c]
sub eax, dword [ebp - 0x490]
sar eax, 1
mov dword [ebp - 0x498], eax
jne 0x40611a
push 0x434d44
push 0x104
lea ecx, [ebp - 0x440]
push ecx
call fcn.0041a6bc
add esp, 0xc
mov dword [ebp - 0x49c], 0x434d50
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x4a0], edx
mov eax, dword [ebp - 0x4a0]
mov dword [ebp - 0x4a4], eax
mov ecx, dword [ebp - 0x49c]
mov dx, word [ecx]
mov word [ebp - 0x4a6], dx
mov eax, dword [ebp - 0x4a0]
mov cx, word [ebp - 0x4a6]
mov word [eax], cx
mov edx, dword [ebp - 0x49c]
add edx, 2
mov dword [ebp - 0x49c], edx
mov eax, dword [ebp - 0x4a0]
add eax, 2
mov dword [ebp - 0x4a0], eax
cmp word [ebp - 0x4a6], 0
jne 0x4060cd
jmp 0x40619a
push 0x43e608
push 0x104
lea ecx, [ebp - 0x440]
push ecx
call fcn.0041a6bc
add esp, 0xc
mov dword [ebp - 0x4ac], 0x43e608
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x4b0], edx
mov eax, dword [ebp - 0x4b0]
mov dword [ebp - 0x4b4], eax
mov ecx, dword [ebp - 0x4ac]
mov dx, word [ecx]
mov word [ebp - 0x4b6], dx
mov eax, dword [ebp - 0x4b0]
mov cx, word [ebp - 0x4b6]
mov word [eax], cx
mov edx, dword [ebp - 0x4ac]
add edx, 2
mov dword [ebp - 0x4ac], edx
mov eax, dword [ebp - 0x4b0]
add eax, 2
mov dword [ebp - 0x4b0], eax
cmp word [ebp - 0x4b6], 0
jne 0x406152
push 0x434d5c
push 0x104
lea ecx, [ebp - 0x440]
push ecx
call fcn.0041a6bc
add esp, 0xc
lea edx, [ebp - 0x470]
push edx
push 0x434d68
push 0x89
call fcn.00406300
add esp, 0xc
mov dword [ebp - 0x474], eax
cmp dword [ebp - 0x474], 0
jne 0x4061e5
jmp 0x4062bd
mov eax, dword [ebp - 0x470]
push eax
mov ecx, dword [ebp - 0x474]
push ecx
lea edx, [ebp - 0x440]
push edx
call fcn.004063e0
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x434d80
lea eax, [ebp - 0x440]
push eax
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
lea ecx, [ebp - 0x30]
push ecx
push 3
push 0
push 0x434d88
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4062bd
lea edx, [ebp - 0x2c]
mov dword [ebp - 0x4bc], edx
mov eax, dword [ebp - 0x4bc]
add eax, 2
mov dword [ebp - 0x4c0], eax
mov ecx, dword [ebp - 0x4bc]
mov dx, word [ecx]
mov word [ebp - 0x4c2], dx
add dword [ebp - 0x4bc], 2
cmp word [ebp - 0x4c2], 0
jne 0x406258
mov eax, dword [ebp - 0x4bc]
sub eax, dword [ebp - 0x4c0]
sar eax, 1
mov dword [ebp - 0x4c8], eax
mov ecx, dword [ebp - 0x4c8]
lea edx, [ecx + ecx + 2]
push edx
lea eax, [ebp - 0x2c]
push eax
push 1
push 0
push 0x434df4
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4062bd
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x474], 0
je 0x4062e1
mov eax, dword [ebp - 0x474]
mov dword [ebp - 0x478], eax
mov ecx, dword [ebp - 0x478]
push ecx
call fcn.00410270
add esp, 4
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041a6ad
mov esp, ebp
pop ebp
ret