Function at 0x40a361
Capabilities:
Create process on windows
Delete file
Delete registry value
Get disk information
Query or enumerate registry value
Read .ini file
Set registry value

Disassembly:
sub esp, 0xfc8
mov eax, dword [0x43b004]
xor eax, esp
mov dword [esp + 0xfc4], eax
push ebp
push esi
push edi
xor eax, eax
mov ebp, 0x206
push ebp
mov word [esp + 0x2dc], ax
xor edi, edi
lea eax, [esp + 0x2de]
mov esi, ecx
push edi
push eax
call fcn.004162b0
add esp, 0xc
lea eax, [esp + 0x2d8]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsW]
mov ecx, edi
test eax, eax
jle 0x40a3d0
cmp word [esp + ecx*2 + 0x2d8], di
jne 0x40a3cb
push 0x20
pop edx
mov word [esp + ecx*2 + 0x2d8], dx
inc ecx
cmp ecx, eax
jl 0x40a3b6
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edi
push eax
push 0xf003f
push edi
push str.SOFTWAREMicrosoftWindowsCurrentVersionPoliciesExplorer_
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x40ab15
push ebx
lea eax, [esp + 0x94]
mov dword [esp + 0x90], edi
push eax
lea eax, [esp + 0x8f8]
mov dword [esp + 0x9c], 4
push eax
lea eax, [esp + 0xa0]
mov dword [esp + 0x9c], 0x64
push eax
push edi
mov ebx, str.NoDriveTypeAutoRun
push ebx
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a451
movzx eax, word [esp + 0x8f4]
mov dword [esp + 0x90], eax
push 4
lea eax, [esp + 0xa0]
mov dword [esp + 0xa0], 0xff
push eax
push 4
push edi
push ebx
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor eax, eax
push ebp
mov word [esp + 0x9c0], ax
lea eax, [esp + 0x9c2]
push edi
push eax
call fcn.004162b0
xor eax, eax
push ebp
mov word [esp + 0x4f4], ax
lea eax, [esp + 0x4f6]
push edi
push eax
call fcn.004162b0
add esp, 0x18
lea eax, [esp + 0x9bc]
push 0x443950
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
push str.TempNonElevated_
lea eax, [esp + 0x9c0]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push edi
push edi
push 0xf0
push 0x24f
push esi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
mov ebx, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ebp, 0x444170
test eax, eax
je 0x40a7d3
push 0x204
lea eax, [esp + 0xdc]
mov dword [esp + 0xd8], 0x30
push edi
push eax
call fcn.004162b0
mov ebp, edi
xor eax, eax
mov word [esp + 0xac], ax
lea edi, [esp + 0xae]
stosd dword es:[edi], eax
add esp, 0xc
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
push 0x444170
push 9
lea eax, [esp + 0xa8]
push eax
push edi
lea eax, [esp + 0xe4]
push eax
push str.VD_DISK
call ebx
test eax, eax
je 0x40a7ce
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x2e0]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
jne 0x40a7b0
push 0x444170
push edi
lea eax, [esp + 0xdc]
push eax
push str.VD_CHECK
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x40a7b0
push 0x444170
push 0x104
lea eax, [esp + 0x6f4]
push eax
push edi
lea eax, [esp + 0xe4]
push eax
push str.VD_PATH
call ebx
push str.w__ccsUTF_8
lea eax, [esp + 0x14]
push 0x443d60
push eax
call fcn.00419312
add esp, 0xc
test eax, eax
jne 0x40a6ff
cmp dword [esp + 0x10], eax
je 0x40a63a
lea eax, [esp + 0x6ec]
push eax
push str.select_vdisk_file__s__n
push dword [esp + 0x18]
call fcn.0040b450
push str.attach_vdisk_n
push dword [esp + 0x20]
call fcn.0040b450
push str.select_part_1_n
push dword [esp + 0x28]
call fcn.0040b450
movzx eax, word [esp + 0xbc]
push eax
push str.assign_letter_C_n
push dword [esp + 0x34]
call fcn.0040b450
push dword [esp + 0x38]
call fcn.004193d0
add esp, 0x2c
xor eax, eax
push 0x40e
mov word [esp + 0xbc8], ax
lea eax, [esp + 0xbca]
push edi
push eax
call fcn.004162b0
push 0x443d60
push str._s___s_
lea eax, [esp + 0xbd8]
push 0x208
push eax
call fcn.0040b4a0
mov eax, dword [0x44437c]
add esp, 0x1c
mov dword [esp + 0x20], eax
xorps xmm0, xmm0
lea eax, [esp + 0xbc4]
movlpd qword [esp + 0x3c], xmm0
mov dword [esp + 0x2c], eax
mov eax, dword [0x444380]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x18]
push eax
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x50], xmm0
mov dword [esp + 0x1c], 0x3c
mov dword [esp + 0x20], 0x440
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], str.diskpart.exe
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
cmp dword [esp + 0x50], 0
je 0x40a6f4
push 0xffffffffffffffff
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x443d60
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0x43672c
lea eax, [esp + 0xa4]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0xb6]
mov word [esp + 0xb4], ax
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [esp + 0xb4]
push edi
push edi
push edi
push edi
push edi
push 0xf
push eax
lea eax, [esp + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x40a7b0
push 7
pop ecx
xor eax, eax
lea edi, [esp + 0x56]
push 0x444170
mov word [esp + 0x58], ax
rep stosd dword es:[edi], eax
push 0xe
lea eax, [esp + 0x5c]
xor edi, edi
push eax
push edi
lea eax, [esp + 0xe4]
push eax
push str.VD_LABEL
call ebx
lea eax, [esp + 0xb4]
push eax
lea eax, [esp + 0x58]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCmpW]
test eax, eax
je 0x40a7b0
push 0x444170
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0xdc]
push eax
push str.VD_LABEL
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 0xa
push 0x104
lea eax, [esp + 0xdc]
inc ebp
push eax
push ebp
call fcn.0041a581
add esp, 0x10
jmp 0x40a538
mov ebp, 0x444170
push edi
push edi
push 0xf0
push 0x250
push esi
call dword [sym.imp.USER32.dll_GetDlgItem]
push eax
call dword [sym.imp.USER32.dll_SendMessageW]
test eax, eax
je 0x40aad3
push 0x30
pop esi
push 0x204
lea eax, [esp + 0x6f4]
mov dword [esp + 0x6f0], esi
push edi
push eax
call fcn.004162b0
push 0x204
lea eax, [esp + 0xe8]
mov dword [esp + 0xe4], esi
push edi
push eax
call fcn.004162b0
xor eax, eax
mov esi, edi
push 0x206
mov word [esp + 0xbe0], ax
lea eax, [esp + 0xbe2]
push edi
push eax
call fcn.004162b0
xor eax, eax
lea edi, [esp + 0xc6]
mov word [esp + 0xc4], ax
add esp, 0x24
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
xor edi, edi
jmp 0x40aab0
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x2e0]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
jne 0x40aa97
push ebp
push edi
lea eax, [esp + 0xdc]
push eax
push str.SUBST_CHECK
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x40aa97
push ebp
push 0x104
lea eax, [esp + 0xbcc]
push eax
push edi
lea eax, [esp + 0xe4]
push eax
push str.SUBST_PATH
call ebx
lea eax, [esp + 0xbc4]
push eax
lea eax, [esp + 0xa4]
push eax
push str._s:___s_
lea eax, [esp + 0x6f8]
push 0x104
push eax
call fcn.0040b4a0
mov eax, dword [0x44437c]
add esp, 0x14
mov dword [esp + 0x20], eax
xorps xmm0, xmm0
lea eax, [esp + 0x6ec]
movlpd qword [esp + 0x3c], xmm0
mov dword [esp + 0x2c], eax
mov eax, dword [0x444380]
mov dword [esp + 0x38], eax
lea eax, [esp + 0x18]
push eax
movlpd qword [esp + 0x48], xmm0
movlpd qword [esp + 0x50], xmm0
mov dword [esp + 0x1c], 0x3c
mov dword [esp + 0x20], 0x440
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], str.Subst
mov dword [esp + 0x34], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
cmp dword [esp + 0x50], edi
je 0x40a96c
push 0xffffffffffffffff
push dword [esp + 0x54]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x50]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x9bc]
push eax
lea eax, [esp + 0x4e8]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCpyW]
lea eax, [esp + 0xa0]
push eax
lea eax, [esp + 0x4e8]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push str..cmd
lea eax, [esp + 0x4e8]
push eax
call dword [sym.imp.SHLWAPI.dll_StrCatW]
push str.w__ccsUTF_8
lea eax, [esp + 0x4e8]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.00419312
add esp, 0xc
test eax, eax
jne 0x40aa97
cmp dword [esp + 0x10], edi
je 0x40aa0b
push str.chcp_65001_n
push dword [esp + 0x14]
call fcn.0040b400
lea eax, [esp + 0xbcc]
push eax
lea eax, [esp + 0xac]
push eax
push str.chcp_65001_nsubst__s:___s__n
push dword [esp + 0x24]
call fcn.0040b400
push dword [esp + 0x28]
call fcn.004193d0
add esp, 0x1c
mov eax, dword [0x44437c]
xorps xmm0, xmm0
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x4e4]
mov dword [esp + 0x68], eax
mov eax, dword [0x444380]
mov dword [esp + 0x74], eax
lea eax, [esp + 0x54]
push eax
movlpd qword [esp + 0x7c], xmm0
movlpd qword [esp + 0x84], xmm0
movlpd qword [esp + 0x8c], xmm0
mov dword [esp + 0x58], 0x3c
mov dword [esp + 0x5c], 0x440
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], str.Explorer
mov dword [esp + 0x70], edi
mov dword [esp + 0x74], edi
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
cmp dword [esp + 0x8c], edi
je 0x40aa97
push 0xffffffffffffffff
push dword [esp + 0x90]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [esp + 0x8c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xa
push 0x104
lea eax, [esp + 0xdc]
inc esi
push eax
push esi
call fcn.0041a581
add esp, 0x10
push ebp
push 9
lea eax, [esp + 0xa8]
push eax
push edi
lea eax, [esp + 0xe4]
push eax
push str.SUBST_DISK
call ebx
test eax, eax
jne 0x40a86c
cmp dword [esp + 0x90], 0
pop ebx
jne 0x40aaef
push str.NoDriveTypeAutoRun
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
jmp 0x40ab0b
push 4
lea eax, [esp + 0x90]
push eax
push 4
push edi
push str.NoDriveTypeAutoRun
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0xfd0]
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00415673
add esp, 0xfc8
ret