Function at 0x10021b2f
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 0x100698e9
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x100be114]
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 - 0x10], ecx
lea ecx, [ebp - 0x20]
push esi
call fcn.1000154d
xor ebx, ebx
lea ecx, [ebp - 0x1c]
push 0x10081bc4
mov dword [ebp - 4], ebx
call fcn.1000154d
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x20]
call fcn.10001683
mov ecx, dword [ebp - 0x1c]
mov byte [ebp - 4], bl
test ecx, ecx
je 0x10021bc1
call fcn.100016dc
cmp byte [ebp + 0x21c], 0
je 0x10021f18
push 0x208
lea eax, [ebp]
push ebx
push eax
call fcn.1003d660
add esp, 0xc
lea ecx, [ebp - 0x18]
push esi
call fcn.1000154d
cmp dword [ebp - 0x18], 0
mov byte [ebp - 4], 2
je 0x10021bfd
mov ecx, dword [ebp - 0x18]
call fcn.1002a827
jmp 0x10021bff
mov eax, ebx
push eax
push str.wsdetect.dll
call fcn.10021b03
movzx esi, ax
mov eax, 0x8664
pop ecx
pop ecx
cmp ax, si
jne 0x10021c2b
mov esi, 0x104
lea eax, [ebp]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x10021c47
mov eax, 0x14c
cmp ax, si
jne 0x10021e5c
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.1004aa73
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.1003d660
add esp, 0x18
mov dword [ebp - 0x70], esi
lea ecx, [ebp - 0x24]
push 0x10081df0
call fcn.1000154d
cmp byte [ebp - 0x10], 0
mov byte [ebp - 4], 7
jne 0x10021cae
push 0x10081df8
lea ecx, [ebp - 0x14]
call fcn.1000154d
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x24]
call fcn.10001683
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x10021cae
call fcn.100016dc
push 0x10081e00
lea ecx, [ebp - 0x14]
call fcn.1000154d
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x24]
call fcn.10001683
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x10021cdb
call fcn.100016dc
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x24]
call fcn.10001683
push 0x10081e04
lea ecx, [ebp - 0x14]
call fcn.1000154d
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x24]
call fcn.10001683
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x10021d14
call fcn.100016dc
mov edi, dword [ebp - 0x24]
lea eax, [ebp]
xor esi, esi
mov dword [ebp - 0x64], 0x10081e08
inc esi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x6c], 0x40
test edi, edi
je 0x10021d3c
mov eax, dword [edi]
mov dword [ebp - 0x5c], eax
jmp 0x10021d3f
mov dword [ebp - 0x5c], ebx
lea eax, [ebp - 0x70]
mov dword [ebp - 0x1c], esi
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
test eax, eax
je 0x10021d77
cmp dword [ebp - 0x38], 0
je 0x10021d77
push 0xffffffffffffffff
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x1c]
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 - 0x1c], 0
je 0x10021e4b
push str.regsvr32.exe_error__
lea ecx, [ebp - 0x14]
call fcn.100127e8
lea eax, [ebp]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x10]
call fcn.1000154d
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x14]
call fcn.10001683
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x10021dbe
call fcn.100016dc
push str.___error_code:
lea ecx, [ebp - 0x10]
call fcn.100127e8
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x14]
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021de7
call fcn.100016dc
push 0x13
pop eax
mov word [ebp - 0x34], ax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 0xe
push eax
lea ecx, [ebp - 0x10]
call fcn.10005798
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 0xf
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021e20
call fcn.100016dc
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10021e35
mov eax, dword [esi]
jmp 0x10021e37
mov eax, ebx
push eax
call fcn.100300e1
pop ecx
test esi, esi
je 0x10021e4d
mov ecx, esi
call fcn.100016dc
jmp 0x10021e4d
mov ebx, esi
test edi, edi
je 0x10021f02
mov ecx, edi
jmp 0x10021efd
push str.Unexpected_machine_type_from__
lea ecx, [ebp - 0x14]
call fcn.100127e8
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x14]
call fcn.10001683
push str.___machine_type:
lea ecx, [ebp - 0x10]
call fcn.100127e8
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x14]
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021ea2
call fcn.100016dc
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 - 0x10]
call fcn.10005798
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 6
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021ed9
call fcn.100016dc
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10021eee
mov eax, dword [esi]
jmp 0x10021ef0
mov eax, ebx
push eax
call fcn.100300e1
pop ecx
test esi, esi
je 0x10021f02
mov ecx, esi
call fcn.100016dc
cmp dword [ebp - 0x18], 0
je 0x10021f10
mov ecx, dword [ebp - 0x18]
call fcn.100016dc
mov edi, dword [ebp - 0x20]
jmp 0x10022056
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x10021f23
mov eax, dword [edi]
jmp 0x10021f25
mov eax, ebx
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x10021fc9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str.Failed_to_load__
lea ecx, [ebp - 0x18]
mov esi, eax
call fcn.100127e8
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x18]
call fcn.10001683
push str.___error_code
lea ecx, [ebp - 0x10]
call fcn.100127e8
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x18]
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021f84
call fcn.100016dc
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 - 0x10]
call fcn.10005798
push eax
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0x13
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10021fba
call fcn.100016dc
mov dword [ebp - 0x10], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x18]
jmp 0x10022024
cmp byte [ebp - 0x10], 0
mov ecx, 0x10081e74
mov eax, 0x10081e60
cmove eax, ecx
push eax
push esi
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x10022042
push str.Failed_to_get_proc_address:
lea ecx, [ebp - 0x1c]
call fcn.100127e8
push dword [ebp - 0x10]
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x14
call fcn.100127e8
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x1c]
call fcn.10001683
mov ecx, dword [ebp - 0x10]
test ecx, ecx
je 0x10022021
call fcn.100016dc
mov esi, dword [ebp - 0x1c]
test esi, esi
je 0x1002202c
mov eax, dword [esi]
jmp 0x1002202e
mov eax, ebx
push eax
call fcn.100300e1
pop ecx
test esi, esi
je 0x10022056
mov ecx, esi
call fcn.100016dc
jmp 0x10022056
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 0x10022061
mov ecx, edi
call fcn.100016dc
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.1003b105
add ebp, 0x20c
leave
ret