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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
mov dword [esp], 0x101a0
call sym._malloc
mov ebx, eax
mov dword [esp + 0x34], eax
test eax, eax
je 0x404050
xor eax, eax
mov ecx, 0x4068
mov edi, ebx
mov edx, 3
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0xb0]
mov dword [ebx + 0x10194], 0xffffffff
mov dword [ebx], eax
lea eax, [ebx + 0x170]
mov dword [esp + 0x3c], eax
mov dword [ebx + 0x10174], eax
mov dword [ebx + 0x10170], 0
mov dword [ebx + 0x10178], 8
mov dword [ebx + 0x1017c], 0
mov dword [ebx + 0x10180], 0
mov byte [ebx + 0x154], 0xff
mov dword [ebx + 0x15c], 0x4103f1
mov eax, ebx
mov edi, 0x4103f6
call sym._mpc_demux_fill
mov esi, dword [ebx + 0x10174]
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x404440
mov dword [ebx + 0x160], 0
mov eax, dword [ebx]
mov dword [esp], eax
call dword [eax + 0xc]
xor ecx, ecx
mov dword [ebx + 0x168], eax
mov dword [ebx + 0x164], eax
mov edx, 4
mov eax, ebx
call sym._mpc_demux_fill
mov ecx, dword [ebx + 0x10178]
sub ecx, 8
mov edi, dword [ebx + 0x10174]
mov eax, ecx
xor edx, edx
sar eax, 3
neg eax
add eax, edi
mov edi, ecx
and edi, 7
mov dword [ebx + 0x10174], eax
mov dword [ebx + 0x10178], edi
mov dl, byte [eax - 1]
mov cl, byte [eax]
shl edx, 8
and ecx, 0xff
or edx, ecx
mov ecx, edi
sar edx, cl
mov byte [esp + 0x8c], dl
lea edx, [eax + 1]
mov dword [ebx + 0x10174], edx
xor edx, edx
mov dl, byte [eax]
mov cl, byte [eax + 1]
shl edx, 8
and ecx, 0xff
or edx, ecx
mov ecx, edi
sar edx, cl
mov byte [esp + 0x8d], dl
lea edx, [eax + 2]
mov dword [ebx + 0x10174], edx
mov dl, byte [edx - 1]
mov cl, byte [eax + 2]
and edx, 0xff
and ecx, 0xff
shl edx, 8
or edx, ecx
mov ecx, edi
sar edx, cl
mov byte [esp + 0x8e], dl
lea edx, [eax + 3]
mov dword [ebx + 0x10174], edx
mov ecx, edi
mov dl, byte [edx - 1]
mov al, byte [eax + 3]
and edx, 0xff
and eax, 0xff
shl edx, 8
mov edi, 0x4103fa
or edx, eax
sar edx, cl
movzx eax, dl
mov byte [esp + 0x8f], al
mov dl, al
lea eax, [esp + 0x8c]
mov ecx, 3
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
seta byte [esp + 0x30]
setb cl
cmp byte [esp + 0x30], cl
jne 0x404060
mov eax, edx
sar dl, 4
and eax, 0xf
mov dword [ebx + 0x10], eax
mov byte [ebx + 0x154], dl
cmp eax, 7
je 0x40451b
mov eax, dword [ebx + 0x10184]
test eax, eax
je 0x404040
mov dword [esp], eax
call sym._free
mov dword [esp], ebx
call sym._free
mov dword [esp + 0x34], 0
mov eax, dword [esp + 0x34]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov edi, str.MPCK
mov ecx, 4
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x40402e
mov edx, 0xb
xor ecx, ecx
lea edi, [ebx + 0x10174]
mov eax, ebx
lea ebp, [esp + 0x70]
call sym._mpc_demux_fill
mov dword [esp + 0x38], edi
mov dword [esp + 4], ebp
mov dword [esp], edi
call sym._mpc_bits_get_block
lea edx, [esp + 0x60]
mov dword [esp + 0x40], eax
lea eax, [ebx + 8]
mov dword [esp + 0x1c], edx
mov dword [esp + 0x4c], eax
nop
lea esi, [esi]
mov ecx, 2
mov esi, ebp
mov edi, 0x4103ee
repe cmpsb byte [esi], byte es:[edi]
je 0x404330
mov al, byte [esp + 0x70]
sub eax, 0x41
cmp al, 0x19
ja 0x40402e
mov al, byte [esp + 0x71]
cmp al, 0x40
jle 0x40402e
cmp al, 0x5a
jg 0x40402e
mov ecx, dword [esp + 0x7c]
mov edx, dword [esp + 0x78]
test ecx, ecx
jne 0x40402e
cmp edx, 0xeef5
ja 0x40402e
xor ecx, ecx
add edx, 0xb
mov eax, ebx
call sym._mpc_demux_fill
mov ecx, dword [esp + 0x78]
mov esi, dword [esp + 0x7c]
mov dword [esp + 0x30], ecx
test esi, esi
jne 0x40402e
cmp eax, ecx
jbe 0x40402e
mov edi, 0x410403
mov ecx, 2
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x4041c0
mov edi, 0x410406
mov ecx, 2
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x4041f0
mov edi, 0x410409
mov ecx, 2
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x404210
mov edi, 0x41040c
mov ecx, 2
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x404231
mov edi, 0x41040f
mov ecx, 2
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
je 0x404314
nop
mov eax, dword [ebx + 0x10174]
mov edi, dword [esp + 0x30]
add eax, edi
mov dword [ebx + 0x10174], eax
mov eax, dword [esp + 0x38]
mov dword [esp + 4], ebp
mov dword [esp], eax
call sym._mpc_bits_get_block
mov dword [esp + 0x40], eax
jmp 0x4040b0
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x38]
mov eax, dword [esp + 0x4c]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._streaminfo_read_header_sv8
test eax, eax
js 0x40402e
mov edx, dword [esp + 0x78]
mov dword [esp + 0x30], edx
jmp 0x404190
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x4c]
mov dword [esp + 4], ecx
mov dword [esp], esi
call sym._streaminfo_gain
mov edi, dword [esp + 0x78]
mov dword [esp + 0x30], edi
jmp 0x404190
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x4c]
mov dword [esp + 4], eax
mov dword [esp], edx
call sym._streaminfo_encoder_info
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
jmp 0x404190
mov eax, dword [ebx]
mov esi, dword [ebx + 0x10174]
mov dword [esp], eax
call dword [eax + 8]
mov edi, dword [ebx + 0x10170]
sub eax, edi
mov ecx, dword [ebx + 0x10178]
mov edx, 8
mov edi, dword [esp + 0x38]
lea eax, [esi + eax]
mov esi, dword [esp + 0x3c]
sub edx, ecx
sub eax, esi
lea esi, [esp + 0x80]
mov dword [esp], edi
lea eax, [edx + eax*8]
mov dword [esp + 4], esi
mov dword [esp + 0x50], eax
call sym._mpc_bits_get_size
mov eax, dword [esp + 0x40]
mov ecx, dword [esp + 0x50]
mov edx, eax
mov dword [esp + 0x40], eax
sar edx, 0x1f
mov eax, ebx
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x80]
sub edx, dword [esp + 0x40]
lea edx, [ecx + edx*8]
mov ecx, 0xb
call sym._mpc_demux_seek
test eax, eax
js 0x40402e
lea edx, [esp + 0x60]
mov dword [esp], edi
mov dword [esp + 4], edx
call sym._mpc_bits_get_block
mov edi, 0x41040f
mov dword [esp + 0x54], eax
mov ecx, 2
mov esi, dword [esp + 0x1c]
repe cmpsb byte [esi], byte es:[edi]
seta al
setb dl
sub al, dl
movsx ecx, al
mov dword [esp + 0x18], ecx
test ecx, ecx
je 0x404491
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x50]
add ecx, 0xb
mov eax, ebx
call sym._mpc_demux_seek
test eax, eax
js 0x40402e
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x30], ecx
jmp 0x404190
mov eax, ebx
call sym._mpc_demux_ST
test eax, eax
js 0x40402e
mov esi, dword [esp + 0x78]
mov dword [esp + 0x30], esi
jmp 0x404190
mov edi, dword [ebx + 0x10174]
mov edx, dword [esp + 0x40]
sub edi, edx
mov esi, dword [ebx + 0x10]
mov dword [ebx + 0x10174], edi
test esi, esi
je 0x40402e
mov eax, dword [ebx + 0x10184]
test eax, eax
je 0x404375
mov ecx, dword [esp + 0x4c]
mov dword [esp], ecx
call sym._mpc_decoder_init
mov dword [ebx + 4], eax
mov eax, dword [esp + 0x34]
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret
mov esi, dword [ebx + 0x2c]
mov dword [ebx + 0x10188], 6
cmp esi, 6
ja 0x404427
mov eax, 0x12000
xor edx, edx
mov esi, 6
mov edi, dword [ebx + 0x40]
mov ebp, dword [ebx + 0x44]
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
mov dword [esp + 0xc], edx
mov dword [esp], edi
call sym.___udivdi3
add eax, 2
cmp eax, 0x10000
jbe 0x4043f3
nop
lea esi, [esi]
inc esi
mov eax, 0x480
mov ecx, esi
mov dword [esp], edi
shl eax, cl
mov edx, eax
mov dword [esp + 8], eax
sar edx, 0x1f
mov dword [esp + 4], ebp
mov dword [esp + 0xc], edx
call sym.___udivdi3
add eax, 2
cmp eax, 0x10000
ja 0x4043c0
mov dword [ebx + 0x10188], esi
shl eax, 2
mov dword [esp], eax
call sym._malloc
mov esi, eax
mov dword [ebx + 0x10184], eax
test eax, eax
je 0x404040
mov dword [esp], ebx
call sym._mpc_demux_pos
mov dword [esi], eax
mov dword [ebx + 0x1018c], 1
jmp 0x404357
mov eax, 0x480
mov ecx, esi
shl eax, cl
mov edx, eax
mov dword [ebx + 0x10188], esi
sar edx, 0x1f
jmp 0x404397
xor ecx, ecx
lea esi, [ebx + 0x10174]
mov edx, 0xa
mov eax, ebx
call sym._mpc_demux_fill
mov edx, 0x18
mov eax, esi
call sym._mpc_bits_read
mov edx, 0x10
mov eax, esi
call sym._mpc_bits_read
mov edx, 8
mov eax, esi
call sym._mpc_bits_read
mov edi, eax
test al, 0xf
je 0x40455b
mov dword [ebx + 0x160], 0xffffffff
jmp 0x40402e
mov eax, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
mov esi, eax
mov edi, edx
add esi, dword [esp + 0x80]
mov ecx, dword [esp + 0x54]
mov dword [esp + 0x58], esi
mov esi, dword [esp + 0x40]
adc edi, dword [esp + 0x84]
sub dword [esp + 0x58], esi
mov dword [esp + 0x5c], edi
mov edx, dword [esp + 0x58]
mov edi, dword [esp + 0x44]
mov dword [ebx + 0x10194], 0xffffffff
sbb dword [esp + 0x5c], edi
add ecx, edx
mov edi, dword [esp + 0x50]
mov edx, eax
mov eax, ebx
lea ecx, [edi + ecx*8]
mov dword [ebx + 0x10190], ecx
xor ecx, ecx
call sym._mpc_demux_fill
mov edx, dword [esp + 0x18]
cmp edx, dword [esp + 0x6c]
jb 0x40402e
cmp eax, dword [esp + 0x68]
jb 0x40402e
mov eax, ebx
call sym._mpc_demux_ST
test eax, eax
jns 0x4042ed
jmp 0x40402e
mov ecx, 1
mov edx, 0x18
mov eax, ebx
call sym._mpc_demux_fill
cmp eax, 0x17
jbe 0x40402e
lea eax, [ebx + 0x10174]
lea esi, [ebx + 8]
mov dword [esp + 4], eax
mov dword [esp + 0x4c], esi
mov dword [esp], esi
call sym._streaminfo_read_header_sv7
test eax, eax
jns 0x40434d
jmp 0x40402e
mov edx, 8
mov eax, esi
call sym._mpc_bits_read
mov edx, 8
mov ebp, eax
mov eax, esi
call sym._mpc_bits_read
mov edx, 8
mov cl, al
mov eax, esi
mov byte [esp + 0x2c], cl
call sym._mpc_bits_read
mov edx, 8
mov byte [esp + 0x30], al
mov eax, esi
call sym._mpc_bits_read
mov cl, byte [esp + 0x2c]
mov esi, eax
mov al, cl
or eax, ebp
mov edx, esi
or eax, dword [esp + 0x30]
or dl, al
js 0x404482
xor edx, edx
mov eax, ebp
and eax, 0xff
mov dl, cl
shl edx, 0xe
shl eax, 0x15
or eax, edx
mov edx, esi
and edx, 0xff
or eax, edx
xor edx, edx
mov dl, byte [esp + 0x30]
shl edx, 7
or eax, edx
and edi, 0x10
lea esi, [eax + 0xa]
je 0x4045e2
lea esi, [eax + 0x14]
mov eax, dword [ebx]
mov ecx, dword [esp + 0x3c]
mov dword [ebx + 0x10170], 0
mov dword [ebx + 0x10174], ecx
mov dword [ebx + 0x10178], 8
mov dword [ebx + 0x1017c], 0
mov dword [ebx + 0x10180], 0
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [eax + 4]
test al, al
je 0x404482
mov dword [ebx + 0x160], esi
jmp 0x403f09