Function at 0x401690
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
lea ebp, [esp - 0x20c]
sub esp, 0x20c
push 0xffffffffffffffff
push 0x403ad0
mov eax, dword fs:[0]
push eax
sub esp, 0x50
mov eax, dword [0x40603c]
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 dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x214]
xor ebx, ebx
mov esi, edx
cmp esi, ebx
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x50], ecx
mov dword [ebp - 4], ebx
je 0x401873
push 0x206
lea edx, [ebp + 2]
push ebx
push edx
mov word [ebp], bx
call sub.MSVCR80.dll_memset
add esp, 0xc
mov ecx, str.SYSTEMCurrentControlSetControlClass_
lea edx, [ebp]
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x401705
mov eax, esi
mov edx, esi
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401720
lea edi, [ebp]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x401733
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp]
lea esi, [ebp - 0x4c]
call fcn.00402cd0
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x48]
cmp eax, ebx
je 0x401798
mov ecx, 4
mov dword [ebp - 0x58], ecx
mov dword [ebp - 0x54], ecx
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x14]
push edx
lea ecx, [ebp - 0x58]
push ecx
push ebx
push str.DeviceType
push eax
mov dword [ebp - 0x14], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
mov dword [ebp - 0x4c], eax
jne 0x401798
mov eax, dword [ebp - 0x14]
jmp 0x40179b
or eax, 0xffffffff
mov edx, dword [ebp - 0x50]
mov dword [edx], eax
lea eax, [ebp]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
cmp cx, bx
jne 0x4017a6
mov ecx, dword [str.DeviceData]
mov edx, dword [0x4042ec]
mov dword [eax], ecx
mov ecx, dword [0x4042f0]
mov dword [eax + 4], edx
mov edx, dword [0x4042f4]
mov dword [eax + 8], ecx
mov ecx, dword [0x4042f8]
mov dword [eax + 0xc], edx
mov edx, dword [0x4042fc]
mov dword [eax + 0x10], ecx
lea edi, [ebp]
lea esi, [ebp - 0x30]
mov dword [eax + 0x14], edx
call fcn.00402cd0
mov byte [ebp - 4], 2
call fcn.00402d50
cmp eax, ebx
jne 0x40189a
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
je 0x401814
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x28]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov ecx, dword [ebp - 0x20]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x18]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x48]
add esp, 0x10
cmp eax, ebx
je 0x40184c
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4c], eax
mov ecx, dword [ebp - 0x44]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [ebp - 0x3c]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x38]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov ecx, dword [ebp - 0x34]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 0x10
xor al, al
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.00402f2c
add ebp, 0x20c
mov esp, ebp
pop ebp
ret
lea esi, [ebp - 0x30]
call fcn.00402d50
mov edx, dword [ebp - 0x5c]
mov ecx, eax
movzx eax, word [ecx]
mov word [edx], ax
add ecx, 2
add edx, 2
cmp ax, bx
jne 0x4018a7
mov eax, dword [ebp - 0x2c]
cmp eax, ebx
je 0x4018c9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x28]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x20]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [ebp - 0x18]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x48]
add esp, 0x10
cmp eax, ebx
je 0x401901
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x44]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov ecx, dword [ebp - 0x3c]
push ecx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov edx, dword [ebp - 0x38]
push edx
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
mov eax, dword [ebp - 0x34]
push eax
call sub.MSVCR80.dll_void___cdecl_operator_delete___void__
add esp, 0x10
mov al, 1
jmp 0x401875