Function at 0x4066a0
Capabilities:
Query or enumerate registry value

Disassembly:
push 0xffffffffffffffff
push 0x425700
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x458
push ebp
push esi
mov esi, ecx
push edi
lea ecx, [esp + 0x54]
mov dword [esp + 0x24], esi
call fcn.0041969c
xor ebp, ebp
lea ecx, [esp + 0x4c]
mov dword [esp + 0x46c], ebp
call fcn.0041969c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x46c], 1
call fcn.0041969c
lea ecx, [esp + 0x20]
mov byte [esp + 0x46c], 2
call fcn.0041969c
lea edi, [esi + 0x88]
mov byte [esp + 0x46c], 3
mov ecx, edi
call fcn.0040a260
test eax, eax
jne 0x406766
lea ecx, [esp + 0x20]
mov byte [esp + 0x46c], 2
call fcn.004197e7
lea ecx, [esp + 0x1c]
mov byte [esp + 0x46c], 1
call fcn.004197e7
lea ecx, [esp + 0x4c]
mov byte [esp + 0x46c], 0
call fcn.004197e7
lea ecx, [esp + 0x54]
mov dword [esp + 0x46c], 0xffffffff
call fcn.004197e7
jmp 0x406d64
push ebx
mov ecx, edi
call fcn.0040a830
mov dword [esp + 0x34], eax
lea eax, [esp + 0x20]
push eax
mov ecx, edi
call fcn.0040a5e0
lea ecx, [esp + 0x24]
push ecx
mov ecx, edi
call fcn.0040a510
lea edx, [esp + 0x20]
push 0x42e5a4
lea eax, [esp + 0x34]
push edx
push eax
call fcn.00419a3e
lea ecx, [esp + 0x24]
lea edx, [esp + 0x10]
push ecx
mov bl, 4
push eax
push edx
mov byte [esp + 0x47c], bl
call fcn.004199d8
push eax
lea ecx, [esi + 0x10]
mov byte [esp + 0x474], 5
call fcn.004198e0
lea ecx, [esp + 0x10]
mov byte [esp + 0x470], bl
call fcn.004197e7
lea ecx, [esp + 0x30]
mov byte [esp + 0x470], 3
call fcn.004197e7
lea eax, [esi + 0xc]
mov ecx, edi
push eax
mov dword [esi + 0x24], 1
mov dword [esi + 0x2c], ebp
mov dword [esi + 0x30], ebp
call fcn.0040a5e0
lea ecx, [esp + 0x14]
call fcn.0041969c
push str.SYSTEMCurrentControlSetServicesPCMCIADataBase_
lea ecx, [esp + 0x18]
mov byte [esp + 0x474], 6
call fcn.0041992f
lea ecx, [esp + 0x20]
push 0x42e650
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.00419a3e
push eax
lea ecx, [esp + 0x18]
mov byte [esp + 0x474], 7
call fcn.00419bac
lea ecx, [esp + 0x10]
mov byte [esp + 0x470], 6
call fcn.004197e7
lea eax, [esp + 0x24]
lea ecx, [esp + 0x14]
push eax
call fcn.00419bac
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x38]
push ecx
push 1
push ebp
mov ebx, 0x100
push edx
push 0x80000002
mov dword [esp + 0x40], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4069b3
mov edx, dword [esp + 0x38]
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x68]
push eax
push ecx
push ebp
push ebp
push str.DeviceType
push edx
mov dword [esp + 0x44], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4068e6
lea eax, [esp + 0x68]
lea ecx, [esp + 0x10]
push eax
call fcn.00419855
lea ebx, [esi + 0x14]
push eax
mov ecx, ebx
mov byte [esp + 0x474], 8
call fcn.004198e0
lea ecx, [esp + 0x10]
mov byte [esp + 0x470], 6
call fcn.004197e7
jmp 0x4068f0
lea ebx, [esi + 0x14]
mov ecx, ebx
call fcn.00419772
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x2c]
lea edx, [esp + 0x68]
push ecx
push edx
push ebp
push ebp
push str.Driver
push eax
mov dword [esp + 0x44], 0x100
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40694a
lea ecx, [esp + 0x68]
push ecx
lea ecx, [esp + 0x14]
call fcn.00419855
push eax
lea ecx, [esi + 0x34]
mov byte [esp + 0x474], 9
call fcn.004198e0
lea ecx, [esp + 0x10]
mov byte [esp + 0x470], 6
call fcn.004197e7
jmp 0x406952
lea ecx, [esi + 0x34]
call fcn.00419772
mov eax, dword [ebx]
mov esi, 0x42e728
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x406981
test cl, cl
je 0x40697d
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x406981
add eax, 2
add esi, 2
test cl, cl
jne 0x406959
xor eax, eax
jmp 0x406986
sbb eax, eax
sbb eax, 0xffffffff
xor ecx, ecx
test eax, eax
sete cl
test cl, cl
je 0x4069a2
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx + 8]
or al, 1
mov dword [ecx + 8], eax
call fcn.00406d80
mov edx, dword [esp + 0x38]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x28]
xor ebp, ebp
lea ecx, [esp + 0x1c]
mov dword [esi + 0x4e0], ebp
call fcn.0040ac50
mov eax, dword [esi + 0x24]
mov byte [esp + 0x470], 0xa
cmp eax, ebp
je 0x4069ec
mov ecx, dword [esp + 0x34]
lea eax, [esi + 0x4e4]
push eax
push ecx
lea ecx, [esp + 0x24]
call fcn.0040ad50
mov dword [esi + 0x4e0], eax
cmp dword [esi + 0x4e0], ebp
je 0x406a06
mov dx, 1
cmp dx, word [esi + 0x540]
sbb eax, eax
neg eax
mov dword [esi + 0x30], eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x470], 6
call fcn.0040ac80
mov eax, 0x100
mov ecx, edi
mov dword [esp + 0x4c], 0
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
call fcn.0040a710
cmp al, 2
jne 0x406d0b
mov ebx, dword [esi + 8]
push str.HARDWARERESOURCEMAPLOADED_SERIAL_DRIVER_RESOURCESSerial
or ebx, 2
lea ecx, [esp + 0x18]
mov dword [esi + 8], ebx
call fcn.0041992f
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
push 0x20019
push 0
push edx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406d0b
mov bl, 0xc
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x168]
mov eax, ecx
inc ecx
mov dword [esp + 0x4c], ecx
lea ecx, [esp + 0x30]
push ecx
push edx
push 0
lea ecx, [esp + 0x40]
push 0
lea edx, [esp + 0x278]
push ecx
push edx
push eax
mov eax, dword [esp + 0x2c]
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
test eax, eax
jne 0x406d00
lea ecx, [esp + 0x268]
push ecx
lea ecx, [esp + 0x1c]
call fcn.00419855
lea ecx, [esp + 0x18]
mov byte [esp + 0x470], 0xb
call fcn.00419c7c
push str..RAW
lea ecx, [esp + 0x1c]
call fcn.00417af0
cmp eax, 0xffffffff
je 0x406cda
movzx ax, byte [esp + 0x181]
movzx dx, byte [esp + 0x180]
shl eax, 8
or eax, edx
mov dword [esp + 0x3c], 0
test ebp, ebp
mov dword [esp + 0x64], eax
jne 0x406cda
lea ecx, [esi + 0x542]
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x3c]
xor edx, edx
mov dx, word [esi + 0x540]
cmp ecx, edx
jge 0x406cda
mov edx, dword [esp + 0x1c]
xor ecx, ecx
cmp word [edx], ax
sete cl
mov ebp, ecx
test ebp, ebp
je 0x406cbe
mov edi, 0x100
lea ecx, [esp + 0x40]
mov dword [esp + 0x48], edi
call fcn.0041969c
push str.HARDWAREDEVICEMAPSERIALCOMM
lea ecx, [esp + 0x18]
mov byte [esp + 0x474], bl
call fcn.0041992f
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x54]
push eax
push 0x20019
push 0
push ecx
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406ca9
push str..RAW
lea ecx, [esp + 0x1c]
call fcn.00417af0
lea edx, [esp + 0x60]
push eax
push edx
lea ecx, [esp + 0x20]
call fcn.00417a58
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x474], 0xd
call fcn.004198e0
lea ecx, [esp + 0x60]
mov byte [esp + 0x470], bl
call fcn.004197e7
mov eax, dword [esp + 0x18]
push 0x5c
lea ecx, [esp + 0x1c]
mov esi, dword [eax - 8]
call fcn.00417acf
sub esi, eax
lea ecx, [esp + 0x5c]
dec esi
push esi
push ecx
lea ecx, [esp + 0x20]
call fcn.004179db
push eax
lea ecx, [esp + 0x44]
mov byte [esp + 0x474], 0xe
call fcn.004198e0
lea ecx, [esp + 0x5c]
mov byte [esp + 0x470], bl
call fcn.004197e7
mov ecx, dword [esp + 0x40]
lea edx, [esp + 0x48]
lea eax, [esp + 0x368]
push edx
mov edx, dword [esp + 0x58]
push eax
push 0
push 0
push ecx
push edx
mov dword [esp + 0x60], edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406c8e
call fcn.00419696
mov eax, dword [eax]
lea ecx, [esp + 0x368]
push ecx
lea ecx, [esp + 0x48]
mov dword [esp + 0x48], eax
call fcn.0041992f
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x44]
push edx
mov byte [esp + 0x474], 0xf
lea ecx, [eax + 0x40]
call fcn.004198e0
lea ecx, [esp + 0x44]
mov byte [esp + 0x470], bl
call fcn.004197e7
jmp 0x406c9a
mov ecx, dword [esp + 0x28]
add ecx, 0x40
call fcn.00419772
mov edx, dword [esp + 0x54]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [esp + 0x28]
lea ecx, [esp + 0x40]
mov byte [esp + 0x470], 0xb
call fcn.004197e7
mov eax, dword [esp + 0x64]
mov edi, dword [esp + 0x3c]
mov edx, dword [esp + 0x1c]
inc edi
add edx, 2
test ebp, ebp
mov dword [esp + 0x3c], edi
mov dword [esp + 0x1c], edx
je 0x406b23
mov eax, 0x100
lea ecx, [esp + 0x18]
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], eax
mov byte [esp + 0x470], 6
call fcn.004197e7
test ebp, ebp
je 0x406a78
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0x14]
mov byte [esp + 0x470], 3
call fcn.004197e7
lea ecx, [esp + 0x24]
mov byte [esp + 0x470], 2
call fcn.004197e7
lea ecx, [esp + 0x20]
mov byte [esp + 0x470], 1
call fcn.004197e7
lea ecx, [esp + 0x50]
mov byte [esp + 0x470], 0
call fcn.004197e7
lea ecx, [esp + 0x58]
mov dword [esp + 0x470], 0xffffffff
call fcn.004197e7
pop ebx
mov ecx, dword [esp + 0x464]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x464
ret 4