Function at 0x40f090
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x434304]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
push edi
mov dword [ebp - 0x3f4], eax
mov eax, dword [ebp + 0x14]
push str.EnumerateDevices_Start_n_n
mov dword [ebp - 0x41c], ecx
mov dword [ebp - 0x40c], ebx
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x424], edx
mov dword [ebp - 0x420], eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor edi, edi
mov dword [ebp - 0x400], 0xffffffff
mov dword [ebp - 0x418], 2
mov dword [ebp - 0x410], edi
mov dword [ebp - 0x3f8], edi
mov dword [ebp - 0x408], edi
mov dword [ebp - 0x3fc], edi
cmp ebx, edi
jne 0x40f127
lea eax, [edi + 3]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041558a
mov esp, ebp
pop ebp
ret
xor ecx, ecx
mov eax, ebx
mov edx, 0xc
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00416e13
mov edx, eax
add esp, 4
mov dword [ebp - 0x414], edx
test edx, edx
je 0x40f5e5
test ebx, ebx
jle 0x40f1ed
mov eax, dword [esi]
cmp word [eax], 0x3d
jne 0x40f1ca
add eax, 2
cmp word [eax], di
je 0x40f1ca
mov ecx, dword [ebp - 0x3f4]
push 0
push ecx
lea edx, [ebp - 0x408]
push edx
push 1
lea ecx, [ebp - 0x1c4]
push ecx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiClassGuidsFromNameExW]
test eax, eax
jne 0x40f19d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40f5c4
mov eax, dword [ebp - 0x408]
test eax, eax
jne 0x40f1b2
mov dword [ebp - 0x418], edi
jmp 0x40f5c4
mov edx, dword [ebp - 0x414]
mov dword [ebp - 0x3fc], 1
mov edi, dword [ebp - 0x3fc]
jmp 0x40f1d0
mov eax, dword [ebp - 0x408]
cmp ebx, edi
jle 0x40f1f3
mov ecx, dword [esi + edi*4]
cmp word [ecx], 0x2a
jne 0x40f1fd
cmp word [ecx + 2], 0
jne 0x40f1fd
inc edi
mov dword [ebp - 0x3fc], edi
jmp 0x40f1f3
mov eax, dword [ebp - 0x408]
mov dword [ebp - 0x3f8], 1
mov dword [ebp - 0x404], edi
cmp edi, ebx
jge 0x40f2ba
lea eax, [edi + edi*2]
lea edi, [edx + eax*4 + 8]
jmp 0x40f226
mov esi, dword [ebp - 0x428]
mov ecx, dword [ebp - 0x404]
mov esi, dword [esi + ecx*4]
xor ebx, ebx
cmp word [esi], 0x40
mov dword [ebp - 0x434], ebx
jne 0x40f24b
push esi
mov ebx, 1
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
cmp word [esi], 0x27
jne 0x40f262
push esi
call dword [sym.imp.USER32.dll_CharNextW]
mov esi, eax
mov eax, dword [ebp - 0x434]
jmp 0x40f26d
push 0x2a
push esi
call fcn.00416032
add esp, 8
mov dword [edi - 8], esi
mov dword [edi - 4], eax
mov dword [edi], ebx
cmp dword [edi - 4], 0
jne 0x40f27f
test ebx, ebx
jne 0x40f289
mov dword [ebp - 0x410], 1
mov eax, dword [ebp - 0x404]
inc eax
add edi, 0xc
mov dword [ebp - 0x404], eax
cmp eax, dword [ebp - 0x40c]
jl 0x40f220
cmp dword [ebp - 0x410], 0
mov eax, dword [ebp - 0x408]
mov edi, dword [ebp - 0x3fc]
jne 0x40f2eb
cmp dword [ebp - 0x3f8], 0
jne 0x40f2eb
mov edx, dword [ebp - 0x3f4]
push 0
neg eax
push edx
sbb eax, eax
lea ecx, [ebp - 0x1c4]
push 0
and eax, ecx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiCreateDeviceInfoListExW]
mov ebx, eax
mov dword [ebp - 0x400], ebx
jmp 0x40f328
mov edx, dword [ebp - 0x3f4]
mov ecx, eax
neg ecx
sbb ecx, ecx
push 0
push edx
and ecx, 0xfffffffc
add ecx, 4
or ecx, dword [ebp - 0x41c]
push 0
push ecx
neg eax
push 0
sbb eax, eax
lea edx, [ebp - 0x1c4]
push 0
and eax, edx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsExW]
mov dword [ebp - 0x400], eax
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40f33d
push str.Fail_to_SetupDiGetClassDevsEx___or_SetupDiCreateDeviceInfoListEx___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x40f5c4
cmp edi, dword [ebp - 0x40c]
jge 0x40f381
mov ecx, dword [ebp - 0x414]
lea eax, [edi + edi*2]
lea esi, [ecx + eax*4]
mov eax, dword [ebp - 0x40c]
sub eax, edi
mov dword [ebp - 0x3f4], eax
nop
cmp dword [esi + 8], 0
je 0x40f376
mov edx, dword [esi]
push 0
push 0
push 0
push edx
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiOpenDeviceInfoW]
add esi, 0xc
dec dword [ebp - 0x3f4]
jne 0x40f360
lea eax, [ebp - 0x3f0]
push eax
push ebx
mov dword [ebp - 0x3f0], 0x226
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInfoListDetailW]
test eax, eax
jne 0x40f3ad
push str.Fail_to_SetupDiGetDeviceInfoListDetail___n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x40f5c4
cmp dword [ebp - 0x3f8], 0
je 0x40f3c0
mov dword [ebp - 0x410], 0
lea ecx, [ebp - 0x1b4]
push ecx
push 0
push ebx
mov dword [ebp - 0x1b4], 0x1c
mov dword [ebp - 0x3f4], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x40f5ba
lea esp, [esp]
cmp dword [ebp - 0x410], 0
je 0x40f54a
mov dword [ebp - 0x404], edi
mov dword [ebp - 0x3f8], 0
cmp edi, dword [ebp - 0x40c]
jge 0x40f596
mov eax, dword [ebp - 0x414]
lea edx, [edi + edi*2]
lea ebx, [eax + edx*4]
cmp dword [ebp - 0x3f8], 0
jne 0x40f53e
mov ecx, dword [ebp - 0x3dc]
mov eax, dword [ebp - 0x1a0]
push ecx
push 0
push 0xc8
lea edx, [ebp - 0x198]
push edx
push eax
call dword [sym.imp.SETUPAPI.dll_CM_Get_Device_ID_ExW]
test eax, eax
je 0x40f461
xor ecx, ecx
mov word [ebp - 0x198], cx
cmp dword [ebx + 8], 0
je 0x40f48b
mov eax, ebx
lea ecx, [ebp - 0x198]
call fcn.0040ecf0
test eax, eax
je 0x40f519
mov dword [ebp - 0x3f8], 1
jmp 0x40f519
mov edi, dword [ebp - 0x400]
push 1
lea edx, [ebp - 0x1b4]
push edx
push edi
call fcn.0040eb20
mov esi, eax
push 2
lea eax, [ebp - 0x1b4]
push eax
push edi
call fcn.0040eb20
push ebx
push esi
mov edi, eax
call fcn.0040ee80
add esp, 0x20
test eax, eax
jne 0x40f4cf
push ebx
push edi
call fcn.0040ee80
add esp, 8
test eax, eax
je 0x40f4d9
mov dword [ebp - 0x3f8], 1
test esi, esi
je 0x40f4f9
mov eax, dword [esi - 4]
add esi, 0xfffffffc
test eax, eax
je 0x40f4f0
push eax
call fcn.00416027
add esp, 4
push esi
call fcn.00416027
add esp, 4
test edi, edi
je 0x40f519
mov eax, dword [edi - 4]
lea esi, [edi - 4]
test eax, eax
je 0x40f510
push eax
call fcn.00416027
add esp, 4
push esi
call fcn.00416027
add esp, 4
mov eax, dword [ebp - 0x404]
inc eax
add ebx, 0xc
mov dword [ebp - 0x404], eax
cmp eax, dword [ebp - 0x40c]
jl 0x40f425
cmp dword [ebp - 0x3f8], 0
je 0x40f58a
mov edi, dword [ebp - 0x3fc]
mov ebx, dword [ebp - 0x400]
push str._match:_n_n
mov dword [0x436c84], 1
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 0x420]
mov edx, dword [ebp - 0x3f4]
push ecx
push edx
lea eax, [ebp - 0x1b4]
push eax
push ebx
call dword [ebp - 0x424]
add esp, 0x10
test eax, eax
je 0x40f596
mov dword [ebp - 0x418], eax
jmp 0x40f5c4
mov edi, dword [ebp - 0x3fc]
mov ebx, dword [ebp - 0x400]
mov eax, dword [ebp - 0x3f4]
lea ecx, [ebp - 0x1b4]
inc eax
push ecx
push eax
push ebx
mov dword [ebp - 0x3f4], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x40f3f0
mov dword [ebp - 0x418], 0
mov edx, dword [ebp - 0x414]
push edx
call fcn.00416027
mov eax, dword [ebp - 0x400]
add esp, 4
cmp eax, 0xffffffff
je 0x40f5e5
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push str.EnumerateDevices_End_n_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x418]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041558a
mov esp, ebp
pop ebp
ret