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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x44255d
mov eax, dword fs:[0]
push eax
sub esp, 0x270
mov eax, dword [0x454714]
xor eax, esp
mov dword [esp + 0x268], eax
push ebx
push esi
push edi
mov eax, dword [0x454714]
xor eax, esp
push eax
lea eax, [esp + 0x280]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
lea ecx, [esp + 0x20]
push ecx
push 1
xor esi, esi
push esi
push str.HARDWAREDEVICEMAPSERIALCOMM
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x3c], eax
mov dword [esp + 0x48], 0x80
mov dword [esp + 0x50], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, esi
jne 0x406735
push str.Device_sscdmdm
lea ecx, [esp + 0x48]
mov dword [esp + 0x34], 0x20
call fcn.00402210
push str.Device_ssaemdm
lea ecx, [esp + 0x4c]
mov dword [esp + 0x28c], esi
call fcn.00402210
push str.Device_ssadmdm
lea ecx, [esp + 0x50]
mov byte [esp + 0x28c], 1
call fcn.00402210
push str.Device_ssudmdm
lea ecx, [esp + 0x54]
mov byte [esp + 0x28c], 2
call fcn.00402210
lea edx, [esp + 0x74]
push edx
mov dword [esp + 0x28c], 3
call fcn.0042d131
mov edx, dword [esp + 0x24]
add esp, 4
push esi
push esi
push esi
push esi
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x1c8]
push ecx
push esi
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
mov dword [esp + 0x38], 1
cmp eax, 0x103
je 0x40667f
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x1f8]
push ecx
push 0
push 0
lea edx, [esp + 0x1c4]
push edx
push eax
mov dword [esp + 0x48], 0x20
mov dword [esp + 0x4c], 0x80
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40664a
mov esi, dword [esp + 0x28]
mov byte [esp + 0x17], al
mov dword [esp + 0x24], eax
cmp byte [esp + 0x17], 1
je 0x40664a
lea ecx, [esp + 0x1b4]
push ecx
lea ecx, [esp + 0x20]
call fcn.00402210
mov edx, dword [esp + 0x24]
mov byte [esp + 0x288], 4
mov eax, dword [esp + edx*4 + 0x44]
mov eax, dword [eax - 0xc]
push eax
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x24]
call fcn.00405250
mov byte [esp + 0x288], 5
mov eax, dword [eax]
mov ebx, dword [esp + 0x1c]
lea edi, [eax - 0x10]
add ebx, 0xfffffff0
cmp edi, ebx
je 0x40631a
cmp dword [ebx + 0xc], 0
jl 0x40630c
mov ecx, dword [edi]
cmp ecx, dword [ebx]
jne 0x40630c
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [edi + 0xc], 0
lea ecx, [edi + 0xc]
jl 0x4062ab
cmp eax, dword [edi]
jne 0x4062ab
mov esi, edi
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x4062e6
mov ecx, dword [edi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov esi, eax
test esi, esi
je 0x4066d7
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov eax, dword [edi + 4]
lea ecx, [eax + eax + 2]
push ecx
add edi, 0x10
lea edx, [eax + eax + 2]
push edi
push edx
lea eax, [esi + 0x10]
push eax
call fcn.0042c69e
add esp, 0x10
lea eax, [ebx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x4062ff
mov ecx, dword [ebx]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push ebx
call eax
add esi, 0x10
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x28]
jmp 0x40631a
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x24]
call fcn.004020c0
mov byte [esp + 0x288], 4
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406342
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + ecx*4 + 0x44]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x4066dc
mov edx, dword [esp + 0x1c]
push eax
push edx
call fcn.0042ceac
add esp, 8
test eax, eax
jne 0x406610
lea eax, [esp + 0x1fa]
push eax
mov byte [esp + 0x1b], 1
call fcn.0042cc5b
mov ecx, dword [esi + 0x10]
mov edi, dword [esi + 0xc]
mov dword [esp + 0x30], eax
mov eax, ecx
sub eax, edi
sar eax, 2
add esp, 4
mov dword [esp + 0x18], 0
test eax, eax
jle 0x406610
cmp eax, dword [esp + 0x18]
jbe 0x4066e6
cmp edi, ecx
jbe 0x4063b8
call fcn.0042d322
mov ebx, dword [esi]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], edi
test ebx, ebx
jne 0x4063e1
call fcn.0042d322
xor eax, eax
mov ecx, dword [esp + 0x18]
lea edi, [edi + ecx*4]
cmp edi, dword [eax + 0x10]
ja 0x4063ec
test ebx, ebx
je 0x4063e5
mov ebx, dword [ebx]
jmp 0x4063e7
mov eax, dword [ebx]
jmp 0x4063cd
xor ebx, ebx
cmp edi, dword [ebx + 0xc]
jae 0x4063f1
call fcn.0042d322
mov eax, dword [esp + 0x54]
test eax, eax
jne 0x40645c
call fcn.0042d322
xor eax, eax
cmp edi, dword [eax + 0x10]
jb 0x40640a
call fcn.0042d322
cmp dword [edi], 0xffffffff
mov eax, dword [esi + 0x10]
mov ebx, dword [esi + 0xc]
je 0x4064bc
mov edx, eax
sub edx, ebx
sar edx, 2
cmp edx, dword [esp + 0x18]
jbe 0x4066e6
cmp ebx, eax
jbe 0x406433
call fcn.0042d322
mov edi, dword [esi]
mov dword [esp + 0x64], edi
mov dword [esp + 0x68], ebx
test edi, edi
jne 0x406460
call fcn.0042d322
xor eax, eax
mov ecx, dword [esp + 0x18]
lea ebx, [ebx + ecx*4]
cmp ebx, dword [eax + 0x10]
ja 0x40646b
test edi, edi
je 0x406464
mov edi, dword [edi]
jmp 0x406466
mov eax, dword [eax]
jmp 0x406400
mov eax, dword [edi]
jmp 0x406448
xor edi, edi
cmp ebx, dword [edi + 0xc]
jae 0x406470
call fcn.0042d322
mov eax, dword [esp + 0x64]
test eax, eax
jne 0x4064b8
call fcn.0042d322
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x406489
call fcn.0042d322
mov edx, dword [esp + 0x2c]
cmp dword [ebx], edx
je 0x4066eb
mov ecx, dword [esi + 0x10]
mov edi, dword [esi + 0xc]
mov edx, dword [esp + 0x18]
mov eax, ecx
sub eax, edi
inc edx
sar eax, 2
cmp edx, eax
mov dword [esp + 0x18], edx
jl 0x4063a5
jmp 0x406610
mov eax, dword [eax]
jmp 0x40647f
mov ecx, eax
sub ecx, ebx
sar ecx, 2
cmp ecx, dword [esp + 0x18]
jbe 0x4066e6
cmp ebx, eax
jbe 0x4064d6
call fcn.0042d322
mov edi, dword [esi]
mov esi, edi
mov dword [esp + 0x94], ebx
test edi, edi
jne 0x406500
call fcn.0042d322
xor eax, eax
mov edx, dword [esp + 0x18]
lea ebx, [ebx + edx*4]
cmp ebx, dword [eax + 0x10]
ja 0x40650b
test edi, edi
je 0x406504
mov edi, dword [edi]
jmp 0x406506
mov eax, dword [edi]
jmp 0x4064ec
xor edi, edi
cmp ebx, dword [edi + 0xc]
jae 0x406510
call fcn.0042d322
test esi, esi
jne 0x4065bc
call fcn.0042d322
xor eax, eax
cmp ebx, dword [eax + 0x10]
jb 0x406529
call fcn.0042d322
mov eax, dword [esp + 0x2c]
mov dword [ebx], eax
mov ebx, dword [esp + 0x28]
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x8c]
add ebx, 0x48
push edx
mov edi, ebx
call fcn.004070c0
mov edi, dword [eax]
mov esi, dword [eax + 4]
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x84], eax
mov eax, dword [ebx]
test edi, edi
je 0x406563
cmp edi, eax
je 0x406568
call fcn.0042d322
cmp esi, dword [esp + 0x84]
je 0x406581
push esi
push edi
lea ecx, [esp + 0xa0]
push ecx
push ebx
call fcn.00406df0
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x2c]
lea eax, [esp + 0x6c]
push eax
lea edi, [esp + 0xa4]
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], edx
call fcn.00406d00
call fcn.00411a62
test eax, eax
je 0x4065b8
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x74]
call eax
test eax, eax
jne 0x4065c3
xor edi, edi
jmp 0x4065c6
mov eax, dword [esi]
jmp 0x40651f
mov edi, dword [eax + 0x20]
push 0x449fbc
lea ecx, [esp + 0xb4]
push 0x80
push ecx
mov dword [esp + 0xb8], esi
mov dword [esp + 0x1bc], 0x64
call fcn.0042cca5
add esp, 0xc
push 0
lea edx, [esp + 0xb0]
push edx
push 0xfbd
push edi
call dword [sym.imp.USER32.dll_SendMessageW]
inc dword [esp + 0x3c]
mov esi, dword [esp + 0x28]
mov byte [esp + 0x288], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406638
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x24]
inc eax
cmp eax, 4
mov dword [esp + 0x24], eax
jl 0x40621c
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x20]
push 0
push 0
push 0
push 0
lea ecx, [esp + 0x40]
push ecx
lea edx, [esp + 0x1c8]
push edx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegEnumValueW]
inc esi
mov dword [esp + 0x38], esi
cmp eax, 0x103
jne 0x4061d4
lea ecx, [esp + 0x5c]
push ecx
call fcn.0042d131
mov edx, dword [esp + 0x7c]
mov eax, dword [esp + 0x78]
mov ecx, dword [esp + 0x64]
add esp, 4
push edx
mov edx, dword [esp + 0x60]
push eax
push ecx
push edx
call fcn.0042d182
fstp st(0)
mov edx, dword [esp + 0x30]
add esp, 0x10
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push fcn.004022d0
push 4
push 4
lea eax, [esp + 0x50]
push eax
mov dword [esp + 0x298], 0xffffffff
call fcn.0042d0ce
xor eax, eax
jmp 0x406738
call fcn.00401fa0
push 0x80004005
call fcn.004022f0
call fcn.00407660
mov byte [esp + 0x288], 3
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406713
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push fcn.004022d0
push 4
push 4
lea ecx, [esp + 0x50]
push ecx
mov dword [esp + 0x298], 0xffffffff
call fcn.0042d0ce
xor eax, eax
jmp 0x406738
or eax, 0xffffffff
mov ecx, dword [esp + 0x280]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x268]
xor ecx, esp
call fcn.0042c68f
mov esp, ebp
pop ebp
ret 4