Function at 0x10021251
Capabilities:
Create process on windows
Get common file path
Set registry value

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x100ba28b
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x1011ca44]
xor eax, ebp
mov dword [ebp + 0x208], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov al, byte [ebp + 0x218]
test byte [ebp + 0x220], 1
mov esi, dword [ebp + 0x214]
push 0
pop ecx
movzx eax, al
cmove ecx, eax
mov dword [ebp - 0x14], ecx
lea ecx, [ebp - 0x1c]
push esi
call fcn.10001727
xor ebx, ebx
lea ecx, [ebp - 0x20]
push 0x100d749c
mov dword [ebp - 4], ebx
call fcn.10001727
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x1c]
call fcn.1000187c
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], bl
test ecx, ecx
je 0x100212e3
call fcn.10001b26
cmp byte [ebp + 0x21c], 0
je 0x1002164e
push 0x208
lea eax, [ebp]
push ebx
push eax
call fcn.1005c640
add esp, 0xc
lea ecx, [ebp - 0x18]
push esi
call fcn.10001727
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.1001d871
push eax
push str.wsdetect.dll
call dword [sym.imp.imagehlp.dll_ImageLoad]
mov ecx, eax
test ecx, ecx
jne 0x100213c8
mov esi, ebx
push str.Unexpected_machine_type_from__
lea ecx, [ebp - 0x10]
call fcn.1000d9ae
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
push str.___machine_type:
lea ecx, [ebp - 0x14]
call fcn.1000d9ae
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x10021375
call fcn.10001b26
push 0x12
pop eax
mov word [ebp - 0x34], ax
mov word [ebp - 0x2c], si
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 5
push eax
lea ecx, [ebp - 0x14]
call fcn.1001d68c
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.1000187c
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100213ac
call fcn.10001b26
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x10021626
mov eax, dword [esi]
jmp 0x10021628
mov eax, dword [ecx + 0xc]
push ecx
movzx edi, word [eax + 4]
call dword [sym.imp.imagehlp.dll_ImageUnload]
test eax, eax
je 0x1002132d
mov eax, 0x8664
mov esi, edi
cmp ax, di
jne 0x100213fc
mov esi, 0x104
lea eax, [ebp]
push esi
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
jmp 0x10021418
mov eax, 0x14c
cmp ax, di
jne 0x1002132f
lea esi, [eax - 0x48]
push esi
lea eax, [ebp]
push eax
call dword [sym.imp.kernel32.dll_GetSystemWow64DirectoryW]
push str._regsvr32.exe
lea eax, [ebp]
push esi
push eax
call fcn.10061e37
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.1005c640
add esp, 0x18
mov dword [ebp - 0x70], esi
lea ecx, [ebp - 0x24]
push 0x100d76c8
call fcn.10001727
cmp byte [ebp - 0x14], 0
mov byte [ebp - 4], 7
jne 0x1002147f
push 0x100d76d0
lea ecx, [ebp - 0x10]
call fcn.10001727
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x24]
call fcn.1000187c
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x1002147f
call fcn.10001b26
push 0x100d76d8
lea ecx, [ebp - 0x10]
call fcn.10001727
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x24]
call fcn.1000187c
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x100214ac
call fcn.10001b26
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
call fcn.1000187c
push 0x100d76dc
lea ecx, [ebp - 0x10]
call fcn.10001727
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x24]
call fcn.1000187c
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x100214e5
call fcn.10001b26
mov edi, dword [ebp - 0x24]
lea eax, [ebp]
xor esi, esi
mov dword [ebp - 0x64], 0x100d76e0
inc esi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x6c], 0x40
test edi, edi
je 0x1002150d
mov eax, dword [edi]
mov dword [ebp - 0x5c], eax
jmp 0x10021510
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x70]
mov dword [ebp - 0x20], esi
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x10021548
cmp dword [ebp - 0x38], 0
je 0x10021548
push 0xffffffffffffffff
push dword [ebp - 0x38]
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
lea eax, [ebp - 0x20]
push eax
push dword [ebp - 0x38]
call dword [sym.imp.kernel32.dll_GetExitCodeProcess]
push dword [ebp - 0x38]
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp dword [ebp - 0x20], 0
je 0x1002161c
push str.regsvr32.exe_error__
lea ecx, [ebp - 0x10]
call fcn.1000d9ae
lea eax, [ebp]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x14]
call fcn.10001727
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x1002158f
call fcn.10001b26
push str.___error_code:
lea ecx, [ebp - 0x14]
call fcn.1000d9ae
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100215b8
call fcn.10001b26
push 0x13
pop eax
mov word [ebp - 0x34], ax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x14]
call fcn.1001d68c
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call fcn.1000187c
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100215f1
call fcn.10001b26
mov dword [ebp - 0x14], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x10021606
mov eax, dword [esi]
jmp 0x10021608
mov eax, ebx
push eax
call fcn.10061e37
pop ecx
test esi, esi
je 0x1002161e
mov ecx, esi
call fcn.10001b26
jmp 0x1002161e
mov ebx, esi
test edi, edi
je 0x1002163a
mov ecx, edi
jmp 0x10021635
mov eax, ebx
push eax
call fcn.10061e37
pop ecx
test esi, esi
je 0x1002163a
mov ecx, esi
call fcn.10001b26
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021646
call fcn.10001b26
mov edi, dword [ebp - 0x1c]
jmp 0x1002178c
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x10021659
mov eax, dword [edi]
jmp 0x1002165b
mov eax, ebx
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x100216ff
call dword [sym.imp.kernel32.dll_GetLastError]
push str.Failed_to_load__
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.1000d9ae
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
push str.___error_code
lea ecx, [ebp - 0x18]
call fcn.1000d9ae
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x10]
call fcn.1000187c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100216ba
call fcn.10001b26
push 0x13
pop eax
mov word [ebp - 0x34], ax
mov dword [ebp - 0x2c], esi
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 0x12
push eax
lea ecx, [ebp - 0x18]
call fcn.1001d68c
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x13
call fcn.1000187c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x100216f0
call fcn.10001b26
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x10]
jmp 0x1002175a
cmp byte [ebp - 0x14], 0
mov ecx, str.DllUnregisterServer
mov eax, str.DllRegisterServer
cmove eax, ecx
push eax
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
jne 0x10021778
push str.Failed_to_get_proc_address:
lea ecx, [ebp - 0x14]
call fcn.1000d9ae
push dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0x14
call fcn.1000d9ae
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x14]
call fcn.1000187c
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021757
call fcn.10001b26
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10021762
mov eax, dword [esi]
jmp 0x10021764
mov eax, ebx
push eax
call fcn.10061e37
pop ecx
test esi, esi
je 0x1002178c
mov ecx, esi
call fcn.10001b26
jmp 0x1002178c
call eax
push esi
call dword [sym.imp.kernel32.dll_FreeLibrary]
call dword [sym.imp.ole32.dll_CoFreeUnusedLibraries]
xor esi, esi
lea ebx, [esi + 1]
test edi, edi
je 0x10021797
mov ecx, edi
call fcn.10001b26
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x208]
xor ecx, ebp
call fcn.100587af
add ebp, 0x20c
leave
ret