Function at 0x405720
Capabilities:
Set registry value

Disassembly:
sub esp, 0x428
mov eax, dword [0x41c028]
xor eax, esp
mov dword [esp + 0x424], eax
push ebx
push ebp
mov ebp, dword [esp + 0x434]
push esi
push edi
xor esi, esi
push 0x206
mov ebx, ecx
lea ecx, [esp + 0x22e]
xor eax, eax
push esi
push ecx
mov dword [esp + 0x1c], esi
xor edi, edi
mov dword [esp + 0x20], esi
mov word [esp + 0x234], ax
call fcn.0040e6d0
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x2a]
push eax
mov word [esp + 0x2c], dx
call fcn.0040e6d0
add esp, 0xc
push ebp
add ebx, 0x228
push ebx
push str._sControlSet001Enum_s
lea ecx, [esp + 0x234]
push 0x104
push ecx
call fcn.00409a2f
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
add esp, 0x14
lea edx, [esp + 0x10]
push edx
push 0xf003f
push edi
lea eax, [esp + 0x234]
push eax
push 0x80000002
call ebx
test eax, eax
je 0x4058c0
cmp eax, 2
je 0x40582c
push eax
push 0x150
push str..UASPSupporter.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push edi
push edi
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x1510000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x152
push str..UASPSupporter.cpp
push str._S__d_nRet0x_016llX_n
call fcn.004019b0
add esp, 0x14
jmp 0x405ab9
lea ecx, [esp + 0x228]
push ecx
push 0x80000002
call fcn.004046f0
mov esi, eax
movzx ecx, dx
xor eax, eax
add esp, 8
or eax, ecx
mov edi, edx
mov dword [esp + 0x1c], edi
je 0x40585b
push edi
push esi
push 0x159
jmp 0x405815
lea edx, [esp + 0x10]
push edx
push 0xf003f
push 0
lea eax, [esp + 0x234]
push eax
push 0x80000002
call ebx
test eax, eax
je 0x4058c0
push eax
push 0x160
push str..UASPSupporter.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x1610000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x162
jmp 0x405815
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 4
lea ecx, [esp + 0x18]
push ecx
push 4
push 0
push str.Capabilities
push edx
mov dword [esp + 0x2c], 0x94
call ebp
test eax, eax
je 0x40592f
push eax
push 0x16b
push str..UASPSupporter.cpp
push str._S__d_dwErrNo0x_x_n
call fcn.004019b0
add esp, 0x10
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x16c0000
mov edi, edx
adc edi, 0x15
push edi
push esi
push 0x16d
jmp 0x405815
push str._usbstor.inf__genericbulkonly.devicedesc__USB_Mass_Storage_Device
lea eax, [esp + 0x24]
push 0x104
push eax
call fcn.00409560
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405950
sub eax, edx
sar eax, 1
lea ecx, [eax + eax]
mov eax, dword [esp + 0x10]
push ecx
lea edx, [esp + 0x24]
push edx
push 1
push 0
push str.DeviceDesc
push eax
call ebp
mov ebx, eax
test ebx, ebx
je 0x4059ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x1760000
mov edi, edx
push ebx
adc edi, 0x15
push edi
push esi
push 0x177
jmp 0x405aa7
push str._usbstor.inf__generic.mfg__Compatible_USB_storage_device
lea ecx, [esp + 0x24]
push 0x104
push ecx
call fcn.00409560
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x4059d0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4059d0
mov ecx, dword [esp + 0x10]
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
push edx
lea eax, [esp + 0x24]
push eax
push 1
push 0
push 0x4195bc
push ecx
call ebp
mov ebx, eax
test ebx, ebx
je 0x405a2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x1800000
mov edi, edx
push ebx
adc edi, 0x15
push edi
push esi
push 0x181
jmp 0x405aa7
push str.USBSTOR
lea edx, [esp + 0x24]
push 0x104
push edx
call fcn.00409560
lea eax, [esp + 0x2c]
add esp, 0xc
lea edx, [eax + 2]
jmp 0x405a50
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x405a50
sub eax, edx
mov edx, dword [esp + 0x10]
sar eax, 1
add eax, eax
push eax
lea ecx, [esp + 0x24]
push ecx
push 1
push 0
push str.Service
push edx
call ebp
mov ebx, eax
test ebx, ebx
je 0x405ab9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x10000
push 0
push 0
push eax
call fcn.004148f0
mov esi, eax
add esi, 0x18a0000
mov edi, edx
push ebx
adc edi, 0x15
push edi
push esi
push 0x18b
push str..UASPSupporter.cpp
push str._S__d_nRet0x_016llX_dwErrNo0x_08X_n
call fcn.004019b0
add esp, 0x18
mov eax, dword [esp + 0x10]
test eax, eax
je 0x405ac8
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x434]
mov edx, edi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00409551
add esp, 0x428
ret 4