Function at 0x408130
Capabilities:
Access peb ldr_data
Check for peb beingdebugged flag
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x615a48
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
xor eax, eax
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esi + 8], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x1c], eax
mov dword [esi + 0x20], eax
mov dword [esi + 0x24], eax
mov dword [esi + 0x28], 0xffffffff
mov dword [esi + 0x2c], 0x7fffffff
mov ebp, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov dword [esi], 0x62807c
mov eax, dword [ebp]
mov edx, dword [eax + 4]
mov ecx, ebp
call edx
cmp byte [esp + 0x30], 0
mov edi, eax
mov eax, dword [ebp]
mov edx, dword [eax + 8]
setne bl
sub bl, 1
mov ecx, ebp
and ebx, dword [esp + 0x2c]
call edx
push eax
mov ecx, esi
call fcn.00407f60
mov dword [esp + 0x24], eax
mov eax, dword [ebp]
mov edx, dword [eax + 8]
mov ecx, ebp
call edx
push eax
mov eax, dword [esp + 0x28]
push edi
push eax
call fcn.005f7b00
mov eax, dword [esp + 0x30]
xor ecx, ecx
add esp, 0xc
test bl, bl
setne cl
xor edx, edx
add ecx, 1
cmp byte [esp + 0x28], dl
mov word [eax + 2], cx
setne dl
lea edx, [edx*8 + 8]
mov word [eax + 0xe], dx
movzx eax, word [edi + 2]
cmp ax, 1
je 0x408224
cmp ax, 2
je 0x408224
lea eax, [esp + 0x28]
push str.Cannot_convert_audio:_the_source_channel_count_is_not_supported__must_be_mono_or_stereo_.
push eax
call fcn.0051c348
add esp, 8
push 0x694d20
lea ecx, [esp + 0x2c]
push ecx
call fcn.005f8355
movzx ecx, word [edi + 0xe]
cmp cx, 8
je 0x408255
cmp cx, 0x10
je 0x408255
lea edx, [esp + 0x28]
push str.Cannot_convert_audio:_the_source_audio_format_is_not_supported__must_be_8_bit_or_16_bit_PCM_.
push edx
call fcn.0051c348
add esp, 8
push 0x694d20
lea eax, [esp + 0x2c]
push eax
call fcn.005f8355
mov dx, 8
cmp dx, cx
sbb ecx, ecx
neg ecx
add ecx, 1
mov dx, 1
cmp dx, ax
sbb eax, eax
neg eax
add eax, 1
imul ecx, eax
mov al, byte [esp + 0x28]
mov dword [esi + 0x38], ecx
xor ecx, ecx
test bl, bl
setne cl
xor edx, edx
mov dword [esi + 0x40], 0
add ecx, 1
test al, al
setne dl
add edx, 1
imul ecx, edx
cmp byte [esp + 0x30], 0
mov dword [esi + 0x3c], ecx
mov cx, 8
je 0x4082f6
cmp cx, word [edi + 0xe]
sbb edx, edx
xor ecx, ecx
and edx, 2
test al, al
setne cl
mov eax, 1
add edx, ecx
movzx ecx, ax
cmp cx, word [edi + 2]
sbb ecx, ecx
and ecx, 4
add edx, ecx
cmp byte [esp + 0x2c], 0
mov edx, dword [edx*4 + 0x627f20]
mov dword [esi + 0x30], edx
je 0x40832a
cmp word [edi + 2], ax
jbe 0x40832a
mov dword [esi + 0x40], eax
cmp word [edi + 0xe], 8
jbe 0x40832a
mov dword [esi + 0x40], 2
jmp 0x40832a
cmp cx, word [edi + 0xe]
sbb edx, edx
and edx, 4
neg bl
sbb ebx, ebx
xor ecx, ecx
and ebx, 2
add edx, ebx
test al, al
setne cl
mov ax, 1
add edx, ecx
cmp ax, word [edi + 2]
sbb ecx, ecx
and ecx, 8
add edx, ecx
mov edx, dword [edx*4 + 0x627ee0]
mov dword [esi + 0x30], edx
mov dword [esi + 0x10], ebp
mov eax, dword [ebp]
mov edx, dword [eax + 0x10]
mov ecx, ebp
call edx
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x24]
mov dword [esi + 0x24], edx
mov ecx, dword [eax + 4]
imul ecx, dword [esi + 0x3c]
mov dword [eax + 8], ecx
mov dx, word [esi + 0x3c]
mov word [eax + 0xc], dx
mov eax, dword [esi + 0x38]
shl eax, 0xc
push eax
call fcn.00461f60
add esp, 4
test eax, eax
mov dword [esi + 0x34], eax
jne 0x40838a
lea ecx, [esp + 0x28]
push str.AudioStreamConverter:_out_of_memory
push ecx
call fcn.0051c348
add esp, 8
push 0x694d20
lea edx, [esp + 0x2c]
push edx
call fcn.005f8355
mov ecx, dword [esp + 0x14]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0x10