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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x54b518
mov eax, dword fs:[0]
push eax
sub esp, 0x78
mov eax, dword [0x5b3720]
xor eax, esp
mov dword [esp + 0x70], eax
push ebx
push esi
push edi
mov eax, dword [0x5b3720]
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 0x4f026c
xor eax, eax
push 0x12
push esi
push esi
push 0x56b8c8
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 + 0x38], esi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x3c], ebx
je 0x4f026c
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 0x4f0265
jmp 0x4efea2
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 + 0x34], 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 0x4f0265
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 0x4f025e
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4eff00
sub eax, edx
sar eax, 1
add eax, 1
push eax
push esi
call fcn.005258c0
push str.VEN_10EC
push esi
call fcn.005258d3
add esp, 0x10
test eax, eax
jne 0x4eff3d
push str.VEN_1002
push esi
call fcn.005258d3
add esp, 8
test eax, eax
je 0x4eff5d
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x288]
push eax
push esi
call fcn.005258d3
add esp, 8
test eax, eax
jne 0x4eff5d
mov dword [esp + 0x14], 1
lea edx, [esp + 0x4c]
push 0x564980
push edx
call fcn.004066c0
add esp, 8
test eax, eax
je 0x4f0027
lea eax, [esp + 0x48]
push eax
push ebx
lea eax, [esp + 0x20]
lea ecx, [esp + 0x38]
mov dword [esp + 0x38], edi
mov dword [esp + 0x20], edi
call fcn.004f0380
mov eax, dword [esp + 0x30]
cmp eax, edi
je 0x4f0027
push eax
lea ecx, [esp + 0x28]
call fcn.00405ee0
mov dword [esp + 0x90], edi
lea edi, [esp + 0x24]
call fcn.00411010
mov ecx, dword [esp + 0x24]
push str.REALTEK_USB
push ecx
call fcn.005258d3
add esp, 8
test eax, eax
jne 0x4effe4
mov edx, dword [esp + 0x24]
push str.C_MEDIA_USB_HEADPHONE_SET
push edx
call fcn.005258d3
add esp, 8
test eax, eax
je 0x4efff1
mov eax, 1
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x90], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4f0027
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x14], 0
je 0x4f0235
lea ecx, [esp + 0x64]
push ecx
push 0
push 0x56b8c8
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 0x4f0235
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInterfaceDetailW]
push 0
lea eax, [esp + 0x2c]
push eax
push 0
push 0
lea ecx, [esp + 0x74]
push ecx
push ebx
call esi
mov edx, dword [esp + 0x28]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x4f0100
push 0
push 0
mov dword [edi], 6
mov eax, dword [esp + 0x30]
push eax
push edi
lea ecx, [esp + 0x74]
push ecx
push ebx
call esi
test eax, eax
je 0x4f012f
lea esi, [edi + 4]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4f00b6
sub eax, edx
sar eax, 1
add eax, 1
push eax
push esi
call fcn.005258c0
push 0x585cdc
push esi
call fcn.005258d3
add esp, 0x10
test eax, eax
jne 0x4f0141
cmp dword [esp + 0x20], eax
je 0x4f00f9
push str.GLOBAL
push esi
call fcn.005258d3
add esp, 8
test eax, eax
jne 0x4f0141
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 0x56b8c8
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x4f0062
jmp 0x4f0231
call dword [sym.imp.KERNEL32.dll_GetLastError]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x4f0231
xor eax, eax
cmp dword [esp + 0x20], eax
lea ebx, [edi + 4]
je 0x4f0171
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov eax, edx
push 4
push eax
push 0
mov eax, ebx
call fcn.00429240
add esp, 0x14
jmp 0x4f01ad
mov ecx, dword [0x56624c]
mov edx, dword [0x566250]
sub esp, 0x10
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [0x566254]
mov dword [eax + 4], edx
mov edx, dword [0x566258]
push 6
mov dword [eax + 8], ecx
mov dword [eax + 0xc], edx
push 0
push 0
lea edx, [esp + 0x5c]
mov ecx, ebx
call fcn.00422780
add esp, 0x1c
test eax, eax
je 0x4f0226
push 0xc
call fcn.004fe8de
add esp, 4
test eax, eax
je 0x4f0226
mov esi, eax
call fcn.004f0290
mov esi, eax
test esi, esi
je 0x4f0226
mov ecx, dword [esp + 0x38]
push esi
add ecx, 0x2b0
call fcn.00506e4a
mov eax, dword [esp + 0x1c]
push eax
mov ecx, esi
call fcn.00406220
lea ecx, [esi + 4]
push ebx
mov dword [esp + 0x1c], ecx
call fcn.00406220
cmp dword [esp + 0x20], 0
je 0x4f0203
mov dword [esi + 8], 1
push ecx
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx]
sub eax, 0x10
mov dword [esp + 0x18], esp
mov esi, esp
push eax
call fcn.00402380
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004be7c0
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 0x4efea0
jmp 0x4f0265
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.00524c67
mov esp, ebp
pop ebp
ret 4