Function at 0x40df80
Capabilities:
Query or enumerate registry value
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44ac96
mov eax, dword fs:[0]
push eax
sub esp, 0xae0
mov eax, dword [0x45dd50]
xor eax, esp
mov dword [esp + 0xad8], eax
push ebx
push esi
push edi
mov eax, dword [0x45dd50]
xor eax, esp
push eax
lea eax, [esp + 0xaf0]
mov dword fs:[0], eax
mov edi, ecx
mov ebx, dword [edi + 0x14]
lea esi, [edi + 4]
mov dword [esp + 0x1c], esi
cmp dword [esi + 0xc], ebx
jbe 0x40dfd6
call fcn.0042f0b7
mov eax, dword [esi]
mov esi, dword [esi + 0xc]
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x24], eax
cmp esi, dword [ecx + 0x10]
jbe 0x40dff1
call fcn.0042f0b7
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov eax, dword [ecx]
push ebx
push edx
push esi
push eax
lea eax, [esp + 0x34]
push eax
push ecx
call fcn.0040e640
push 0x1fe
xor esi, esi
lea edx, [esp + 0xea]
xor ecx, ecx
push esi
push edx
mov word [esp + 0xf0], cx
call fcn.00431a80
mov edx, dword [edi + 0x1c]
add esp, 0xc
push edx
mov eax, 0xe325
push esi
mov word [esp + 0x38], ax
push esi
lea eax, [esp + 0x38]
mov ecx, 0x11ce
push eax
mov dword [esp + 0x3c], 0x4d36e978
mov word [esp + 0x42], cx
mov byte [esp + 0x44], 0xbf
mov byte [esp + 0x45], 0xc1
mov byte [esp + 0x46], 8
mov byte [esp + 0x47], 0
mov byte [esp + 0x48], 0x2b
mov byte [esp + 0x49], 0xe1
mov byte [esp + 0x4a], 3
mov byte [esp + 0x4b], 0x18
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
je 0x40e44e
lea ecx, [esp + 0x58]
push ecx
push esi
mov ebx, 0x1c
push edi
mov dword [esp + 0x64], ebx
mov dword [esp + 0x30], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x40e447
jmp 0x40e0b5
xor esi, esi
lea ebx, [esi + 0x1c]
mov eax, 7
mov dword [esp + 0x8c], eax
xor edx, edx
mov dword [esp + 0xa8], eax
mov dword [esp + 0xc4], eax
mov dword [esp + 0xe0], eax
xor ecx, ecx
xor eax, eax
mov dword [esp + 0x88], esi
mov word [esp + 0x78], dx
mov dword [esp + 0xa4], esi
mov word [esp + 0x94], cx
mov dword [esp + 0xc0], esi
mov word [esp + 0xb0], dx
mov dword [esp + 0xdc], esi
mov word [esp + 0xcc], ax
push 0x200
lea ecx, [esp + 0xe8]
push esi
push ecx
mov dword [esp + 0xb04], esi
call fcn.00431a80
add esp, 0xc
push esi
push 0x100
lea edx, [esp + 0xec]
push edx
lea eax, [esp + 0x64]
push eax
push edi
mov dword [esp + 0x6c], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x40e184
lea eax, [esp + 0xe4]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x40e160
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0xe8]
push ecx
lea ecx, [esp + 0xd0]
call fcn.00402450
push 0x200
lea edx, [esp + 0xe8]
push esi
push edx
call fcn.00431a80
add esp, 0xc
push esi
push 0x200
lea eax, [esp + 0xec]
push eax
push esi
push 1
lea ecx, [esp + 0x6c]
push ecx
push edi
mov dword [esp + 0x74], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceRegistryPropertyW]
test eax, eax
je 0x40e1f4
lea eax, [esp + 0xe4]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, si
jne 0x40e1d0
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0xe8]
push edx
lea ecx, [esp + 0xb4]
call fcn.00402450
push 0x20019
push 1
push esi
push 1
lea eax, [esp + 0x68]
push eax
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDevRegKey]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40e3ec
xor ecx, ecx
push 0x3fe
push ecx
lea edx, [esp + 0x2ee]
push edx
mov word [esp + 0x2f0], cx
call fcn.00431a80
add esp, 0xc
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x6ee]
push ecx
mov word [esp + 0x6f0], ax
call fcn.00431a80
add esp, 0xc
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x6e8]
push eax
push 0
push 0
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x2f8]
push edx
push 0
push ebx
mov dword [esp + 0x40], 0x200
mov dword [esp + 0x38], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
jne 0x40e3e3
xor eax, eax
mov word [esp + 0x40], ax
lea eax, [esp + 0x2e4]
mov dword [esp + 0x54], 7
mov dword [esp + 0x50], 0
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e2b5
sub eax, edx
sar eax, 1
push eax
lea ecx, [esp + 0x2e8]
push ecx
lea ecx, [esp + 0x44]
call fcn.00402450
mov byte [esp + 0xaf8], 1
mov eax, dword [esp + 0x50]
push str.PortName
mov edi, 8
lea ecx, [esp + 0x40]
call fcn.0040ec30
test eax, eax
je 0x40e399
mov byte [esp + 0xaf8], 0
cmp dword [esp + 0x54], edi
jb 0x40e318
mov edx, dword [esp + 0x40]
push edx
call fcn.0042123b
add esp, 4
xor eax, eax
push 0x3fe
push eax
lea ecx, [esp + 0x2ee]
push ecx
inc esi
mov word [esp + 0x2f0], ax
call fcn.00431a80
add esp, 0xc
xor edx, edx
push 0x3fe
push edx
lea eax, [esp + 0x6ee]
push eax
mov word [esp + 0x6f0], dx
call fcn.00431a80
add esp, 0xc
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x6e8]
push edx
push 0
push 0
lea eax, [esp + 0x30]
push eax
lea ecx, [esp + 0x2f8]
push ecx
push esi
push ebx
mov dword [esp + 0x40], 0x200
mov dword [esp + 0x38], 0x400
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
test eax, eax
je 0x40e294
jmp 0x40e3df
lea eax, [esp + 0x6e4]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40e3a3
sub eax, edx
sar eax, 1
push eax
lea edx, [esp + 0x6e8]
push edx
lea ecx, [esp + 0x7c]
call fcn.00402450
mov byte [esp + 0xaf8], 0
cmp dword [esp + 0x54], edi
jb 0x40e3df
mov eax, dword [esp + 0x40]
push eax
call fcn.0042123b
add esp, 4
mov edi, dword [esp + 0x14]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor esi, esi
cmp dword [esp + 0x88], esi
je 0x40e415
cmp dword [esp + 0xc0], esi
je 0x40e415
cmp dword [esp + 0xdc], esi
je 0x40e415
mov ebx, dword [esp + 0x1c]
lea ecx, [esp + 0x74]
push ecx
call fcn.0040e4d0
lea esi, [esp + 0x74]
mov dword [esp + 0xaf8], 0xffffffff
call fcn.0040def0
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x58]
inc eax
push edx
push eax
push edi
mov dword [esp + 0x30], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x40e0b0
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0xaf0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xad8]
xor ecx, esp
call fcn.0042eb3c
mov esp, ebp
pop ebp
ret