Function at 0x40bd40
Capabilities:
Check if file exists
Create process on windows
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41e441
mov eax, dword fs:[0]
push eax
sub esp, 0x8c8
mov eax, dword [0x42d3e0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
test esi, esi
je 0x40bf87
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
je 0x40bf87
push 0x208
lea eax, [ebp - 0x628]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push str.regsvr32.exe
push eax
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x628]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40bf87
lea ecx, [ebp - 0x648]
call dword [sym.imp.Cmmlib.dll_public:_void___thiscall_Cmm::CStringT_wchar_t_::constructor_void_]
mov ecx, 0x421cf8
mov dword [ebp - 4], 0
test edi, edi
mov eax, 0x421948
push esi
cmove eax, ecx
push eax
lea eax, [ebp - 0x648]
push str._s__s___s_
push eax
call dword [sym.imp.Cmmlib.dll_public:_void___cdecl_Cmm::CStringT_wchar_t_::Format_wchar_t_const__]
add esp, 0x10
lea ecx, [ebp - 0x648]
call dword [sym.imp.Cmmlib.dll_public:_wchar_t_const____thiscall_Cmm::CStringT_wchar_t_::operator_wchar_t_const__void_const]
mov esi, eax
test esi, esi
je 0x40bf6e
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push str.regsvr32.exe
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push 0x250
lea eax, [ebp - 0x898]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x898]
push eax
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x40bf6e
lea eax, [ebp - 0x420]
mov dword [ebp - 0x8d4], 0x3c
mov dword [ebp - 0x8c4], eax
xorps xmm0, xmm0
lea eax, [ebp - 0x218]
movlpd qword [ebp - 0x8b0], xmm0
mov dword [ebp - 0x8bc], eax
lea eax, [ebp - 0x8d4]
push eax
movlpd qword [ebp - 0x8a8], xmm0
movlpd qword [ebp - 0x8a0], xmm0
mov dword [ebp - 0x8d0], 0x240
mov dword [ebp - 0x8cc], 0
mov dword [ebp - 0x8c8], str.open
mov dword [ebp - 0x8b8], 5
mov dword [ebp - 0x8b4], 0
mov dword [ebp - 0x8c0], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov esi, eax
mov eax, dword [ebp - 0x89c]
test eax, eax
je 0x40bf6e
cmp eax, 0xffffffff
je 0x40bf6e
push 0xffffffffffffffff
push eax
mov dword [ebp - 0x62c], 0
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x62c]
push eax
push dword [ebp - 0x89c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
mov eax, dword [ebp - 0x89c]
cmp eax, 0xffffffff
je 0x40bf70
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40bf70
xor esi, esi
xor ebx, ebx
lea ecx, [ebp - 0x648]
test esi, esi
setne bl
call dword [sym.imp.Cmmlib.dll_public_virtual:_void___thiscall_Cmm::CStringT_wchar_t_::destructor_void_]
mov eax, ebx
jmp 0x40bf89
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0041c340
mov esp, ebp
pop ebp
ret 8