Function at 0x10021658
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 0x10066a61
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x100bc054]
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.1000155e
xor ebx, ebx
lea ecx, [ebp - 0x20]
push 0x10084aec
mov dword [ebp - 4], ebx
call fcn.1000155e
lea eax, [ebp - 0x20]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x1c]
call fcn.10001697
mov ecx, dword [ebp - 0x20]
mov byte [ebp - 4], bl
test ecx, ecx
je 0x100216ea
call fcn.100016f0
cmp byte [ebp + 0x21c], 0
je 0x10021a35
push 0x208
lea eax, [ebp]
push ebx
push eax
call fcn.1003cd40
add esp, 0xc
lea ecx, [ebp - 0x18]
push esi
call fcn.1000155e
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 2
call fcn.10029b00
push eax
push str.wsdetect.dll
call fcn.1002162a
movzx esi, ax
mov eax, 0x8664
pop ecx
pop ecx
cmp ax, si
jne 0x1002174a
mov esi, 0x104
lea eax, [ebp]
push esi
push eax
call dword [sym.imp.kernel32.dll_GetSystemDirectoryW]
jmp 0x10021766
mov eax, 0x14c
cmp ax, si
jne 0x1002197b
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.100588e3
push 0x3c
pop esi
push esi
lea eax, [ebp - 0x70]
push ebx
push eax
call fcn.1003cd40
add esp, 0x18
mov dword [ebp - 0x70], esi
lea ecx, [ebp - 0x24]
push 0x10084d18
call fcn.1000155e
cmp byte [ebp - 0x14], 0
mov byte [ebp - 4], 7
jne 0x100217cd
push 0x10084d20
lea ecx, [ebp - 0x10]
call fcn.1000155e
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 8
push eax
lea ecx, [ebp - 0x24]
call fcn.10001697
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x100217cd
call fcn.100016f0
push 0x10084d28
lea ecx, [ebp - 0x10]
call fcn.1000155e
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 9
push eax
lea ecx, [ebp - 0x24]
call fcn.10001697
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x100217fa
call fcn.100016f0
lea eax, [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x24]
call fcn.10001697
push 0x10084d2c
lea ecx, [ebp - 0x10]
call fcn.1000155e
lea eax, [ebp - 0x10]
mov byte [ebp - 4], 0xa
push eax
lea ecx, [ebp - 0x24]
call fcn.10001697
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 7
test ecx, ecx
je 0x10021833
call fcn.100016f0
mov edi, dword [ebp - 0x24]
lea eax, [ebp]
xor esi, esi
mov dword [ebp - 0x64], 0x10084d30
inc esi
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x6c], 0x40
test edi, edi
je 0x1002185b
mov eax, dword [edi]
mov dword [ebp - 0x5c], eax
jmp 0x1002185e
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 0x10021896
cmp dword [ebp - 0x38], 0
je 0x10021896
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 0x1002196a
push str.regsvr32.exe_error__
lea ecx, [ebp - 0x10]
call fcn.10012712
lea eax, [ebp]
mov byte [ebp - 4], 0xb
push eax
lea ecx, [ebp - 0x14]
call fcn.1000155e
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xc
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
mov ecx, dword [ebp - 0x14]
mov byte [ebp - 4], 0xb
test ecx, ecx
je 0x100218dd
call fcn.100016f0
push str.___error_code:
lea ecx, [ebp - 0x14]
call fcn.10012712
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x10021906
call fcn.100016f0
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.1000575b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0xf
call fcn.10001697
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x1002193f
call fcn.100016f0
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 0x10021954
mov eax, dword [esi]
jmp 0x10021956
mov eax, ebx
push eax
call fcn.100588e3
pop ecx
test esi, esi
je 0x1002196c
mov ecx, esi
call fcn.100016f0
jmp 0x1002196c
mov ebx, esi
test edi, edi
je 0x10021a21
mov ecx, edi
jmp 0x10021a1c
push str.Unexpected_machine_type_from__
lea ecx, [ebp - 0x10]
call fcn.10012712
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
push str.___machine_type:
lea ecx, [ebp - 0x14]
call fcn.10012712
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100219c1
call fcn.100016f0
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.1000575b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 6
call fcn.10001697
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x100219f8
call fcn.100016f0
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 0x10021a0d
mov eax, dword [esi]
jmp 0x10021a0f
mov eax, ebx
push eax
call fcn.100588e3
pop ecx
test esi, esi
je 0x10021a21
mov ecx, esi
call fcn.100016f0
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021a2d
call fcn.100016f0
mov edi, dword [ebp - 0x1c]
jmp 0x10021b73
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x10021a40
mov eax, dword [edi]
jmp 0x10021a42
mov eax, ebx
push eax
call dword [sym.imp.kernel32.dll_LoadLibraryW]
mov esi, eax
test esi, esi
jne 0x10021ae6
call dword [sym.imp.kernel32.dll_GetLastError]
push str.Failed_to_load__
lea ecx, [ebp - 0x10]
mov esi, eax
call fcn.10012712
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x10
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
push str.___error_code
lea ecx, [ebp - 0x18]
call fcn.10012712
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x11
push eax
lea ecx, [ebp - 0x10]
call fcn.10001697
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021aa1
call fcn.100016f0
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.1000575b
push eax
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0x13
call fcn.10001697
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021ad7
call fcn.100016f0
mov dword [ebp - 0x18], ebx
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.OLEAUT32.dll_VariantCopy]
mov esi, dword [ebp - 0x10]
jmp 0x10021b41
cmp byte [ebp - 0x14], 0
mov ecx, 0x10084d9c
mov eax, 0x10084d88
cmove eax, ecx
push eax
push esi
mov dword [ebp - 0x18], eax
call dword [sym.imp.kernel32.dll_GetProcAddress]
test eax, eax
jne 0x10021b5f
push str.Failed_to_get_proc_address:
lea ecx, [ebp - 0x14]
call fcn.10012712
push dword [ebp - 0x18]
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 0x14
call fcn.10012712
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 0x15
push eax
lea ecx, [ebp - 0x14]
call fcn.10001697
mov ecx, dword [ebp - 0x18]
test ecx, ecx
je 0x10021b3e
call fcn.100016f0
mov esi, dword [ebp - 0x14]
test esi, esi
je 0x10021b49
mov eax, dword [esi]
jmp 0x10021b4b
mov eax, ebx
push eax
call fcn.100588e3
pop ecx
test esi, esi
je 0x10021b73
mov ecx, esi
call fcn.100016f0
jmp 0x10021b73
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 0x10021b7e
mov ecx, edi
call fcn.100016f0
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.1003a5a7
add ebp, 0x20c
leave
ret