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

Disassembly:
push 0xffffffffffffffff
push 0x456eac
mov eax, dword fs:[0]
push eax
sub esp, 0x330
mov eax, dword [0x46d358]
xor eax, esp
mov dword [esp + 0x32c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x46d358]
xor eax, esp
push eax
lea eax, [esp + 0x344]
mov dword fs:[0], eax
mov edi, dword [esp + 0x354]
mov ebp, dword [esp + 0x358]
mov esi, ecx
mov eax, dword [esi]
xor ebx, ebx
cmp eax, ebx
mov dword [esp + 0x20], edi
mov dword [esp + 0x18], ebp
je 0x40ec02
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
push 0x12
push ebx
push ebx
push edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x40ec1b
xor eax, eax
jmp 0x40ef5a
lea ecx, [esp + 0x5c]
push ecx
push ebx
push edi
push ebx
push eax
mov dword [esp + 0x70], 0x1c
mov dword [esp + 0x30], ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x40ef39
mov edi, edi
mov eax, 7
mov dword [esp + 0x90], eax
mov dword [esp + 0x8c], ebx
mov word [esp + 0x7c], bx
mov dword [esp + 0xac], eax
mov dword [esp + 0xa8], ebx
mov word [esp + 0x98], bx
mov dword [esp + 0xc8], eax
mov dword [esp + 0xc4], ebx
mov word [esp + 0xb4], bx
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe0], ebx
mov word [esp + 0xd0], bx
mov dword [esp + 0x100], eax
mov dword [esp + 0xfc], ebx
mov word [esp + 0xec], bx
mov dword [esp + 0x11c], eax
mov dword [esp + 0x118], ebx
mov word [esp + 0x108], bx
mov dword [esp + 0x138], eax
mov dword [esp + 0x134], ebx
mov word [esp + 0x124], bx
mov ecx, dword [esi]
mov ebp, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push ebx
lea edx, [esp + 0x18]
push edx
push ebx
push ebx
lea eax, [esp + 0x6c]
push eax
push ecx
mov dword [esp + 0x364], ebx
mov dword [esp + 0x2c], ebx
call ebp
mov edx, dword [esp + 0x14]
push edx
call fcn.0041d28c
mov edi, eax
mov dword [edi], 6
mov edx, dword [esp + 0x18]
xor eax, eax
add esp, 4
mov dword [esp + 0x44], eax
mov dword [esp + 0x48], eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x58], eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x18]
push ecx
mov ecx, dword [esi]
push edx
push edi
lea eax, [esp + 0x6c]
push eax
push ecx
mov dword [esp + 0x58], 0x1c
call ebp
test eax, eax
jne 0x40ed66
push edi
call fcn.0041d291
add esp, 4
mov dword [esp + 0x14], ebx
jmp 0x40eef9
lea edx, [edi + 4]
mov eax, edx
lea ebp, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ed70
sub eax, ebp
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x80]
call fcn.004037c0
push edi
call fcn.0041d291
push 0x1fe
lea edx, [esp + 0x14a]
push ebx
push edx
mov dword [esp + 0x24], ebx
mov word [esp + 0x150], bx
call fcn.00428720
mov edx, dword [esi]
add esp, 0x10
push ebx
push 0x100
lea eax, [esp + 0x148]
push eax
lea ecx, [esp + 0x4c]
push ecx
push edx
call dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
test eax, eax
je 0x40ee04
lea eax, [esp + 0x140]
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40ede0
sub eax, edx
sar eax, 1
push eax
lea eax, [esp + 0x144]
push eax
lea ecx, [esp + 0x128]
call fcn.004037c0
mov edx, dword [esi]
push 0xc
lea ecx, [esp + 0x44]
push ecx
push edx
lea eax, [esp + 0x30]
push eax
mov ecx, esi
call fcn.0040c770
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xa0]
mov byte [esp + 0x358], 1
call fcn.004035f0
mov edi, 8
cmp dword [esp + 0x3c], edi
mov byte [esp + 0x34c], bl
jb 0x40ee51
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0041d291
add esp, 4
mov eax, dword [esi]
push ebx
lea edx, [esp + 0x44]
push edx
push eax
lea ecx, [esp + 0x30]
push ecx
mov ecx, esi
call fcn.0040c770
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xbc]
mov byte [esp + 0x358], 2
call fcn.004035f0
cmp dword [esp + 0x3c], edi
mov byte [esp + 0x34c], bl
jb 0x40ee98
mov edx, dword [esp + 0x28]
push edx
call fcn.0041d291
add esp, 4
mov ecx, dword [esi]
push 0xe
lea eax, [esp + 0x44]
push eax
push ecx
lea edx, [esp + 0x30]
push edx
mov ecx, esi
call fcn.0040c770
push 0xffffffffffffffff
push ebx
push eax
lea ecx, [esp + 0xd8]
mov byte [esp + 0x358], 3
call fcn.004035f0
cmp dword [esp + 0x3c], edi
mov byte [esp + 0x34c], bl
jb 0x40eee0
mov eax, dword [esp + 0x28]
push eax
call fcn.0041d291
add esp, 4
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x78]
mov dword [esp + 0x13c], ecx
mov ecx, dword [esp + 0x18]
push edx
call fcn.0040ea40
lea ecx, [esp + 0x78]
mov dword [esp + 0x34c], 0xffffffff
call fcn.0040afc0
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add eax, 1
lea ecx, [esp + 0x5c]
push ecx
push eax
push edx
mov dword [esp + 0x28], eax
mov eax, dword [esi]
push ebx
push eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x40ec40
mov ebp, dword [esp + 0x18]
mov eax, dword [ebp + 4]
cmp eax, ebx
je 0x40ec14
mov ecx, dword [ebp + 8]
sub ecx, eax
mov eax, 0x51eb851f
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
mov ecx, dword [esp + 0x344]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x32c]
xor ecx, esp
call fcn.00428437
add esp, 0x33c
ret 8