Function at 0x402680
Capabilities:
Check if file exists
Create process on windows
Get common file path
Query or enumerate registry value
Terminate process

Disassembly:
sub esp, 0x5ec
mov eax, dword [0x427074]
xor eax, esp
mov dword [esp + 0x5e4], eax
push ebx
push ebp
push esi
push edi
push 0x44
xor ebx, ebx
lea eax, [esp + 0x8c]
push ebx
push eax
mov esi, ecx
call fcn.004120b0
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x8c]
push edx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
xor eax, eax
push esi
push ebx
mov dword [esp + 0xb0], 0x44
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x402708
mov eax, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_DebugActiveProcess]
test eax, eax
jne 0x40270f
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
xor eax, eax
jmp 0x402910
push 0x5c
lea ecx, [esp + 0x30]
push ebx
push ecx
mov dword [esp + 0x34], ebx
call fcn.004120b0
add esp, 0xc
push 0xffffffffffffffff
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
test eax, eax
je 0x40290b
mov edi, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov esi, 0x104
lea esp, [esp]
push 0x103
lea eax, [esp + 0x1dd]
push ebx
push eax
mov byte [esp + 0x1e4], bl
call fcn.004120b0
add esp, 0xc
push esi
lea ecx, [esp + 0x1dc]
push ecx
call edi
push 0x103
lea edx, [esp + 0xd5]
push ebx
push edx
mov byte [esp + 0xdc], bl
call fcn.004120b0
add esp, 0xc
push ebx
lea eax, [esp + 0x14]
push eax
push ebx
push 0xf023f
push ebx
push ebx
push ebx
push str.CLSID60ADF136_E0B0_4f02_94E5_6B67FBDFD7A1
push SysReAllocStringLen
mov dword [esp + 0x34], ebx
call ebp
test eax, eax
jne 0x4028d2
push 0x103
lea ecx, [esp + 0x2e5]
push ebx
push ecx
mov byte [esp + 0x2ec], bl
call fcn.004120b0
mov ecx, dword [esp + 0x1c]
add esp, 0xc
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x2e4]
push eax
push ebx
push ecx
mov dword [esp + 0x24], esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
test eax, eax
jne 0x4028d2
lea edx, [esp + 0x1d8]
push edx
lea eax, [esp + 0xd4]
push esi
push eax
call fcn.0040b147
add esp, 0xc
lea ecx, [esp + 0x2e0]
push ecx
lea edx, [esp + 0xd4]
push edx
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
push str..dll
lea eax, [esp + 0xd4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAddExtensionA]
lea ecx, [esp + 0xd0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4028d2
push 0x206
lea eax, [esp + 0x3ee]
xor edx, edx
push ebx
push eax
mov word [esp + 0x3f4], dx
call fcn.004120b0
lea eax, [esp + 0xdc]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x402880
push esi
sub eax, edx
lea ecx, [esp + 0x3ec]
push ecx
inc eax
push eax
lea edx, [esp + 0xdc]
push edx
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [esp + 0x20]
lea eax, [esp + 0x3e8]
push eax
push ecx
call fcn.00403560
add esp, 8
test eax, eax
je 0x4028d2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x45e
push ebx
call fcn.004010c0
add esp, 0xc
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_DebugActiveProcessStop]
test eax, eax
jne 0x40290b
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
push 0x10002
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ContinueDebugEvent]
push 0xffffffffffffffff
lea edx, [esp + 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WaitForDebugEvent]
test eax, eax
jne 0x402750
mov eax, 1
mov ecx, dword [esp + 0x5f4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0040b0a0
add esp, 0x5ec
ret