Function at 0x405880
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
sub esp, 0x238
mov eax, dword [0x4844f0]
xor eax, esp
mov dword [esp + 0x234], eax
mov eax, dword [str.VID_0ac8PID_0331]
mov ecx, dword [0x470124]
mov edx, dword [0x470128]
mov dword [esp + 0x20], eax
mov eax, dword [0x47012c]
mov dword [esp + 0x2c], eax
mov eax, dword [0x47009c]
push ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], ecx
mov cx, word [0x470130]
mov dword [esp + 0x2c], edx
mov edx, dword [str.vm331Rmv.ini]
lea eax, [esp + 4]
push eax
mov word [esp + 0x38], cx
mov ecx, dword [0x4700a0]
mov dword [esp + 0x14], edx
mov dl, byte [0x4700a4]
push 0x486368
mov ebx, 1
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x24], ecx
mov byte [esp + 0x28], dl
mov dword [esp + 0x14], 0x24
mov dword [esp + 0x18], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x405946
lea ecx, [esp + 8]
push ecx
mov ecx, dword [esp + 8]
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x14]
push eax
push 0
push str.RemoveSettingFile
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x40595e
xor eax, eax
jmp 0x405950
mov cl, byte [esp + eax + 0x10]
mov byte [esp + eax + 0x38], cl
add eax, ebx
test cl, cl
jne 0x405950
push ebp
push esi
push edi
lea eax, [esp + 0x44]
push eax
push str.szFileName___s_n
call fcn.00404b50
mov ebp, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
add esp, 8
lea ecx, [esp + 0x44]
push ecx
push 0x104
push 0x489a90
lea edx, [esp + 0x3c]
push edx
push str.DeviceID_0
push str.DrvUninstall
call ebp
mov dword [0x4867bc], ebx
mov edi, ebx
mov esi, 0x489b94
jmp 0x4059b0
push pe_nt_image_headers32
lea eax, [esp + 0x148]
push 0
push eax
call fcn.00440bc0
push edi
lea ecx, [esp + 0x154]
push str.DeviceID__d
push ecx
call fcn.0043ecbd
add esp, 0x18
lea edx, [esp + 0x44]
push edx
push 0x104
push esi
push 0x470063
lea eax, [esp + 0x154]
push eax
push str.DrvUninstall
call ebp
test eax, eax
je 0x405a23
push eax
push esi
push edi
push str.m_DevInstanceName__d____s____d__n
call fcn.00404b50
add dword [0x4867bc], ebx
add esi, 0x104
add esp, 0x10
add edi, ebx
cmp esi, 0x48cd58
jl 0x4059b0
mov eax, dword [0x4700c8]
mov ecx, dword [str.Digital_Camera_1]
mov edx, dword [0x4700c4]
mov dword [esp + 0x24], eax
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x20], ecx
mov ecx, dword [0x4700cc]
mov dword [esp + 0x24], edx
mov dl, byte [0x4700d0]
push 0x486368
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x34], ecx
mov byte [esp + 0x38], dl
mov dword [esp + 0x20], 0x104
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
pop edi
pop esi
pop ebp
jne 0x405acd
lea ecx, [esp + 8]
push ecx
push 0x486260
lea edx, [esp + 0x14]
push edx
push eax
mov eax, dword [esp + 0x14]
push str.DSName
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 4]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x486260
push str.DSName___s_n
call fcn.00404b50
add esp, 8
mov al, bl
pop ebx
mov ecx, dword [esp + 0x234]
xor ecx, esp
call fcn.0043e789
add esp, 0x238
ret
xor eax, eax
nop
mov cl, byte [esp + eax + 0x10]
mov byte [eax + 0x486260], cl
add eax, ebx
test cl, cl
jne 0x405ad0
mov ecx, dword [esp + 0x238]
mov al, bl
pop ebx
xor ecx, esp
call fcn.0043e789
add esp, 0x238
ret