Function at 0x402880
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, 0x368
mov eax, dword [0x433c20]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
xor eax, eax
mov word [ebp - 0x238], ax
push 0x206
push 0
lea ecx, [ebp - 0x236]
push ecx
call fcn.00415580
add esp, 0xc
mov dword [ebp - 0x308], 0
mov dword [ebp - 0x304], 0
mov dword [ebp - 0x30c], 0x104
xor edx, edx
mov word [ebp - 0x2c], dx
xor eax, eax
mov dword [ebp - 0x2a], eax
mov dword [ebp - 0x26], eax
mov dword [ebp - 0x22], eax
mov dword [ebp - 0x1e], eax
mov dword [ebp - 0x1a], eax
mov dword [ebp - 0x16], eax
mov dword [ebp - 0x12], eax
mov dword [ebp - 0xe], eax
mov dword [ebp - 0xa], eax
mov word [ebp - 6], ax
mov dword [ebp - 0x31c], 0x438640
mov ecx, dword [ebp - 0x31c]
add ecx, 2
mov dword [ebp - 0x320], ecx
mov edx, dword [ebp - 0x31c]
mov ax, word [edx]
mov word [ebp - 0x322], ax
add dword [ebp - 0x31c], 2
cmp word [ebp - 0x322], 0
jne 0x402912
mov ecx, dword [ebp - 0x31c]
sub ecx, dword [ebp - 0x320]
sar ecx, 1
mov dword [ebp - 0x328], ecx
je 0x402971
push 0x438640
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x402971
xor eax, eax
jmp 0x402ce3
lea edx, [ebp - 0x30]
push edx
push 0xf003f
push 0
push 0x42e020
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4029f2
lea eax, [ebp - 0x30c]
push eax
lea ecx, [ebp - 0x2c]
push ecx
lea edx, [ebp - 0x304]
push edx
push 0
push 0x42e08c
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4029e8
lea ecx, [ebp - 0x2c]
push ecx
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
mov dword [ebp - 0x308], eax
cmp dword [ebp - 0x308], 0
je 0x4029e8
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x402ce3
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x314], 0
mov dword [ebp - 0x310], 0
lea ecx, [ebp - 0x238]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov dword [ebp - 0x32c], 0x438640
mov edx, dword [ebp - 0x32c]
add edx, 2
mov dword [ebp - 0x330], edx
mov eax, dword [ebp - 0x32c]
mov cx, word [eax]
mov word [ebp - 0x332], cx
add dword [ebp - 0x32c], 2
cmp word [ebp - 0x332], 0
jne 0x402a31
mov edx, dword [ebp - 0x32c]
sub edx, dword [ebp - 0x330]
sar edx, 1
mov dword [ebp - 0x338], edx
jne 0x402af1
push 0x42e09c
push 0x104
lea eax, [ebp - 0x238]
push eax
call fcn.00413166
add esp, 0xc
mov dword [ebp - 0x33c], 0x42e0a8
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 0x340]
mov dword [ebp - 0x344], edx
mov eax, dword [ebp - 0x33c]
mov cx, word [eax]
mov word [ebp - 0x346], cx
mov edx, dword [ebp - 0x340]
mov ax, word [ebp - 0x346]
mov word [edx], ax
mov ecx, dword [ebp - 0x33c]
add ecx, 2
mov dword [ebp - 0x33c], ecx
mov edx, dword [ebp - 0x340]
add edx, 2
mov dword [ebp - 0x340], edx
cmp word [ebp - 0x346], 0
jne 0x402aa4
jmp 0x402b71
push 0x438640
push 0x104
lea eax, [ebp - 0x238]
push eax
call fcn.00413166
add esp, 0xc
mov dword [ebp - 0x34c], 0x438640
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x350], ecx
mov edx, dword [ebp - 0x350]
mov dword [ebp - 0x354], edx
mov eax, dword [ebp - 0x34c]
mov cx, word [eax]
mov word [ebp - 0x356], cx
mov edx, dword [ebp - 0x350]
mov ax, word [ebp - 0x356]
mov word [edx], ax
mov ecx, dword [ebp - 0x34c]
add ecx, 2
mov dword [ebp - 0x34c], ecx
mov edx, dword [ebp - 0x350]
add edx, 2
mov dword [ebp - 0x350], edx
cmp word [ebp - 0x356], 0
jne 0x402b29
push 0x42e0b4
push 0x104
lea eax, [ebp - 0x238]
push eax
call fcn.00413166
add esp, 0xc
lea ecx, [ebp - 0x310]
push ecx
push 0x42e0c0
push 0x81
call fcn.004055c4
add esp, 0xc
mov dword [ebp - 0x314], eax
cmp dword [ebp - 0x314], 0
jne 0x402bbc
jmp 0x402cbd
mov edx, dword [ebp - 0x310]
push edx
mov eax, dword [ebp - 0x314]
push eax
lea ecx, [ebp - 0x238]
push ecx
call fcn.0040563b
add esp, 0xc
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push 0
push 0x42e0d8
lea edx, [ebp - 0x238]
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, 0x1a
mov esi, 0x42e0e0
lea edi, [ebp - 0x300]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
push 0x5e
push 0
lea eax, [ebp - 0x296]
push eax
call fcn.00415580
add esp, 0xc
lea ecx, [ebp - 0x30]
push ecx
push 3
push 0
lea edx, [ebp - 0x300]
push edx
push connect
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x402cbd
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x35c], eax
mov ecx, dword [ebp - 0x35c]
add ecx, 2
mov dword [ebp - 0x360], ecx
mov edx, dword [ebp - 0x35c]
mov ax, word [edx]
mov word [ebp - 0x362], ax
add dword [ebp - 0x35c], 2
cmp word [ebp - 0x362], 0
jne 0x402c58
mov ecx, dword [ebp - 0x35c]
sub ecx, dword [ebp - 0x360]
sar ecx, 1
mov dword [ebp - 0x368], ecx
mov edx, dword [ebp - 0x368]
lea eax, [edx + edx + 2]
push eax
lea ecx, [ebp - 0x2c]
push ecx
push 1
push 0
push 0x42e14c
mov edx, dword [ebp - 0x30]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x402cbd
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x314], 0
je 0x402ce1
mov ecx, dword [ebp - 0x314]
mov dword [ebp - 0x318], ecx
mov edx, dword [ebp - 0x318]
push edx
call fcn.00408d28
add esp, 4
xor eax, eax
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00413157
mov esp, ebp
pop ebp
ret