Function at 0x10022540
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x101b3318
mov eax, dword fs:[0]
push eax
sub esp, 0x108
mov eax, dword [0x10229fec]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0xf0]
mov dword [ebp - 0x100], 0x80
push eax
push 1
push 0
push str.HARDWAREDEVICEMAPSERIALCOMM
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
or ebx, 0xffffffff
test eax, eax
jne 0x10022872
push str.Device_sscdmdm
lea ecx, [ebp - 0xe4]
mov dword [ebp - 0xf8], 0x258
mov dword [ebp - 0xf4], 0x20
call fcn.10017cd0
push str.Device_ssaemdm
lea ecx, [ebp - 0xe0]
mov dword [ebp - 4], 0
call fcn.10017cd0
push str.Device_ssadmdm
lea ecx, [ebp - 0xdc]
mov byte [ebp - 4], 1
call fcn.10017cd0
push str.Device_ssudmdm
lea ecx, [ebp - 0xd8]
mov byte [ebp - 4], 2
call fcn.10017cd0
mov ax, word [ebp - 0xf8]
mov dword [ebp - 4], 3
mov word [ebp - 0xe6], ax
nop word [eax + eax]
lea eax, [ebp - 0x10c]
push eax
call fcn.10197195
add esp, 4
lea eax, [ebp - 0xf4]
push 0
push 0
push 0
push 0
push eax
lea eax, [ebp - 0x54]
push eax
push 0
push dword [ebp - 0xf0]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov esi, eax
mov edi, 1
mov dword [ebp - 0xf8], edi
cmp esi, 0x103
je 0x100227f7
nop dword [eax]
lea eax, [ebp - 0x100]
mov dword [ebp - 0xf4], 0x20
push eax
lea eax, [ebp - 0xd4]
mov dword [ebp - 0x100], 0x80
push eax
push 0
push 0
lea eax, [ebp - 0x54]
push eax
push dword [ebp - 0xf0]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100227c2
xor edi, edi
call fcn.1004b6ac
test eax, eax
je 0x100228ca
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0xec], eax
lea eax, [ebp - 0x54]
mov byte [ebp - 4], 4
test eax, 0xffff0000
jne 0x100226f7
movzx esi, ax
push esi
call fcn.1004b877
test eax, eax
je 0x1002271f
push esi
push eax
lea ecx, [ebp - 0xec]
call fcn.10017e10
jmp 0x1002271f
lea ecx, [ebp - 0x54]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10022700
sub ecx, edx
lea eax, [ebp - 0x54]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0xec]
call fcn.10018020
mov byte [ebp - 4], 5
lea ecx, [ebp - 0xec]
mov eax, dword [ebp + edi*4 - 0xe4]
push dword [eax - 0xc]
lea eax, [ebp - 0x104]
push eax
call fcn.10021760
push eax
lea ecx, [ebp - 0xec]
mov byte [ebp - 4], 6
call fcn.10021b60
mov byte [ebp - 4], 5
mov eax, ebx
mov edx, dword [ebp - 0x104]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x10022770
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp + edi*4 - 0xe4]
test eax, eax
je 0x100228ca
mov esi, dword [ebp - 0xec]
push eax
push esi
call fcn.10195f19
add esp, 8
test eax, eax
je 0x10022892
mov byte [ebp - 4], 3
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x100227b2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
cmp edi, 4
jl 0x100226b0
mov edi, dword [ebp - 0xf8]
push 0
push 0
push 0
push 0
lea eax, [ebp - 0xf4]
push eax
lea eax, [ebp - 0x54]
push eax
push edi
push dword [ebp - 0xf0]
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov esi, eax
inc edi
mov dword [ebp - 0xf8], edi
cmp esi, 0x103
jne 0x10022670
lea eax, [ebp - 0x114]
push eax
call fcn.10197195
add esp, 4
push dword [ebp - 0x108]
push dword [ebp - 0x10c]
push dword [ebp - 0x110]
push dword [ebp - 0x114]
call fcn.101960e8
mov cx, word [ebp - 0xe6]
add esp, 0x10
fstp qword [ebp - 0xfc]
cvttsd2si eax, qword [ebp - 0xfc]
sub cx, ax
mov word [ebp - 0xe6], cx
test cx, cx
jle 0x100228d4
test esi, esi
jne 0x10022620
push fcn.10017cb0
push 4
push 4
lea eax, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.10182500
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10181d22
mov esp, ebp
pop ebp
ret 4
push dword [ebp - 0xf0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0xce]
push eax
call fcn.101970c2
add esp, 4
mov byte [ebp - 4], 3
mov edi, eax
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x100228e2
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x100228e2
push 0x80004005
call fcn.100170b0
push dword [ebp - 0xf0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edi, edi
push fcn.10017cb0
push 4
push 4
lea eax, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
push eax
call fcn.10182500
mov eax, edi
jmp 0x10022874