Function at 0x402080
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55231b
mov eax, dword fs:[0]
push eax
sub esp, 0x454
mov eax, dword [0x5aa0d0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x448], ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetupDiGetClassDevsW
push dword [ebx + 0x9d8]
mov dword [ebp - 0x450], 0
call esi
push str.SetupDiEnumDeviceInfo
push dword [ebx + 0x9d8]
mov edi, eax
call esi
push str.SetupDiGetDeviceInstanceIdW
push dword [ebx + 0x9d8]
mov dword [ebp - 0x45c], eax
call esi
push str.SetupDiDestroyDeviceInfoList
push dword [ebx + 0x9d8]
mov dword [ebp - 0x458], eax
call esi
push str.SetupDiGetDeviceRegistryPropertyW
push dword [ebx + 0x9d8]
mov dword [ebp - 0x454], eax
call esi
push 0x208
mov dword [ebp - 0x460], eax
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0052c260
add esp, 0xc
push 6
push 0
push 0
push 0
call edi
push 0
push 0
push 0x14b
push dword [ebx + 0x8f0]
mov edi, eax
mov byte [ebx + 0x9d7], 0
call dword [sym.imp.USER32.dll_SendMessageW]
cmp edi, 0xffffffff
jne 0x40216f
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4023e4
lea eax, [ebp - 0x43c]
push eax
push 0
push edi
mov dword [ebp - 0x43c], 0x1c
mov dword [ebp - 0x44c], 0
call dword [ebp - 0x45c]
test eax, eax
je 0x4023c8
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x440]
push eax
xor esi, esi
push esi
push esi
lea eax, [ebp - 0x43c]
push eax
push edi
mov dword [ebp - 0x440], esi
call dword [ebp - 0x458]
test eax, eax
jne 0x40239e
test esi, esi
je 0x4021d3
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
call ebx
cmp eax, 0x7a
jne 0x402409
mov eax, dword [ebp - 0x440]
add eax, eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
lea eax, [ebp - 0x440]
push eax
push dword [ebp - 0x440]
lea eax, [ebp - 0x43c]
push esi
push eax
push edi
call dword [ebp - 0x458]
test eax, eax
je 0x4021c8
test esi, esi
je 0x40239e
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0052c260
add esp, 0xc
lea eax, [ebp - 0x218]
push 0
push 0x207
push eax
push 0
push 0xc
lea eax, [ebp - 0x43c]
push eax
push edi
call dword [ebp - 0x460]
test eax, eax
je 0x40239e
mov eax, dword [ebp - 0x450]
test eax, eax
jne 0x402400
lea eax, [ebp - 0x218]
push str._COM
push eax
call fcn.00529855
mov esi, eax
add esp, 8
test esi, esi
je 0x40239e
movzx ecx, word [esi + 0xa]
push ecx
call fcn.00529c1a
add esp, 4
test eax, eax
jne 0x4022a0
mov bl, byte [esi + 8]
mov word [esi + 0xa], ax
sub bl, 0x30
jmp 0x4022f0
movzx eax, word [esi + 0xc]
push eax
call fcn.00529c1a
mov bl, byte [esi + 8]
add esp, 4
sub bl, 0x30
test eax, eax
jne 0x4022cc
mov word [esi + 0xc], ax
mov al, bl
shl al, 2
add bl, al
add bl, bl
sub bl, 0x30
add bl, byte [esi + 0xa]
jmp 0x4022f0
xor eax, eax
mov word [esi + 0xe], ax
mov al, bl
shl al, 2
add bl, al
add bl, bl
sub bl, 0x30
add bl, byte [esi + 0xa]
mov al, bl
shl al, 2
add bl, al
add bl, bl
sub bl, 0x30
add bl, byte [esi + 0xc]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x444]
mov dword [ebp - 0x444], 0
call fcn.00404e40
push 0x586938
lea ecx, [ebp - 0x444]
mov dword [ebp - 4], 0
call fcn.00404a20
push dword [ebp - 0x444]
mov eax, dword [ebp - 0x448]
push 0
push 0x143
push dword [eax + 0x8f0]
call dword [sym.imp.USER32.dll_SendMessageW]
mov ecx, dword [ebp - 0x448]
push esi
movzx eax, byte [ecx + 0x9d7]
push 0x104
mov byte [eax + ecx + 0x9c3], bl
inc byte [ecx + 0x9d7]
lea eax, [ebp - 0x420]
push eax
call fcn.00529c91
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x444]
add edx, 0xfffffff0
add esp, 0xc
lea eax, [edx + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x402398
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x44c]
lea ecx, [ebp - 0x43c]
inc eax
push ecx
push eax
push edi
mov dword [ebp - 0x44c], eax
call dword [ebp - 0x45c]
test eax, eax
jne 0x4021a1
mov ebx, dword [ebp - 0x448]
push 0
push 0
push 0x14e
push dword [ebx + 0x8f0]
call dword [sym.imp.USER32.dll_SendMessageW]
push edi
call dword [ebp - 0x454]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005290f9
mov esp, ebp
pop ebp
ret
dec eax
mov dword [ebp - 0x450], eax
jmp 0x40239e
push edi
call dword [ebp - 0x454]
call ebx
jmp 0x4023e4