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

Disassembly:
sub esp, 0x1c
mov eax, dword [esp + 0x78]
xor edx, edx
push ebx
push ebp
push esi
mov eax, dword [eax]
div dword [esp + 0x3c]
push edi
mov edi, ecx
mov ebx, eax
lea eax, [esp + 0x1c]
mov dword [esp + 0x14], ebx
push dword [edi + 0x2040]
push dword [esp + 0x88]
push eax
call sym.libalac.dll_BitBufferInit
mov ebp, dword [esp + 0x58]
add esp, 0xc
cmp ebp, 2
jne 0x1000280f
push 3
lea eax, [esp + 0x20]
push 1
push eax
call sym.libalac.dll_BitBufferWrite
push 4
lea eax, [esp + 0x2c]
push 0
push eax
call sym.libalac.dll_BitBufferWrite
add esp, 0x18
lea eax, [esp + 0x1c]
cmp byte [edi + 6], 0
mov ecx, edi
push ebx
push 0
push ebp
push dword [esp + 0x8c]
push eax
jne 0x100027b0
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeStereo_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
jmp 0x100027b5
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeStereoFast_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
test eax, eax
jne 0x10002805
push 3
lea eax, [esp + 0x20]
push 7
push eax
call sym.libalac.dll_BitBufferWrite
lea eax, [esp + 0x28]
push 1
push eax
call sym.libalac.dll_BitBufferByteAlign
lea eax, [esp + 0x30]
push eax
call sym.libalac.dll_BitBufferGetPosition
mov ecx, dword [esp + 0xa0]
add esp, 0x18
shr eax, 3
mov dword [ecx], eax
mov ecx, dword [edi + 0x2038]
add dword [edi + 0x2030], eax
cmp ecx, eax
cmovbe ecx, eax
xor eax, eax
mov dword [edi + 0x2038], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x5c
cmp ebp, 1
jne 0x1000285c
push 3
lea eax, [esp + 0x20]
push 0
push eax
call sym.libalac.dll_BitBufferWrite
push 4
lea eax, [esp + 0x2c]
push 0
push eax
call sym.libalac.dll_BitBufferWrite
add esp, 0x18
lea eax, [esp + 0x1c]
mov ecx, edi
push ebx
push 0
push ebp
push dword [esp + 0x8c]
push eax
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeMono_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
test eax, eax
je 0x100027b9
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x5c
mov eax, dword [esp + 0x80]
xor esi, esi
mov dword [esp + 0x10], eax
movsx eax, word [edi + 4]
add eax, 7
mov byte [esp + 0x84], 0
cdq
and edx, 7
mov byte [esp + 0x30], 0
add eax, edx
mov byte [esp + 0x80], 0
sar eax, 3
mov dword [esp + 0x18], eax
test ebp, ebp
je 0x100027b9
nop word [eax + eax]
lea ecx, [esi + esi*2]
mov ebx, 7
shl ebx, cl
lea eax, [esp + 0x1c]
and ebx, dword [ebp*4 + 0x100080cc]
shr ebx, cl
push 3
push ebx
push eax
call sym.libalac.dll_BitBufferWrite
mov eax, ebx
add esp, 0xc
sub eax, 0
je 0x10002958
sub eax, 1
je 0x10002914
sub eax, 2
jne 0x100029ae
movzx eax, byte [esp + 0x80]
push 4
push eax
lea eax, [esp + 0x24]
push eax
call sym.libalac.dll_BitBufferWrite
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
add esp, 0xc
mov ecx, edi
push dword [esp + 0x14]
push esi
push ebp
push ebx
push eax
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeMono_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
inc byte [esp + 0x80]
jmp 0x10002988
movzx eax, byte [esp + 0x84]
push 4
push eax
lea eax, [esp + 0x24]
push eax
call sym.libalac.dll_BitBufferWrite
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
add esp, 0xc
mov ecx, edi
push dword [esp + 0x14]
push esi
push ebp
push ebx
push eax
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeStereo_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
mov ecx, dword [esp + 0x18]
inc byte [esp + 0x84]
lea edx, [ecx + ecx]
mov ecx, 2
jmp 0x10002991
movzx eax, byte [esp + 0x30]
push 4
push eax
lea eax, [esp + 0x24]
push eax
call sym.libalac.dll_BitBufferWrite
mov ebx, dword [esp + 0x1c]
lea eax, [esp + 0x28]
add esp, 0xc
mov ecx, edi
push dword [esp + 0x14]
push esi
push ebp
push ebx
push eax
call sym.libalac.dll_protected:_int___thiscall_ALACEncoder::EncodeMono_struct_BitBuffer___void___unsigned_int__unsigned_int__unsigned_int_
inc byte [esp + 0x30]
mov edx, dword [esp + 0x18]
mov ecx, 1
add esi, ecx
test eax, eax
jne 0x10002805
add ebx, edx
mov dword [esp + 0x10], ebx
cmp esi, ebp
jb 0x100028a0
jmp 0x100027b9
push ebx
push str.That_aint_right____u__n
call sym.libalac.dll_printf
add esp, 8
mov eax, 0xffffffce
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret 0x5c