Function at 0x42c2ca
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x64
push ebx
push ebp
push esi
mov esi, dword [esp + 0x80]
push edi
mov eax, dword [esi]
lea ecx, [eax*4 + 4]
push ecx
call fcn.0042d3e6
mov edx, dword [esp + 0x84]
mov edi, eax
add esp, 4
mov dword [edx], edi
mov eax, dword [esi]
lea ecx, [eax*4 + 4]
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [0x4590d6]
test eax, eax
je 0x42c320
mov eax, dword [0x4590d2]
test eax, eax
jne 0x42c34d
push str.SETUPAPI.DLL
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
mov esi, eax
push str.SetupDiEnumDeviceInterfaces
push esi
call edi
push str.SetupDiGetDeviceInterfaceDetailA
push esi
mov dword [0x4590d6], eax
call edi
mov dword [0x4590d2], eax
mov eax, dword [esp + 0x78]
push 0x12
push 0
push 0
push eax
call dword [sym.imp.setupapi.dll_SetupDiGetClassDevsA]
xor ebx, ebx
xor esi, esi
mov ebp, eax
mov dword [esp + 0x3c], 0x1c
mov dword [esp + 0x14], esi
jmp 0x42c376
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x78]
lea ecx, [esp + 0x3c]
push ecx
push esi
push edx
push 0
push ebp
call dword [0x4590d6]
test eax, eax
je 0x42c5f6
mov eax, dword [esp + 0x7c]
test eax, eax
je 0x42c482
lea eax, [esp + 0x20]
mov dword [esp + 0x10], 0
push eax
push esi
push ebp
mov dword [esp + 0x2c], 0x1c
call dword [sym.imp.setupapi.dll_SetupDiEnumDeviceInfo]
mov edi, dword [sym.imp.kernel32.dll_LocalAlloc]
push 0x400
push 0x40
call edi
lea ecx, [esp + 0x10]
mov esi, eax
push ecx
push 0x400
lea edx, [esp + 0x24]
push esi
push edx
lea eax, [esp + 0x30]
push 1
push eax
mov byte [esi], 0
push ebp
mov dword [esp + 0x2c], 0x400
call dword [sym.imp.setupapi.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
jne 0x42c447
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0xd
je 0x42c447
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x42c447
test esi, esi
je 0x42c41a
push esi
call dword [sym.imp.kernel32.dll_LocalFree]
mov ecx, dword [esp + 0x10]
push ecx
push 0x40
call edi
mov esi, eax
mov eax, dword [esp + 0x10]
lea edx, [esp + 0x10]
lea ecx, [esp + 0x1c]
push edx
push eax
push esi
push ecx
lea edx, [esp + 0x30]
push 1
push edx
push ebp
call dword [sym.imp.setupapi.dll_SetupDiGetDeviceRegistryPropertyA]
test eax, eax
je 0x42c3f9
test esi, esi
je 0x42c55e
mov edi, dword [esp + 0x7c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [esp + 0x7c]
not ecx
dec ecx
push ecx
push esi
push eax
call fcn.00433271
add esp, 0xc
test eax, eax
push esi
je 0x42c47c
call dword [sym.imp.kernel32.dll_LocalFree]
jmp 0x42c55e
call dword [sym.imp.kernel32.dll_LocalFree]
lea ecx, [esp + 0x18]
push 0
push ecx
push 0
lea edx, [esp + 0x48]
push 0
push edx
push ebp
call dword [0x4590d2]
mov eax, dword [esp + 0x18]
push eax
mov esi, eax
call fcn.0042d3e6
mov edi, dword [esp + 0x84]
add esp, 4
mov ecx, dword [edi]
mov dword [ecx + ebx*4], eax
mov edx, dword [edi]
mov eax, dword [edx + ebx*4]
test eax, eax
je 0x42c5a4
mov dword [eax], 5
mov edx, dword [edi]
lea eax, [esp + 0x58]
lea ecx, [esp + 0x18]
mov dword [esp + 0x58], 0x1c
push eax
mov eax, dword [edx + ebx*4]
push ecx
push esi
lea ecx, [esp + 0x48]
push eax
push ecx
push ebp
call dword [0x4590d2]
test eax, eax
je 0x42c58d
mov esi, dword [esp + 0x78]
mov ecx, 4
mov edi, 0x456336
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x42c51f
lea eax, [esp + 0x58]
push eax
push ebp
call fcn.0042c2aa
mov esi, dword [esp + 0x88]
add esp, 8
jmp 0x42c537
mov esi, dword [esp + 0x80]
mov ecx, dword [esi]
mov edx, dword [ecx + ebx*4]
add edx, 4
push edx
call fcn.0042c20a
add esp, 4
test eax, eax
je 0x42c5d6
cmp eax, 1
jne 0x42c55d
mov eax, dword [esi]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.0042d758
mov edx, dword [esi]
add esp, 4
mov dword [edx + ebx*4], 0
jmp 0x42c55e
inc ebx
mov eax, dword [esp + 0x14]
inc eax
cmp eax, 0x7f
mov dword [esp + 0x14], eax
jb 0x42c372
mov edx, dword [esp + 0x84]
push ebp
mov dword [edx], ebx
call dword [sym.imp.setupapi.dll_SetupDiDestroyDeviceInfoList]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret
mov eax, dword [edi]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.0042d758
mov edx, dword [edi]
add esp, 4
mov dword [edx + ebx*4], 0
mov eax, dword [edi]
push eax
call fcn.0042c888
mov ecx, dword [esp + 0x88]
add esp, 4
mov dword [edi], 0
push ebp
mov dword [ecx], 0
call dword [sym.imp.setupapi.dll_SetupDiDestroyDeviceInfoList]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x64
ret
mov eax, dword [esi]
mov ecx, dword [eax + ebx*4]
push ecx
call fcn.0042d758
mov edx, dword [esi]
mov edi, dword [esp + 0x84]
add esp, 4
mov dword [edx + ebx*4], 0
jmp 0x42c5a4
call dword [sym.imp.kernel32.dll_GetLastError]
jmp 0x42c570