Function at 0x10017470
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 [0x1004f860]
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 0x100174a0
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 0x10017513
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 0x100174da
cmp ebx, edi
je 0x100174da
push 0x8007000e
call fcn.10030ab0
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 0x100174d0
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 0x1001751d
push 0x8007000e
call fcn.10030ab0
push 0x8007000e
call fcn.10030ab0
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x18], esi
call fcn.10004760
push edi
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x10017560
mov eax, dword [esi]
cmp eax, ebp
je 0x10017547
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x10017557
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 0x10017958
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.10002e00
mov esi, dword [esp + 0x24]
cmp esi, ebp
je 0x100175b2
cmp dword [esi + 4], ebp
jne 0x100175ad
mov eax, dword [esi]
push eax
call fcn.10030ab0
mov dword [esi + 4], eax
mov esi, dword [esi + 4]
jmp 0x100175b4
xor esi, esi
push esi
push 0x1003ea2c
call dword [sym.imp.imagehlp.dll_ImageLoad]
cmp eax, ebp
je 0x100178a1
mov ecx, dword [eax + 0xc]
movzx edi, word [ecx + 4]
push eax
call dword [sym.imp.imagehlp.dll_ImageUnload]
test eax, eax
je 0x100178a1
mov edx, 0x8664
mov esi, edi
cmp dx, di
jne 0x100175fc
push 0x104
lea eax, [esp + 0x78]
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
jmp 0x1001761a
mov ecx, 0x14c
cmp cx, di
jne 0x100178a3
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 0x1003ea08
lea ecx, [esp + 0x24]
mov dword [esp + 0x3c], 0x3c
call fcn.10002e00
cmp byte [esp + 0x288], 0
jne 0x10017684
push 0x1003ea00
lea ecx, [esp + 0x14]
call fcn.10002e00
lea edx, [esp + 0x10]
push edx
lea ecx, [esp + 0x24]
call fcn.10004760
lea ecx, [esp + 0x10]
call fcn.10002330
push 0x1003c448
lea ecx, [esp + 0x14]
call fcn.10002e00
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
call fcn.10004760
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x100176dc
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x100176dc
mov eax, dword [esi]
cmp eax, ebp
je 0x100176c3
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x100176d3
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.10004760
push 0x1003c448
lea ecx, [esp + 0x14]
call fcn.10002e00
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x24]
call fcn.10004760
mov esi, dword [esp + 0x10]
cmp esi, ebp
je 0x10017742
lea ecx, [esi + 8]
push ecx
call dword [sym.imp.kernel32.dll_InterlockedDecrement]
test eax, eax
jne 0x10017742
mov eax, dword [esi]
cmp eax, ebp
je 0x10017729
push eax
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [esi + 4]
cmp eax, ebp
je 0x10017739
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 0x10017773
mov eax, dword [eax]
mov dword [esp + 0x4c], eax
jmp 0x10017777
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 0x100177b6
mov eax, dword [esp + 0x70]
cmp eax, ebp
je 0x100177b6
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 0x1001787f
push str.regsvr32.exe_error__
lea ecx, [esp + 0x14]
call fcn.10006920
lea edx, [esp + 0x74]
push edx
lea ecx, [esp + 0x18]
call fcn.10002e00
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
push str.___error_code:
lea ecx, [esp + 0x18]
call fcn.10006920
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
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.10015dd0
push eax
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
lea edx, [esp + 0x28]
push edx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x10017862
mov eax, dword [eax]
jmp 0x10017864
xor eax, eax
push eax
call fcn.10004ff0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.10002330
lea ecx, [esp + 0x20]
jmp 0x1001793a
lea ecx, [esp + 0x20]
call fcn.10002330
lea ecx, [esp + 0x24]
call fcn.10002330
lea ecx, [esp + 0x18]
call fcn.10002330
mov eax, esi
jmp 0x10017aff
xor esi, esi
push str.Unexpected_machine_type_from__
lea ecx, [esp + 0x14]
call fcn.10006920
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
call fcn.10004760
push str.___machine_type:
lea ecx, [esp + 0x18]
call fcn.10006920
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
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.10015dd0
push eax
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
lea ecx, [esp + 0x28]
push ecx
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x1001792b
mov eax, dword [eax]
jmp 0x1001792d
xor eax, eax
push eax
call fcn.10004ff0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.10002330
lea ecx, [esp + 0x24]
call fcn.10002330
lea ecx, [esp + 0x18]
call fcn.10002330
xor eax, eax
jmp 0x10017aff
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x10017964
mov eax, dword [eax]
jmp 0x10017966
xor eax, eax
push eax
call fcn.10030ab0
mov esi, eax
cmp esi, ebp
jne 0x10017a66
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 0x100174d0
mov ebx, 1
push str.Failed_to_load__
mov dword [esi + 4], ebp
mov dword [esi + 8], ebx
call fcn.10030ab0
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x14]
mov dword [esi], eax
mov dword [esp + 0x14], esi
call fcn.10004760
push 0xc
call sub.MSVCR100.dll_void____cdecl_operator_new_unsigned_int_
mov esi, eax
add esp, 4
cmp esi, ebp
je 0x100174d0
push str.___error_code
mov dword [esi + 4], ebp
mov dword [esi + 8], ebx
call fcn.10030ab0
mov dword [esi], eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x14]
mov dword [esp + 0x18], esi
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
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.10015dd0
push eax
lea ecx, [esp + 0x14]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x10017a42
mov eax, dword [eax]
jmp 0x10017a44
xor eax, eax
push eax
call fcn.10004ff0
add esp, 4
lea ecx, [esp + 0x10]
call fcn.10002330
lea ecx, [esp + 0x18]
call fcn.10002330
xor eax, eax
jmp 0x10017aff
cmp byte [esp + 0x288], 0
mov edi, str.DllRegisterServer
jne 0x10017a7a
mov edi, str.DllUnregisterServer
push edi
push esi
call dword [sym.imp.kernel32.dll_GetProcAddress]
cmp eax, ebp
jne 0x10017ae2
push str.Failed_to_get_proc_address:
lea ecx, [esp + 0x20]
call fcn.10006920
push edi
lea ecx, [esp + 0x18]
call fcn.10006920
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x20]
call fcn.10004760
lea ecx, [esp + 0x14]
call fcn.10002330
mov eax, dword [esp + 0x1c]
cmp eax, ebp
je 0x10017ac1
mov eax, dword [eax]
jmp 0x10017ac3
xor eax, eax
push eax
call fcn.10004ff0
add esp, 4
lea ecx, [esp + 0x1c]
call fcn.10002330
lea ecx, [esp + 0x18]
call fcn.10002330
xor eax, eax
jmp 0x10017aff
call eax
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoFreeUnusedLibraries]
lea ecx, [esp + 0x18]
call fcn.10002330
mov eax, 1
mov ecx, dword [esp + 0x27c]
pop ebp
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1003779c
add esp, 0x270
ret