Function at 0x6d5a99a0
Capabilities:
Create process on windows
Get common file path
Resolve function by parsing pe exports
Set registry value

Disassembly:
sub esp, 0x270
mov eax, dword [0x6d5e2a5c]
xor eax, esp
mov dword [esp + 0x26c], eax
test byte [esp + 0x280], 1
push ebx
mov ebx, dword [esp + 0x278]
push esi
push edi
je 0x6d5a99d0
mov byte [esp + 0x284], 0
push 0xc
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
xor edi, edi
add esp, 4
cmp esi, edi
je 0x6d5a9a43
push ebp
mov ebp, dword [sym.imp.OLEAUT32.dll_SysReAllocString]
push ebx
mov dword [esi + 4], edi
mov dword [esi + 8], 1
call ebp
mov dword [esi], eax
cmp eax, edi
jne 0x6d5a9a0a
cmp ebx, edi
je 0x6d5a9a0a
push 0x8007000e
call fcn.6d5ca1c9
push 0xc
mov dword [esp + 0x1c], esi
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, edi
je 0x6d5a9a00
mov dword [esi + 4], edi
lea edi, [esi + 8]
push str.wsdetect.dll
mov dword [edi], 1
call ebp
xor ebp, ebp
mov dword [esi], eax
cmp eax, ebp
jne 0x6d5a9a4d
push 0x8007000e
call fcn.6d5ca1c9
push 0x8007000e
call fcn.6d5ca1c9
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], esi
call fcn.6d594760
push edi
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x6d5a9a90
mov eax, dword [esi]
cmp eax, ebp
je 0x6d5a9a77
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x6d5a9a87
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 4
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
cmp byte [esp + 0x28c], 0
je 0x6d5a9e88
push 0x206
lea edx, [esp + 0x7a]
xor ecx, ecx
push ebp
push edx
mov word [esp + 0x80], cx
call sub.MSVCR100.dll_memset
add esp, 0xc
push ebx
lea ecx, [esp + 0x28]
call fcn.6d592e00
mov esi, dword [esp + 0x24]
cmp esi, ebp
je 0x6d5a9ae2
cmp dword [esi + 4], ebp
jne 0x6d5a9add
mov eax, dword [esi]
push eax
call fcn.6d5ca1c9
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
jmp 0x6d5a9ae4
xor esi, esi
push esi
push 0x6d5d1d84
call dword [sym.imp.imagehlp.dll_ImageLoad]
cmp eax, ebp
je 0x6d5a9dd1
mov ecx, dword [eax + 0xc]
movzx edi, word [ecx + 4]
push eax
call dword [sym.imp.imagehlp.dll_ImageUnload]
test eax, eax
je 0x6d5a9dd1
mov edx, 0x8664
mov esi, edi
cmp dx, di
jne 0x6d5a9b2c
push 0x104
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
jmp 0x6d5a9b4a
mov ecx, 0x14c
cmp cx, di
jne 0x6d5a9dd3
push 0x104
lea edx, [esp + 0x78]
push edx
call dword [sym.imp.kernel32.dll_GetSystemWow64DirectoryW]
push str._regsvr32.exe
lea eax, [esp + 0x78]
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_wcscat_s]
push 0x3c
lea ecx, [esp + 0x48]
push ebp
push ecx
call sub.MSVCR100.dll_memset
add esp, 0x18
push 0x6d5d1d60
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], 0x3c
call fcn.6d592e00
cmp byte [esp + 0x288], 0
jne 0x6d5a9bb4
push 0x6d5d1d58
lea ecx, [esp + 0x14]
call fcn.6d592e00
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x24]
call fcn.6d594760
lea ecx, [esp + 0x10]
call fcn.6d592330
push 0x6d5cf5f0
lea ecx, [esp + 0x14]
call fcn.6d592e00
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
call fcn.6d594760
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x6d5a9c0c
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x6d5a9c0c
mov eax, dword [esi]
cmp eax, ebp
je 0x6d5a9bf3
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x6d5a9c03
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 4
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x24]
call fcn.6d594760
push 0x6d5cf5f0
lea ecx, [esp + 0x14]
call fcn.6d592e00
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
call fcn.6d594760
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x6d5a9c72
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x6d5a9c72
mov eax, dword [esi]
cmp eax, ebp
je 0x6d5a9c59
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x6d5a9c69
push eax
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 4
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete_void__
add esp, 4
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x74]
mov esi, 1
mov dword [esp + 0x44], str.open
mov dword [esp + 0x48], edx
mov dword [esp + 0x54], esi
mov dword [esp + 0x3c], 0x40
cmp eax, ebp
je 0x6d5a9ca3
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
jmp 0x6d5a9ca7
mov dword [esp + 0x4c], ebp
lea ecx, [esp + 0x38]
push ecx
mov dword [esp + 0x20], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x6d5a9ce6
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x6d5a9ce6
push 0xffffffffffffffff
push eax
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [esp + 0x70]
lea edx, [esp + 0x1c]
push edx
push eax
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
mov ecx, dword [esp + 0x70]
push ecx
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp dword [esp + 0x1c], ebp
je 0x6d5a9daf
push str.regsvr32.exe_error__
lea ecx, [esp + 0x14]
call fcn.6d596c20
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x18]
call fcn.6d592e00
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
push str.___error_code:
lea ecx, [esp + 0x18]
call fcn.6d596c20
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x28]
mov edx, 0x13
push ecx
lea ecx, [esp + 0x18]
mov word [esp + 0x2c], dx
mov dword [esp + 0x34], eax
call fcn.6d5a8310
push eax
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x6d5a9d92
mov eax, dword [eax]
jmp 0x6d5a9d94
xor eax, eax
push eax
call fcn.6d5951a0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.6d592330
lea ecx, [esp + 0x20]
jmp 0x6d5a9e6a
lea ecx, [esp + 0x20]
call fcn.6d592330
lea ecx, [esp + 0x24]
call fcn.6d592330
lea ecx, [esp + 0x18]
call fcn.6d592330
mov eax, esi
jmp 0x6d5aa02f
xor esi, esi
push str.Unexpected_machine_type_from__
lea ecx, [esp + 0x14]
call fcn.6d596c20
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
call fcn.6d594760
push str.___machine_type:
lea ecx, [esp + 0x18]
call fcn.6d596c20
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
lea eax, [esp + 0x28]
mov edx, 0x12
push eax
lea ecx, [esp + 0x18]
mov word [esp + 0x2c], dx
mov word [esp + 0x34], si
call fcn.6d5a8310
push eax
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x6d5a9e5b
mov eax, dword [eax]
jmp 0x6d5a9e5d
xor eax, eax
push eax
call fcn.6d5951a0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.6d592330
lea ecx, [esp + 0x24]
call fcn.6d592330
lea ecx, [esp + 0x18]
call fcn.6d592330
xor eax, eax
jmp 0x6d5aa02f
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x6d5a9e94
mov eax, dword [eax]
jmp 0x6d5a9e96
xor eax, eax
push eax
call fcn.6d5ca1c9
mov esi, eax
cmp esi, ebp
jne 0x6d5a9f96
call dword [sym.imp.kernel32.dll_GetLastError]
push 0xc
mov edi, eax
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x6d5a9a00
mov ebx, 1
push str.Failed_to_load__
mov dword [esi + 4], ebp
mov dword [esi + 8], ebx
call fcn.6d5ca1c9
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x14]
mov dword [esi], eax
mov dword [esp + 0x14], esi
call fcn.6d594760
push 0xc
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x6d5a9a00
push str.___error_code
mov dword [esi + 4], ebp
mov dword [esi + 8], ebx
call fcn.6d5ca1c9
mov dword [esi], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], esi
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
mov ecx, 0x13
lea edx, [esp + 0x28]
mov word [esp + 0x28], cx
push edx
lea ecx, [esp + 0x18]
mov dword [esp + 0x34], edi
call fcn.6d5a8310
push eax
lea ecx, [esp + 0x14]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x6d5a9f72
mov eax, dword [eax]
jmp 0x6d5a9f74
xor eax, eax
push eax
call fcn.6d5951a0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.6d592330
lea ecx, [esp + 0x18]
call fcn.6d592330
xor eax, eax
jmp 0x6d5aa02f
cmp byte [esp + 0x288], 0
mov edi, str.DllRegisterServer
jne 0x6d5a9faa
mov edi, str.DllUnregisterServer
push edi
push esi
call dword [sym.imp.kernel32.dll_GetProcAddress]
cmp eax, ebp
jne 0x6d5aa012
push str.Failed_to_get_proc_address:
lea ecx, [esp + 0x20]
call fcn.6d596c20
push edi
lea ecx, [esp + 0x18]
call fcn.6d596c20
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.6d594760
lea ecx, [esp + 0x14]
call fcn.6d592330
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x6d5a9ff1
mov eax, dword [eax]
jmp 0x6d5a9ff3
xor eax, eax
push eax
call fcn.6d5951a0
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.6d592330
lea ecx, [esp + 0x18]
call fcn.6d592330
xor eax, eax
jmp 0x6d5aa02f
call eax
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoFreeUnusedLibraries]
lea ecx, [esp + 0x18]
call fcn.6d592330
mov eax, 1
mov ecx, dword [esp + 0x27c]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.6d5ca6ac
add esp, 0x270
ret