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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x544dd8
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5ab720]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x5ab720]
xor eax, esp
push eax
lea eax, [esp + 0x88]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor esi, esi
cmp dword [eax + 0x288], esi
mov dword [esp + 0x38], eax
je 0x4eb3c6
xor eax, eax
push 0x12
push esi
push esi
push 0x565f40
mov dword [esp + 0x44], esi
mov dword [esp + 0x58], esi
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x3c], esi
mov dword [esp + 0x34], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x3c], ebx
je 0x4eb3c6
lea eax, [esp + 0x48]
push eax
push esi
push ebx
mov dword [esp + 0x54], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4eb3bf
jmp 0x4eb022
xor esi, esi
mov edi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
lea ecx, [esp + 0x2c]
push ecx
push esi
push esi
lea edx, [esp + 0x54]
push edx
push ebx
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], esi
call edi
mov eax, dword [esp + 0x2c]
lea ecx, [eax + eax]
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
test esi, esi
mov dword [esp + 0x1c], esi
je 0x4eb3bf
mov edx, dword [esp + 0x2c]
push 0
push edx
push esi
lea eax, [esp + 0x54]
push eax
push ebx
call edi
xor edi, edi
cmp eax, edi
je 0x4eb3b8
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4eb080
sub eax, edx
sar eax, 1
add eax, 1
push eax
push esi
call fcn.00522173
push str.VEN_10EC
push esi
call fcn.00522186
add esp, 0x10
test eax, eax
jne 0x4eb0bd
push str.VEN_1002
push esi
call fcn.00522186
add esp, 8
test eax, eax
je 0x4eb0dd
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x288]
push eax
push esi
call fcn.00522186
add esp, 8
test eax, eax
jne 0x4eb0dd
mov dword [esp + 0x14], 1
lea edx, [esp + 0x4c]
push 0x55f9b0
push edx
call fcn.00405090
add esp, 8
test eax, eax
je 0x4eb1a7
lea eax, [esp + 0x48]
push eax
push ebx
lea eax, [esp + 0x30]
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], edi
mov dword [esp + 0x30], edi
call fcn.004eb4e0
mov eax, dword [esp + 0x30]
cmp eax, edi
je 0x4eb1a7
push eax
lea ecx, [esp + 0x24]
call fcn.00404670
mov dword [esp + 0x90], edi
lea edi, [esp + 0x20]
call fcn.00410630
mov ecx, dword [esp + 0x20]
push str.REALTEK_USB
push ecx
call fcn.00522186
add esp, 8
test eax, eax
jne 0x4eb164
mov edx, dword [esp + 0x20]
push str.C_MEDIA_USB_HEADPHONE_SET
push edx
call fcn.00522186
add esp, 8
test eax, eax
je 0x4eb171
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x90], 0xffffffff
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4eb1a7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x4eb38f
lea ecx, [esp + 0x64]
push ecx
push 0
push 0x565f40
lea edx, [esp + 0x54]
push edx
push ebx
mov dword [esp + 0x78], 0x1c
mov dword [esp + 0x28], 0
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x4eb38f
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0
lea ecx, [esp + 0x74]
push ecx
push ebx
call esi
mov edx, dword [esp + 0x24]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4eb280
push 0
push 0
mov dword [edi], 6
mov eax, dword [esp + 0x2c]
push eax
push edi
lea ecx, [esp + 0x74]
push ecx
push ebx
call esi
test eax, eax
je 0x4eb2af
lea esi, [edi + 4]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4eb236
sub eax, edx
sar eax, 1
add eax, 1
push eax
push esi
call fcn.00522173
push 0x57ed6c
push esi
call fcn.00522186
add esp, 0x10
test eax, eax
jne 0x4eb2c1
cmp dword [esp + 0x18], eax
je 0x4eb279
push str.GLOBAL
push esi
call fcn.00522186
add esp, 8
test eax, eax
jne 0x4eb2c1
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x14]
add eax, 1
lea edx, [esp + 0x64]
push edx
push eax
mov dword [esp + 0x1c], eax
push 0x565f40
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x4eb1e2
jmp 0x4eb38b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4eb38b
xor eax, eax
cmp dword [esp + 0x18], eax
lea ebx, [edi + 4]
je 0x4eb2f1
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
mov eax, edx
push 4
push eax
push 0
mov eax, ebx
call fcn.00428aa0
add esp, 0x14
jmp 0x4eb32e
mov ecx, dword [0x560cf4]
mov edx, dword [0x560cf8]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x560cfc]
mov dword [eax + 4], edx
mov edx, dword [0x560d00]
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
push 6
lea eax, [esp + 0x54]
push eax
push 0
xor edx, edx
mov ecx, ebx
call fcn.00422570
add esp, 0x1c
test eax, eax
je 0x4eb380
push 0xc
call fcn.004fae94
add esp, 4
test eax, eax
je 0x4eb380
mov esi, eax
call fcn.004eb3f0
mov esi, eax
test esi, esi
je 0x4eb380
mov ecx, dword [esp + 0x38]
push esi
add ecx, 0x298
call fcn.00503381
mov ecx, dword [esp + 0x1c]
push ecx
mov ecx, esi
call fcn.004049b0
push ebx
lea ecx, [esi + 4]
call fcn.004049b0
cmp dword [esp + 0x18], 0
je 0x4eb380
mov dword [esi + 8], 1
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x48]
add eax, 1
push edx
push eax
push ebx
mov dword [esp + 0x40], eax
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
jne 0x4eb020
jmp 0x4eb3bf
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x88]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x70]
xor ecx, esp
call fcn.0052151a
mov esp, ebp
pop ebp
ret 4