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

Disassembly:
sub esp, 0x51c
push ebx
push ebp
mov ebp, ecx
mov eax, dword [ebp]
mov edx, dword [eax + 0x10]
push esi
push edi
call edx
mov esi, dword [esp + 0x530]
mov ebx, dword [esi]
cmp ebx, dword [ebp + 0xc]
lea edi, [ebp + 4]
push ebx
mov ecx, edi
jbe 0x40bb82
call fcn.004076b0
mov dword [edi + 4], ebx
jmp 0x40bb8a
mov dword [edi + 4], ebx
call fcn.004076b0
mov eax, dword [esi]
mov ecx, dword [edi]
push eax
push esi
push ecx
call fcn.004704a0
add esp, 0xc
cmp dword [esi + 0xc], 0
jne 0x40bba9
push str.Invalid_number_of_input_channels
call fcn.00404720
mov dword [ebp + 0x58], 0
cmp dword [esi + 4], 4
jb 0x40bbe3
cmp dword [esi], 0x4c
jae 0x40bbc5
push str.Invalid_setup_structure_size
call fcn.00404720
mov ecx, dword [esi + 0x3c]
test ecx, ecx
mov dword [ebp + 0x58], ecx
je 0x40bbe3
call fcn.0040a590
cmp eax, dword [esi + 0xc]
je 0x40bbe3
push str.Invalid_channel_mask
call fcn.00404720
cmp dword [esi + 4], 3
mov edx, dword [esp + 0x534]
mov edi, dword [esp + 0x538]
mov bl, byte [esp + 0x53c]
mov dword [esp + 0x58], edx
jb 0x40bc6d
cmp dword [esi], 0x3c
jae 0x40bc11
push str.Invalid_setup_structure_size
call fcn.00404720
mov eax, dword [esi + 0x2c]
cmp eax, 1
jne 0x40bc23
cmp dword [esi + 0x38], 0
je 0x40bc23
mov bl, al
jmp 0x40bc6d
cmp eax, 2
jne 0x40bc6d
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x34]
push edi
push 0
push eax
xor bl, bl
call ecx
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x40bc49
push str.Invalid_two_pass_data
call fcn.00404720
push edi
call fcn.0046cfa3
mov dword [ebp + 0x5c], eax
mov edx, dword [esi + 0x30]
push edi
push eax
mov eax, dword [esi + 0x34]
push edx
call eax
mov edi, eax
mov eax, dword [ebp + 0x5c]
mov ecx, dword [eax]
add esp, 0x10
add ecx, eax
mov dword [esp + 0x58], ecx
test edi, edi
ja 0x40bc75
test bl, bl
je 0x40bc85
cmp dword [esi + 0x10], 1
je 0x40bc85
push str.Two_pass_mode_works_only_with_target_bitrate_encoding
call fcn.00404720
push 0x30
lea ecx, [esp + 0x2c]
push 0
push ecx
call fcn.0046efc0
push 0x2bc
lea edx, [esp + 0x280]
push 0
push edx
call fcn.0046efc0
lea eax, [esp + 0x40]
push eax
mov dword [ebp + 0x64], 0
call fcn.0042ac00
add esp, 0x1c
test bl, bl
je 0x40bcc9
mov dword [esp + 0x30], 1
jmp 0x40bcd6
xor ecx, ecx
cmp ecx, edi
sbb edx, edx
and edx, 2
mov dword [esp + 0x30], edx
mov eax, dword [esi + 0xc]
mov ecx, dword [ebp + 0x58]
xor ebx, ebx
mov dword [ebp + 0x48], eax
mov dword [ebp + 0x54], 0x10
mov dword [ebp + 0x2c], ebx
mov dword [ebp + 0x28], ebx
mov edx, dword [esi + 8]
mov dword [esp + 0x3c], eax
mov dword [esp + 0x38], eax
mov eax, edx
mov edi, 0x3e80
mov dword [ebp + 0x50], eax
mov dword [esp + 0x54], ecx
mov ecx, dword [esi + 8]
mov dword [ebp + 0x4c], ecx
mov dword [ebp + 0x74], ebx
cmp dword [esi + 4], 4
mov dword [esp + 0x40], edi
mov dword [esp + 0x44], edi
mov dword [esp + 0x48], edi
mov dword [esp + 0x4c], edi
mov dword [esp + 0x50], edi
mov dword [esp + 0x28], edx
jb 0x40bda5
cmp dword [esi], 0x4c
jae 0x40bd3d
push str.Invalid_setup_structure_size
call fcn.00404720
mov eax, dword [esi + 0x40]
sub eax, ebx
je 0x40bda5
sub eax, 1
je 0x40bd9b
sub eax, 1
je 0x40bd58
push str.Invalid_resampler_mode
call fcn.00404720
mov eax, dword [esi + 0x44]
mov dword [esp + 0x28], eax
mov dword [ebp + 0x4c], eax
call fcn.0040fc50
cmp eax, ebx
mov dword [ebp + 0x74], eax
jne 0x40bd78
push str.Failed_to_create_resampler
call fcn.00404720
mov edx, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x4c]
push edx
mov edx, dword [ebp + 0x50]
push ecx
push edx
push eax
call fcn.00410030
add esp, 0x10
test eax, eax
je 0x40bda5
push str.Failed_to_initialise_resampler
call fcn.00404720
push str.Bug:_optimal_mode_not_implemented_yet
call fcn.00404720
mov ecx, dword [ebp + 0x4c]
cmp ecx, 0x7d00
ja 0x40bdc6
je 0x40bddd
cmp ecx, edi
je 0x40bddd
cmp ecx, 0x5622
je 0x40bddd
cmp ecx, 0x5dc0
jmp 0x40bdd4
cmp ecx, 0xac44
je 0x40bddd
cmp ecx, 0xbb80
je 0x40bddd
mov byte [esp + 0x18], 0
jmp 0x40bded
cmp dword [ebp + 0x48], 2
mov byte [esp + 0x18], 1
mov byte [esp + 0x1c], 1
je 0x40bdf2
mov byte [esp + 0x1c], 0
cmp dword [esi + 4], 1
jb 0x40be13
cmp dword [esi], 0x24
jae 0x40be07
push str.Invalid_setup_structure_size
call fcn.00404720
mov eax, dword [esi + 0x20]
mov ebx, dword [esi + 0x1c]
mov dword [esp + 0x5c], eax
jmp 0x40be19
xor ebx, ebx
mov dword [esp + 0x5c], ebx
xor edx, edx
mov eax, 1
mov dword [ebp + 0x6c], edx
mov dword [ebp + 0x70], eax
cmp dword [esi + 4], 2
mov dword [esp + 0x10], ebx
jb 0x40be87
cmp dword [esi], 0x2c
jae 0x40be3f
push str.Invalid_setup_structure_size
call fcn.00404720
cmp byte [esp + 0x540], 0
je 0x40be81
mov eax, dword [esi + 0x24]
cmp eax, edx
je 0x40be59
mov ebx, 1
mov dword [esp + 0x10], ebx
cmp eax, 2
mov dword [ebp + 0x6c], eax
mov edx, dword [esi + 0x28]
mov dword [ebp + 0x54], edx
jne 0x40be87
cmp ecx, 0x7d00
jb 0x40be78
mov dword [ebp + 0x70], 4
jmp 0x40be87
cmp ecx, edi
sbb eax, eax
add eax, 2
jmp 0x40be84
mov dword [ebp + 0x6c], edx
mov dword [ebp + 0x70], eax
cmp ebx, 4
mov byte [ebp + 0x61], 0
ja case.default.0x40be94
jmp dword [ebx*4 + 0x40c4a0]
mov byte [ebp + 0x62], 0
mov byte [ebp + 0x60], 0
jmp 0x40bed6
mov byte [ebp + 0x61], 1
cmp byte [esp + 0x18], 0
jne 0x40beba
push str.Unsupported_encoding_configuration
call fcn.00404720
mov byte [ebp + 0x62], 0
jmp 0x40bed2
cmp byte [esp + 0x18], 0
je 0x40beb0
cmp byte [esp + 0x1c], 0
je 0x40beb0
mov byte [ebp + 0x62], 1
mov byte [ebp + 0x60], 1
fldz
mov eax, dword [esi + 0x10]
test eax, eax
fstp dword [esp + 0x14]
mov edx, dword [esi + 0x14]
fld dword [esi + 0x14]
mov dword [esp + 0x20], eax
je 0x40bf50
fstp st(0)
jbe 0x40c0d1
cmp eax, 2
ja 0x40c0d1
test ebx, ebx
jne 0x40c013
cmp byte [esp + 0x18], bl
je 0x40bf1f
mov ecx, dword [esi + 0xc]
mov eax, edx
call fcn.0040a1f0
test al, al
je 0x40bf1f
lea eax, [ebx + 1]
jmp 0x40bf21
xor eax, eax
cmp byte [esp + 0x1c], 0
mov byte [ebp + 0x60], al
je 0x40bf46
mov ecx, dword [esi + 0xc]
mov eax, edx
call fcn.0040a240
test al, al
je 0x40bf46
mov eax, 1
mov byte [ebp + 0x62], al
jmp 0x40c013
xor eax, eax
mov byte [ebp + 0x62], al
jmp 0x40c013
test ebx, ebx
jne 0x40bff1
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x18]
push ecx
push edx
lea eax, [esp + 0x1c]
push eax
mov eax, dword [ebp + 0x48]
push ecx
lea ecx, [esp + 0x20]
fstp dword [esp]
call fcn.0040a440
mov eax, dword [esp + 0x20]
add eax, 0xffffffff
add esp, 0x10
cmp eax, 3
mov byte [ebp + 0x61], bl
ja case.default.0x40bf89
jmp dword [eax*4 + 0x40c4b4]
mov byte [ebp + 0x62], 0
mov byte [ebp + 0x60], 0
jmp 0x40c013
mov byte [ebp + 0x61], 1
cmp byte [esp + 0x18], 0
jne 0x40bfaf
push str.Unsupported_encoding_configuration
call fcn.00404720
mov byte [ebp + 0x60], 1
mov byte [ebp + 0x62], 0
jmp 0x40c013
cmp byte [esp + 0x18], 0
je 0x40beb0
cmp byte [esp + 0x1c], 0
je 0x40beb0
mov byte [ebp + 0x60], 1
mov byte [ebp + 0x62], 1
jmp 0x40c013
lea ecx, [esp + 0x60]
call fcn.004045c0
push 0x4bc504
lea ecx, [esp + 0x64]
push ecx
call fcn.0046d279
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push edx
push eax
mov eax, dword [ebp + 0x48]
lea ecx, [esp + 0x1c]
push ecx
push ecx
lea ecx, [esp + 0x20]
fstp dword [esp]
call fcn.0040a440
add esp, 0x10
push esi
call fcn.0040b6f0
mov ebx, eax
mov al, byte [ebp + 0x60]
add esp, 4
test al, al
mov dword [esp + 0x34], ebx
je 0x40c045
cmp byte [ebp + 0x62], 0
je 0x40c03e
mov dword [esp + 0x3c], 1
mov ecx, 4
jmp 0x40c04a
mov ecx, 3
jmp 0x40c04a
mov ecx, 2
test al, al
mov dword [esp + 0x2c], ecx
je 0x40c063
cmp byte [ebp + 0x61], 0
jne 0x40c063
mov eax, dword [esp + 0x28]
cdq
sub eax, edx
sar eax, 1
jmp 0x40c067
mov eax, dword [esp + 0x28]
cmp byte [ebp + 0x61], 0
je 0x40c072
mov ecx, 2
lea edx, [esp + 0x270]
push edx
mov edx, dword [esp + 0x40]
push edx
push ebx
push eax
push ecx
call fcn.0042b8d0
mov edi, 0xff
add esp, 0x14
cmp dword [esi + 4], edi
jne 0x40c0a8
cmp dword [esi], 0x54
je 0x40c0a3
push str.Invalid_setup_structure_size
call fcn.00404720
mov eax, dword [esi + 0x4c]
jmp 0x40c0af
lea eax, [esp + 0x270]
cmp dword [esp + 0x30], 0
mov dword [esp + 0x24], eax
je 0x40c0be
fld1
jmp 0x40c0f1
mov ecx, dword [esp + 0x20]
sub ecx, 0
je 0x40c0ed
sub ecx, 1
je 0x40c0e4
sub ecx, 1
je 0x40c0db
push str.invalid_encoding_mode
call fcn.00404720
mov dword [eax + 0xc], 1
jmp 0x40c0fb
mov dword [eax + 0xc], 2
jmp 0x40c0fb
fld dword [esp + 0x14]
fstp dword [eax + 0x1c]
mov dword [eax + 0xc], 4
cmp byte [ebp + 0x60], 0
je 0x40c3ae
mov ebx, dword [esp + 0x28]
mov eax, ebx
cdq
sub eax, edx
sar eax, 1
cmp byte [ebp + 0x61], 0
mov dword [esp + 0x1c], eax
je 0x40c124
mov dword [esp + 0x1c], ebx
add ebx, ebx
mov dword [esp + 0x28], ebx
push 0x168
lea eax, [esp + 0x10c]
push 0
push eax
call fcn.0046efc0
add esp, 0xc
cmp byte [ebp + 0x62], 0
mov eax, 1
jne 0x40c149
mov eax, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x58]
push ecx
mov ecx, dword [esp + 0x38]
push ebx
lea edx, [esp + 0x110]
push edx
push ecx
push eax
call fcn.0045b8c0
add esp, 0x14
test eax, eax
je 0x40c172
push str.Could_not_initialize_SBR
call fcn.00404720
mov edx, dword [esp + 0x10c]
lea ecx, [ebp + 0x40]
push edx
call fcn.0040b780
xor ebx, ebx
cmp dword [esi + 4], edi
mov dword [esp + 0x18], ebx
jne 0x40c1a3
cmp dword [esi], 0x54
je 0x40c19c
push str.Invalid_setup_structure_size
call fcn.00404720
mov eax, dword [esi + 0x50]
mov dword [esp + 0x18], eax
cmp dword [ebp + 0x44], ebx
mov dword [esp + 0x20], ebx
jbe 0x40c29b
lea ecx, [esp + 0x40]
mov dword [esp + 0x10], 0
mov dword [esp + 0x14], ecx
lea ebx, [esp + 0x114]
jmp 0x40c1d0
mov edi, dword [ebp + 0x40]
add edi, dword [esp + 0x10]
lea eax, [ebx - 4]
mov ecx, 0xb
mov esi, eax
rep movsd dword es:[edi], dword [esi]
cmp dword [eax], 0
je 0x40c278
mov edx, dword [esp + 0x28]
mov eax, dword [ebx]
mov ecx, dword [ebx + 0x24]
push edx
push eax
push ecx
call fcn.0045bf60
add esp, 0xc
test eax, eax
je 0x40c386
push 0x9c
lea edx, [esp + 0x70]
push 0
push edx
call fcn.0046efc0
lea eax, [esp + 0x78]
push eax
call fcn.0045c100
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x2c]
xor ecx, ecx
cmp byte [ebp + 0x62], cl
push edx
mov edx, dword [ebx + 0x24]
setne cl
push 0x5dc0
push 8
push eax
lea eax, [esp + 0x8c]
mov dword [esp + 0x104], ecx
mov ecx, dword [ebx]
push ecx
push edx
push eax
call fcn.0045bfc0
add esp, 0x2c
test eax, eax
je 0x40c390
mov ecx, dword [esp + 0x14]
push ecx
mov ecx, dword [ebp + 0x40]
add ecx, dword [esp + 0x14]
lea edx, [esp + 0x70]
push edx
call fcn.0040b2c0
mov eax, dword [esp + 0x20]
add dword [esp + 0x14], 4
add dword [esp + 0x10], 0x30
add eax, 1
add ebx, 0x2c
cmp eax, dword [ebp + 0x44]
mov dword [esp + 0x20], eax
jb 0x40c1d0
xor ebx, ebx
cmp byte [ebp + 0x62], 0
mov byte [ebp + 0x63], 0
jne 0x40c39a
cmp byte [ebp + 0x61], 0
jne 0x40c2b3
mov byte [ebp + 0x63], 1
mov eax, dword [ebp + 0x48]
lea ecx, [ebp + 0x80]
push eax
call fcn.0040b840
cmp dword [ebp + 0x44], ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ebx
jbe 0x40c366
xor ebx, ebx
jmp 0x40c2e0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + ecx*4 + 0x40]
mov ecx, dword [esp + 0x1c]
add edx, edx
mov eax, ecx
sub eax, edx
imul eax, eax, 0x3e8
xor edx, edx
div ecx
xor edi, edi
mov dword [esp + 0x20], eax
mov eax, dword [ebp + 0x40]
cmp dword [ebx + eax + 4], edi
jbe 0x40c34f
mov esi, dword [esp + 0x14]
lea esi, [esi + esi*8]
shl esi, 5
jmp 0x40c320
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp + 0x80]
push 2
push ecx
add edx, esi
push edx
call fcn.00429f20
mov eax, dword [ebp + 0x40]
add dword [esp + 0x20], 1
add edi, 1
add esp, 0xc
add esi, 0x120
cmp edi, dword [ebx + eax + 4]
jb 0x40c320
mov eax, dword [esp + 0x10]
add eax, 1
add ebx, 0x30
cmp eax, dword [ebp + 0x44]
mov dword [esp + 0x10], eax
jb 0x40c2e0
mov ecx, dword [ebp + 0x80]
mov edx, dword [ecx + 0x118]
mov eax, dword [esp + 0x1c]
mov dword [ebp + 0x30], edx
mov dword [ebp + 0x34], 0x601
mov dword [esp + 0x28], eax
jmp 0x40c3e3
push str.no_valid_SBR_configuration_found
call fcn.00404720
push str.could_not_adjust_SBR_settings
call fcn.00404720
mov eax, dword [esp + 0x1c]
mov dword [ebp + 0x30], ebx
mov dword [ebp + 0x34], 0x611
mov dword [esp + 0x28], eax
jmp 0x40c3e3
mov ecx, dword [eax + 8]
mov dword [esp + 0x40], ecx
mov edx, dword [eax + 8]
mov dword [esp + 0x44], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x48], ecx
mov edx, dword [eax + 8]
mov dword [esp + 0x4c], edx
mov eax, dword [eax + 8]
mov dword [esp + 0x50], eax
mov byte [ebp + 0x63], 0
mov dword [ebp + 0x30], 0xa
mov dword [ebp + 0x34], 0
xor eax, eax
cmp dword [ebp + 0x6c], eax
je 0x40c3ef
mov eax, 0xc
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x58]
push eax
mov eax, dword [esp + 0x28]
push ecx
push edx
push eax
lea ecx, [esp + 0x38]
push ecx
lea edx, [ebp + 0x38]
push edx
call fcn.0042ac40
add esp, 0x18
test eax, eax
je 0x40c41e
push 0x48a460
call fcn.00404720
cmp dword [ebp + 0x6c], 0
je 0x40c443
mov eax, dword [ebp + 0x54]
mov ecx, dword [ebp + 0x70]
mov edx, dword [esp + 0x38]
push eax
mov eax, dword [esp + 0x2c]
push 1
push ecx
push edx
push eax
call fcn.00444480
add esp, 0x14
mov dword [ebp + 0x3c], eax
mov edx, dword [ebp]
mov eax, dword [edx + 0x14]
mov ecx, ebp
mov byte [ebp + 0x68], 0
call eax
mov ecx, dword [ebp + 0x48]
mov edx, dword [ebp]
imul ecx, eax
mov edx, dword [edx + 0x20]
push ecx
push 0
mov ecx, ebp
call edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x51c
ret 0x14
push 0
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x68]
mov dword [esp + 0x2c], str.Bug_check
call fcn.0046d1c5
push 0x4bc504
lea ecx, [esp + 0x64]
push ecx
mov dword [esp + 0x68], 0x4a6b74
call fcn.0046d279
wait
mov esi, -1097138112
inc eax
add byte [ecx - 0x3fffbf42], ch
mov esi, 0xbea50040
inc eax
add byte [eax - 0x61ffbf41], dl
mov edi, 0xbfb90040
inc eax
add byte [edx - 0x33ffbf41], bl
int3