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

Disassembly:
push 0xffffffffffffffff
push 0x4f58d8
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x536ed4]
xor eax, esp
mov dword [esp + 0x6c], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x536ed4]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov eax, dword [esp + 0x94]
xor edi, edi
cmp dword [0x54b050], edi
mov dword [esp + 0x3c], eax
je 0x4a4c9e
xor eax, eax
push 0x12
push edi
push edi
push 0x50ec58
mov dword [esp + 0x44], edi
mov dword [esp + 0x58], edi
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], edi
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 + 0x34], edi
mov dword [esp + 0x38], edi
call dword [sym.imp.SETUPAPI.dll_SetupDiGetClassDevsW]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x40], ebx
je 0x4a4c9e
lea ecx, [esp + 0x48]
push ecx
push edi
push ebx
mov dword [esp + 0x54], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInfo]
test eax, eax
je 0x4a4c97
jmp 0x4a48e0
mov esi, dword [sym.imp.SETUPAPI.dll_SetupDiGetDeviceInstanceIdW]
lea edx, [esp + 0x24]
push edx
push edi
push edi
lea eax, [esp + 0x54]
push eax
push ebx
mov dword [esp + 0x34], edi
mov dword [esp + 0x30], edi
call esi
mov ecx, dword [esp + 0x24]
lea edx, [ecx + ecx]
push edx
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov ebp, eax
cmp ebp, edi
mov dword [esp + 0x18], ebp
je 0x4a4c97
mov eax, dword [esp + 0x24]
push edi
push eax
push ebp
lea ecx, [esp + 0x54]
push ecx
push ebx
call esi
cmp eax, edi
je 0x4a4c90
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4a4937
sub eax, edx
sar eax, 1
add eax, 1
push eax
push ebp
call fcn.004cf6c8
push str.VEN_10EC
push ebp
call fcn.004ced30
add esp, 0x10
test eax, eax
jne 0x4a4974
push str.VEN_1002
push ebp
call fcn.004ced30
add esp, 8
test eax, eax
je 0x4a4990
mov edx, dword [0x54b050]
push edx
push ebp
call fcn.004ced30
add esp, 8
test eax, eax
jne 0x4a4990
mov dword [esp + 0x20], 1
lea eax, [esp + 0x4c]
push 0x500c14
push eax
call fcn.004432c0
add esp, 8
test eax, eax
je 0x4a4a78
lea ecx, [esp + 0x48]
push ecx
push ebx
lea eax, [esp + 0x34]
lea ecx, [esp + 0x40]
mov dword [esp + 0x40], edi
mov dword [esp + 0x34], edi
call fcn.004a4d50
mov esi, dword [esp + 0x38]
cmp esi, edi
je 0x4a4a78
push esi
lea ecx, [esp + 0x18]
call fcn.00401b10
mov dword [esp + 0x8c], edi
lea edi, [esp + 0x14]
call fcn.00443020
mov edx, dword [esp + 0x14]
push str.REALTEK_USB
push edx
call fcn.004ced30
add esp, 8
test eax, eax
jne 0x4a4a37
mov eax, dword [esp + 0x14]
push str.C_MEDIA_USB_HEADPHONE_SET
push eax
call fcn.004ced30
add esp, 8
test eax, eax
jne 0x4a4a37
mov ecx, dword [esp + 0x14]
push 0x50c178
push ecx
call fcn.004ced30
add esp, 8
test eax, eax
je 0x4a4a44
mov dword [esp + 0x20], 0
jmp 0x4a4a44
mov eax, 1
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov dword [esp + 0x8c], 0xffffffff
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4a4a76
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor edi, edi
cmp dword [esp + 0x20], edi
je 0x4a4c67
lea ecx, [esp + 0x64]
push ecx
xor ebp, ebp
push ebp
push 0x50ec58
lea edx, [esp + 0x54]
push edx
push ebx
mov dword [esp + 0x78], 0x1c
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
je 0x4a4c61
jmp 0x4a4ab0
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 0x4a4b4a
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 0x4a4b71
lea esi, [edi + 4]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a4b00
sub eax, edx
sar eax, 1
add eax, 1
push eax
push esi
call fcn.004cf6c8
push str.WAVE
push esi
call fcn.004ced30
add esp, 0x10
test eax, eax
jne 0x4a4b7c
cmp dword [esp + 0x1c], eax
je 0x4a4b43
push str.GLOBAL
push esi
call fcn.004ced30
add esp, 8
test eax, eax
jne 0x4a4b7c
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea edx, [esp + 0x64]
push edx
add ebp, 1
push ebp
push 0x50ec58
lea eax, [esp + 0x54]
push eax
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiEnumDeviceInterfaces]
test eax, eax
jne 0x4a4ab0
jmp 0x4a4c61
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4a4c5a
xor eax, eax
cmp dword [esp + 0x1c], eax
lea ebp, [edi + 4]
je 0x4a4bb0
lea ecx, [esp + 0x44]
push ecx
push 4
lea edx, [esp + 0x38]
push edx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x50], eax
push 4
mov eax, edx
push eax
push 0x1600
push ebp
call fcn.0045a210
add esp, 0x1c
jmp 0x4a4bb9
push ebp
call fcn.00458f20
add esp, 4
test eax, eax
je 0x4a4c5a
push 0xc
call fcn.004bb012
add esp, 4
test eax, eax
je 0x4a4c5a
mov esi, eax
call fcn.004a4cd0
mov esi, eax
test esi, esi
je 0x4a4c5a
mov ecx, dword [esp + 0x3c]
push esi
add ecx, 0x278
call fcn.004c5db0
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, esi
call fcn.00401d80
lea ebx, [esi + 4]
push ebp
mov ecx, ebx
call fcn.00401d80
cmp dword [esp + 0x1c], 0
je 0x4a4c15
mov dword [esi + 8], 1
mov eax, dword [ebx]
push ecx
sub eax, 0x10
mov dword [esp + 0x30], esp
mov esi, esp
push eax
call fcn.00401850
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.004036b0
mov ebx, dword [ebx]
push ecx
sub ebx, 0x10
mov dword [esp + 0x30], esp
mov esi, esp
push ebx
call fcn.00401850
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.00458390
mov ebx, dword [esp + 0x44]
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebp, dword [esp + 0x18]
xor edi, edi
push ebp
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 0x4a48e0
jmp 0x4a4c97
push ebp
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call dword [sym.imp.SETUPAPI.dll_SetupDiDestroyDeviceInfoList]
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x6c]
xor ecx, esp
call fcn.004cf0b8
add esp, 0x7c
ret 4