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

Disassembly:
sub esp, 0x8c
mov eax, dword [0x4f7004]
xor eax, esp
mov dword [esp + 0x84], eax
push ebx
mov ebx, dword [esp + 0x98]
push ebp
push esi
mov esi, edx
mov ebp, ecx
mov ecx, dword [esp + 0x9c]
push edi
xor edi, edi
mov dword [esp + 0x54], esi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x28], edi
cmp esi, 3
jne 0x41138e
push 0xfffffffffffffffe
pop eax
jmp 0x411c37
lea eax, [ebx + 0x12c]
mov dword [esp + 0x4c], eax
mov dword [eax], edi
lea eax, [ebx + 0x130]
mov dword [esp + 0x44], eax
mov dword [eax], edi
lea eax, [ebx + 0x134]
mov dword [esp + 0x48], eax
mov dword [eax], edi
mov eax, 0x40000
cmp dword [ebx + 0x120], edi
jne 0x4113d3
cmp dword [ebx + 8], edi
je 0x4113d3
cmp dword [ebx + 0x118], 1
mov edx, 0x80040000
cmovne eax, edx
cmp dword [ebx + 0x124], edi
jne 0x4113e9
cmp dword [ebx + 8], edi
je 0x4113e9
test eax, eax
jns 0x4113e9
or eax, 0x8000000
mov edx, eax
or edx, 0x20000
cmp esi, 4
cmovne edx, eax
lea eax, [esp + 0x28]
push eax
mov dword [esp + 0x28], edx
mov edx, esi
push ecx
mov ecx, ebp
call fcn.00410e0c
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x411bbb
mov eax, dword [esp + 0x28]
lea esi, [ebx + 0x12c]
push esi
push edi
push 0x17
mov ecx, dword [eax]
push 0x480780
push eax
call dword [ecx + 0xc]
test eax, eax
jns 0x41144a
mov ecx, eax
call fcn.0040e55c
mov esi, eax
test esi, esi
jne 0x411bbb
lea esi, [ebx + 0x12c]
push 0x28
lea eax, [esp + 0x70]
push edi
push eax
call fcn.00449940
add esp, 0xc
cmp dword [ebx + 0x128], edi
jne 0x4114d2
mov eax, dword [esi]
lea edx, [esp + 0x34]
push edx
push 0x47f7a8
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x4114d2
mov eax, dword [esp + 0x34]
lea edx, [esp + 0x20]
push edx
mov dword [esp + 0x24], edi
push edi
mov ecx, dword [eax]
push eax
call dword [ecx + 0x3c]
test eax, eax
js 0x4114c8
cmp dword [esp + 0x20], edi
je 0x4114c8
push 0xc
lea eax, [esp + 0x5c]
push edi
push eax
call fcn.00449940
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x64]
add esp, 0xc
mov dword [esp + 0x58], 0xc
mov dword [esp + 0x5c], 1
mov dword [esp + 0x60], edi
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x40]
mov eax, dword [esp + 0x34]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
cmp dword [ebx + 0x118], 1
lea edx, [esp + 0x14]
mov dword [esp + 0x14], edi
push edx
jne 0x41158b
mov eax, dword [esp + 0x2c]
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
js 0x411575
push 0x10
lea eax, [esp + 0x5c]
push edi
push eax
call fcn.00449940
mov eax, dword [esp + 0x20]
lea edx, [esp + 0x64]
add esp, 0xc
mov ecx, dword [eax]
push edx
push 0x47f328
push eax
call dword [ecx + 0x14]
mov esi, eax
mov dword [esp + 0x18], esi
test esi, esi
js 0x41156b
mov eax, dword [ebx + 0x12c]
mov edx, dword [esp + 0x64]
push edi
push edx
mov ecx, dword [eax]
push 1
push eax
mov dword [esp + 0x2c], edx
call dword [ecx + 0x1c]
mov esi, eax
mov dword [esp + 0x18], eax
test esi, esi
js 0x411560
push 0x28
push dword [esp + 0x20]
lea eax, [esp + 0x74]
push eax
call fcn.00449aa0
add esp, 0xc
lea eax, [esp + 0x58]
push eax
call dword [ebp + 0x130]
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
neg esi
sbb esi, esi
xor eax, eax
and esi, 0xffffff9a
cmp dword [esp + 0x18], eax
sete al
mov dword [esp + 0x18], eax
jmp 0x4115bf
mov eax, dword [esi]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
test eax, eax
je 0x41159c
push 0xffffffffffffff9c
pop esi
jmp 0x4115b1
push 0x28
push dword [esp + 0x18]
lea eax, [esp + 0x74]
push eax
call fcn.00449aa0
add esp, 0xc
mov esi, edi
push dword [esp + 0x14]
call dword [ebp + 0x12c]
mov dword [esp + 0x18], edi
test esi, esi
je 0x4115cd
mov ebx, str._WASAPI__Failed_to_find_best_device_mix_format.
jmp 0x411bc0
mov eax, dword [esp + 0x70]
mov dword [esp + 0x20], eax
cmp dword [esp + 0x24], edi
jge 0x4115f7
cmp dword [ebx + 8], edi
mov ecx, 0xbb80
movzx eax, word [esp + 0x78]
cmovne ecx, dword [ebx + 8]
imul eax, ecx
mov dword [esp + 0x70], ecx
mov dword [esp + 0x74], eax
lea ecx, [esp + 0x6c]
call fcn.00410433
mov dword [ebx + 0x138], eax
test eax, eax
jne 0x411622
mov eax, dword [esp + 0x18]
mov ebx, str._WASAPI__Native_format_not_supported.
xor eax, 1
lea esi, [eax*2 - 0x66]
jmp 0x411bc0
movzx edx, word [esp + 0x6e]
lea eax, [ebx + 0x144]
mov esi, dword [esp + 0x70]
mov ecx, dword [esp + 0x80]
push eax
mov dword [ebx + 0x13c], edx
mov dword [ebx + 0x140], esi
call fcn.004103d3
mov eax, dword [ebx + 0x114]
test eax, eax
pop ecx
push 3
pop ecx
cmovne ecx, eax
mov eax, dword [ebx + 0x10c]
mov dword [esp + 0x2c], ecx
mov dword [ebx + 0x248], ecx
mov dword [ebx + 0x244], eax
test eax, eax
jne 0x411699
mov ecx, dword [ebx + 0x110]
mov edx, esi
test ecx, ecx
jne 0x41168e
cmp dword [ebx + 0x11c], edi
jne 0x41168b
push 0xa
jmp 0x41168d
push 0x64
pop ecx
call fcn.00418e0b
mov dword [ebx + 0x244], eax
mov esi, 0x3e8
mul esi
push edi
push dword [esp + 0x74]
mov ecx, eax
mov eax, edx
mul esi
mov esi, eax
mov eax, ecx
mov ecx, 0x3e8
mul ecx
add esi, edx
push esi
push eax
call fcn.00460520
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov dword [esp + 0x30], edx
cmp eax, 1
jne 0x411864
push edx
push dword [esp + 0x20]
push edi
push dword [esp + 0x38]
call fcn.0045ff10
push edi
push 0xa
push edx
push eax
call fcn.0045ff10
push edi
mov dword [esp + 0x18], edx
mov esi, eax
lea edx, [esp + 0x70]
push edx
mov edx, dword [esp + 0x1c]
push edx
push esi
push edx
push esi
push dword [esp + 0x3c]
push dword [esp + 0x34]
jmp 0x411749
mov edx, dword [esp + 0x14]
cmp edx, edi
jg 0x411853
jl 0x411725
cmp esi, 0x4c4b40
ja 0x411853
mov eax, esi
or eax, edx
je 0x41175f
shld edx, esi, 1
push edi
mov dword [esp + 0x18], edx
add esi, esi
lea edx, [esp + 0x70]
push edx
mov edx, dword [esp + 0x1c]
push edx
push esi
push edx
push esi
push dword [esp + 0x3c]
push 1
mov eax, dword [ebx + 0x12c]
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc]
mov ecx, eax
cmp ecx, 0x88890020
je 0x41170b
cmp ecx, 0x88890019
jne 0x411822
lea esi, [ebx + 0x12c]
mov eax, dword [esi]
lea edx, [esp + 0x1c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
mov ecx, eax
test ecx, ecx
js 0x41182a
mov eax, dword [esp + 0x70]
movsd xmm0, qword [0x4f2880]
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x4f2a20]
mov eax, dword [esp + 0x1c]
divsd xmm0, xmm1
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x4f2a20]
mulsd xmm0, xmm1
addsd xmm0, qword [0x4f2800]
call fcn.00460600
mov dword [esp + 0x2c], eax
mov eax, dword [esi]
push eax
mov dword [esp + 0x34], edx
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x28]
push esi
push edi
push 0x17
mov ecx, dword [eax]
push 0x480780
push eax
call dword [ecx + 0xc]
mov ecx, eax
test ecx, ecx
js 0x41182a
mov eax, dword [esi]
lea edx, [esp + 0x6c]
mov esi, dword [esp + 0x30]
push edi
push edx
mov edx, dword [esp + 0x34]
mov ecx, dword [eax]
push esi
push edx
push esi
push edx
push dword [esp + 0x3c]
push dword [esp + 0x34]
push eax
call dword [ecx + 0xc]
mov ecx, eax
test ecx, ecx
jns 0x411ac9
mov eax, ecx
cmp ecx, 0x80070005
jne 0x41183d
mov ebx, str._WASAPI__Failed_to_initialize_device_in_exclusive_mode._Access_denied.
push 0xfffffffffffffffa
jmp 0x41184d
mov ecx, eax
cmp eax, 0x8889000a
jne 0x411853
mov ebx, str._WASAPI__Failed_to_initialize_device_in_exclusive_mode._Device_in_use.
push 0xffffffffffffffed
pop esi
jmp 0x411bc0
mov ebx, str._WASAPI__Failed_to_initialize_device_in_exclusive_mode.
call fcn.0040e55c
mov esi, eax
jmp 0x411bc0
test eax, eax
jne 0x411ac9
cmp dword [esp + 0x24], edi
jge 0x411880
mov eax, dword [esp + 0x20]
cmp eax, dword [esp + 0x70]
jne 0x411a55
lea esi, [ebx + 0x12c]
mov dword [esp + 0x14], edi
mov eax, dword [esi]
lea edx, [esp + 0x14]
push edx
push 0x47fcac
push eax
mov ecx, dword [eax]
call dword [ecx]
test eax, eax
js 0x411a55
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x2c]
push edx
lea edx, [esp + 0x24]
push edx
mov ecx, dword [eax]
lea edx, [esp + 0x40]
push edx
lea edx, [esp + 0x5c]
push edx
lea edx, [esp + 0x7c]
push edx
push eax
call dword [ecx + 0x48]
test eax, eax
js 0x411a26
mov eax, dword [ebx + 0x244]
xor edx, edx
mov dword [esp + 0x40], eax
div dword [esp + 0x38]
mov esi, dword [esp + 0x2c]
imul eax, dword [esp + 0x38]
cmp eax, esi
cmovb esi, eax
mov eax, edi
cmp dword [esp + 0x20], esi
cmova esi, dword [esp + 0x20]
test ebp, ebp
je 0x4118fe
mov eax, dword [ebp + 0x38]
push esi
push str._WASAPI__Trying_IAudioClient3_InitializeSharedAudioStream_actualPeriodInFrames_d__n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
mov eax, edi
test ebp, ebp
je 0x411918
mov eax, dword [ebp + 0x38]
push dword [esp + 0x50]
push str.____defaultPeriodInFrames_d_n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
mov eax, edi
test ebp, ebp
je 0x411935
mov eax, dword [ebp + 0x38]
push dword [esp + 0x38]
push str.____fundamentalPeriodInFrames_d_n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
mov eax, edi
test ebp, ebp
je 0x411952
mov eax, dword [ebp + 0x38]
push dword [esp + 0x20]
push str.____minPeriodInFrames_d_n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
mov eax, edi
test ebp, ebp
je 0x41196f
mov eax, dword [ebp + 0x38]
push dword [esp + 0x2c]
push str.____maxPeriodInFrames_d_n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
cmp esi, dword [esp + 0x40]
jb 0x411a16
mov ecx, dword [esp + 0x14]
lea eax, [esp + 0x6c]
push edi
push eax
mov eax, dword [esp + 0x2c]
mov edx, dword [ecx]
and eax, 0x77ffffff
push esi
push eax
push ecx
call dword [edx + 0x50]
test eax, eax
mov eax, edi
js 0x4119fa
mov dword [esp + 0x3c], 1
mov dword [ebx + 0x244], esi
test ebp, ebp
je 0x4119c3
mov eax, dword [ebp + 0x38]
push str._WASAPI__Using_IAudioClient3_n
push 4
push eax
call fcn.0040daeb
add esp, 0xc
mov eax, edi
test ebp, ebp
je 0x4119dc
mov eax, dword [ebp + 0x38]
push dword [ebx + 0x244]
push str.____periodSizeInFramesOut_d_n
push 4
push eax
call fcn.0040daeb
add esp, 0x10
lea esi, [ebx + 0x12c]
jmp 0x411a3f
test ebp, ebp
je 0x411a01
mov eax, dword [ebp + 0x38]
push str._WASAPI__IAudioClient3_InitializeSharedAudioStream_failed._Falling_back_to_IAudioClient._n
push 4
push eax
call fcn.0040daeb
lea esi, [ebx + 0x12c]
jmp 0x411a3c
mov eax, edi
test ebp, ebp
je 0x411a1f
mov eax, dword [ebp + 0x38]
push str._WASAPI__Not_using_IAudioClient3_because_the_desired_period_size_is_larger_than_the_maximum_supported_by_IAudioClient3._n
jmp 0x411a06
mov eax, edi
test ebp, ebp
je 0x411a2f
mov eax, dword [ebp + 0x38]
push str._WASAPI__IAudioClient3_GetSharedModeEnginePeriod_failed._Falling_back_to_IAudioClient._n
push 4
push eax
call fcn.0040daeb
add esp, 0xc
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [esp + 0x3c]
test eax, eax
jne 0x411afd
push dword [esp + 0x30]
push dword [esp + 0x20]
push edi
push dword [ebx + 0x248]
call fcn.0045ff10
push edi
push 0xa
push edx
push eax
call fcn.0045ff10
mov ecx, dword [ebx + 0x12c]
push edi
mov esi, dword [ecx]
lea ecx, [esp + 0x70]
push ecx
mov ecx, dword [ebx + 0x12c]
push edi
push edi
push edx
push eax
push dword [esp + 0x3c]
push dword [esp + 0x34]
push ecx
call dword [esi + 0xc]
test eax, eax
jns 0x411ac9
cmp eax, 0x80070005
jne 0x411aac
mov ebx, str._WASAPI__Failed_to_initialize_device._Access_denied.
jmp 0x411839
cmp eax, 0x8889000a
jne 0x411abd
mov ebx, str._WASAPI__Failed_to_initialize_device._Device_in_use.
jmp 0x41184b
mov ebx, str._WASAPI__Failed_to_initialize_device.
mov ecx, eax
jmp 0x411858
lea esi, [ebx + 0x12c]
mov eax, dword [esi]
lea edx, [esp + 0x40]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
jns 0x411ae7
mov ebx, str._WASAPI__Failed_to_get_audio_clients_actual_buffer_size.
jmp 0x411ac2
mov eax, dword [esp + 0x40]
xor edx, edx
div dword [ebx + 0x248]
mov dword [ebx + 0x244], eax
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x54]
lea ecx, [ebx + 0x130]
mov dword [ebx + 0x24c], eax
cmp edx, 1
lea eax, [ebx + 0x134]
cmove eax, ecx
mov ecx, ebp
push eax
push dword [esi]
call fcn.004109fc
mov esi, eax
pop ecx
pop ecx
test esi, esi
je 0x411b35
mov ebx, str._WASAPI__Failed_to_get_audio_client_service.
jmp 0x411bc0
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x1c]
push edx
push edi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
js 0x411ba6
push 0x10
lea eax, [esp + 0x5c]
push edi
push eax
call fcn.00449940
mov eax, dword [esp + 0x28]
lea edx, [esp + 0x64]
add esp, 0xc
mov ecx, dword [eax]
push edx
push 0x47efe8
push eax
call dword [ecx + 0x14]
test eax, eax
js 0x411b9c
push edi
push edi
push 0x100
lea eax, [ebx + 0x250]
push eax
push 0xffffffffffffffff
push dword [esp + 0x74]
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
lea eax, [esp + 0x58]
push eax
call dword [ebp + 0x130]
mov eax, dword [esp + 0x1c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edx, dword [esp + 0x28]
lea eax, [ebx + 0x350]
push eax
mov ecx, ebp
call fcn.00410e98
pop ecx
mov esi, edi
mov ebx, 0x4eaee9
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x411bce
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
test esi, esi
je 0x411c35
mov eax, dword [esp + 0x44]
mov ecx, dword [eax]
test ecx, ecx
je 0x411be8
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esp + 0x44]
mov dword [eax], edi
mov eax, dword [esp + 0x48]
mov ecx, dword [eax]
test ecx, ecx
je 0x411bfe
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esp + 0x48]
mov dword [eax], edi
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
test ecx, ecx
je 0x411c14
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov eax, dword [esp + 0x4c]
mov dword [eax], edi
cmp byte [ebx], 0
je 0x411c31
test ebp, ebp
je 0x411c20
mov edi, dword [ebp + 0x38]
push ebx
push 0x4eb35c
push 1
push edi
call fcn.0040daeb
add esp, 0x10
mov eax, esi
jmp 0x411c37
xor eax, eax
mov ecx, dword [esp + 0x94]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.00448363
add esp, 0x8c
ret