Function at 0x48ec90
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
mov esi, dword [esp + 0x20]
cmp esi, 0xf
push edi
je 0x48ecc1
cmp esi, 0x1f
je 0x48ecc1
push str.MOD_must_be_15_or_31_instruments
push 0x4b06c4
call fcn.00492257
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push 0x558
call fcn.0048f240
mov edi, eax
add esp, 4
test edi, edi
jne 0x48ecf0
push 0x4b1994
push 0x4b06c4
call fcn.00492257
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
lea eax, [esi + esi*2]
shl eax, 4
push eax
call fcn.0048f240
add esp, 4
mov dword [edi + 0x20], eax
test eax, eax
jne 0x48ed28
push str.Unable_to_allocate_enough_memory_for_SAMPLE_INFO_structure
push 0x4b06c4
call fcn.00492257
push edi
call fcn.0048b880
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
lea ecx, [esi + esi*8]
shl ecx, 2
push ecx
call fcn.0048f240
add esp, 4
mov dword [edi + 0x2c], eax
test eax, eax
jne 0x48ed45
push str.Unable_to_allocate_enough_memory_for_SAMPLE_structure
jmp 0x48ed0b
mov dword [edi + 0x550], esi
mov dword [edi + 0x554], 0x40
mov dword [edi + 0x53c], 6
mov dword [edi + 0x540], 0x7d
xor eax, eax
lea ecx, [edi + 0x438]
mov edx, eax
and edx, reloc.zlib.dll_Ordinal_3
jns 0x48ed80
dec edx
or edx, 0xfffffffc
inc edx
je 0x48ed8f
cmp edx, 3
je 0x48ed8f
mov dword [ecx], 0xff
jmp 0x48ed95
mov dword [ecx], 0
inc eax
add ecx, 4
cmp eax, 0x40
jl 0x48ed71
mov ebx, dword [esp + 0x20]
push 0x4b1a40
push ebx
call fcn.00491550
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x48edd9
push ebx
push 0x4b1a44
push 0x4b06c4
call fcn.00492257
push edi
call fcn.0048b880
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push ebp
push 0x14
push edi
call fcn.004915e0
add esp, 0xc
test esi, esi
jle 0x48ee6d
xor ebx, ebx
mov dword [esp + 0x20], esi
mov eax, dword [edi + 0x20]
mov esi, ebx
push 0x16
push ebp
add esi, eax
call fcn.004915c0
push ebp
call fcn.00491630
push ebp
mov dword [esi], eax
call fcn.00491600
push ebp
mov dword [esi + 4], eax
call fcn.00491600
push ebp
mov dword [esi + 0xc], eax
call fcn.00491630
shl eax, 1
push ebp
mov dword [esi + 0x14], eax
call fcn.00491630
mov ecx, dword [esi + 4]
xor edx, edx
add esp, 0x1c
mov dword [esi + 0x18], eax
mov dword [esi + 8], edx
mov ecx, dword [ecx*4 + 0x4b18c4]
mov dword [esi + 4], ecx
mov ecx, dword [esi]
cmp ecx, 1
jne 0x48ee50
mov dword [esi], edx
jmp 0x48ee54
add ecx, ecx
mov dword [esi], ecx
cmp eax, 1
je 0x48ee5c
lea edx, [eax + eax]
mov eax, dword [esp + 0x20]
add ebx, 0x30
dec eax
mov dword [esi + 0x18], edx
mov dword [esp + 0x20], eax
jne 0x48edf3
push ebp
call fcn.00491600
push ebp
mov dword [edi + 0x30], eax
call fcn.00491600
add esp, 8
mov dword [edi + 0x544], eax
lea esi, [edi + 0x38]
mov ebx, 0x80
push ebp
call fcn.00491600
mov dword [esi], eax
add esp, 4
add esi, 4
dec ebx
jne 0x48ee8d
lea eax, [edi + 0x38]
push 0x80
push eax
call fcn.0048f210
mov dword [edi + 0x34], eax
mov eax, dword [esp + 0x2c]
add esp, 8
cmp eax, 0x1f
jne 0x48ef14
push ebp
lea eax, [esp + 0x1c]
push 4
push eax
call fcn.004915e0
mov edx, str.M.K.
mov eax, str.32FW
add esp, 0xc
xor ecx, ecx
mov eax, dword [eax]
mov esi, dword [edx]
cmp eax, esi
je 0x48ef01
mov eax, edx
mov ebx, dword [edx]
lea esi, [esp + 0x18]
mov esi, dword [esi]
cmp esi, ebx
je 0x48ef01
mov ebx, dword [eax + 6]
add eax, 6
mov esi, str.32FW
inc ecx
mov edx, eax
mov esi, dword [esi]
cmp esi, ebx
jne 0x48eee1
lea ecx, [ecx + ecx*2]
movsx edx, byte [ecx*2 + 0x4b1719]
mov dword [edi + 0x548], edx
jmp 0x48ef1e
mov dword [edi + 0x548], 4
mov eax, dword [edi + 0x34]
shl eax, 3
push eax
call fcn.0048f240
add esp, 4
mov dword [edi + 0x24], eax
test eax, eax
jne 0x48ef3e
push 0x4b1a60
jmp 0x48f164
mov eax, dword [edi + 0x34]
xor ebx, ebx
test eax, eax
jle 0x48ef74
mov eax, dword [edi + 0x548]
mov ecx, dword [edi + 0x24]
lea edx, [eax + eax*4]
lea esi, [ecx + ebx*8]
shl edx, 8
push edx
call fcn.0048f240
add esp, 4
mov dword [esi], eax
test eax, eax
je 0x48f0c1
mov eax, dword [edi + 0x34]
inc ebx
cmp ebx, eax
jl 0x48ef47
mov ecx, dword [edi + 0x34]
xor eax, eax
test ecx, ecx
jle 0x48ef90
mov ecx, dword [edi + 0x24]
inc eax
mov dword [ecx + eax*8 - 4], 0x40
mov ecx, dword [edi + 0x34]
cmp eax, ecx
jl 0x48ef7d
mov ecx, dword [edi + 0x34]
xor eax, eax
test ecx, ecx
mov dword [esp + 0x20], eax
jle 0x48f032
mov ecx, dword [edi + 0x548]
mov edx, dword [edi + 0x24]
shl ecx, 6
mov esi, dword [edx + eax*8]
xor ebx, ebx
test ecx, ecx
jle 0x48f022
push ebp
call fcn.00491670
mov edx, eax
mov ecx, eax
sar edx, 0x18
sar ecx, 0xc
and edx, 0xf0
and ecx, 0xf
add edx, ecx
mov ecx, eax
mov dword [esi], edx
mov edx, eax
sar ecx, 0x10
sar edx, 8
and ecx, 0xfff
add esp, 4
and edx, 0xf
and eax, 0xff
test ecx, ecx
mov dword [esi + 4], ecx
mov dword [esi + 0xc], edx
mov dword [esi + 0x10], eax
mov dword [esi + 8], 0
je 0x48f00d
mov eax, 0x369e9a
cdq
idiv ecx
mov dword [esi + 4], eax
mov eax, dword [edi + 0x548]
add esi, 0x14
inc ebx
shl eax, 6
cmp ebx, eax
jl 0x48efb6
mov eax, dword [esp + 0x20]
mov ecx, dword [edi + 0x34]
inc eax
cmp eax, ecx
mov dword [esp + 0x20], eax
jl 0x48efa1
mov ecx, dword [esp + 0x24]
xor eax, eax
cmp ecx, eax
mov dword [esp + 0x14], eax
jle 0x48f12f
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
mov esi, dword [esp + 0x20]
mov edx, dword [edi + 0x2c]
mov ebx, dword [esp + 0x10]
mov ecx, dword [edi + 0x20]
add esi, edx
add ebx, ecx
mov dword [esi], 8
mov dword [esi + 4], 0
mov dword [esi + 8], 0x3e8
mov dword [esi + 0xc], 0xc0
mov ecx, dword [ebx]
mov dword [esi + 0x1c], 0xffffffff
mov edx, ecx
mov dword [esi + 0x10], ecx
push edx
call fcn.0048f240
mov edx, dword [esi + 0x10]
xor ecx, ecx
add esp, 4
cmp edx, ecx
mov dword [esi + 0x20], eax
je 0x48f0a4
cmp eax, ecx
je 0x48f15f
cmp dword [ebx + 0x18], ecx
jle 0x48f0cb
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x1c], 1
mov dword [esi + 0x14], eax
mov ecx, dword [ebx + 0x18]
add ecx, dword [ebx + 0x14]
mov dword [esi + 0x18], ecx
jmp 0x48f0d6
push 0x4b1a94
jmp 0x48f164
mov dword [ebx + 0x1c], ecx
mov dword [esi + 0x14], ecx
mov edx, dword [ebx]
mov dword [esi + 0x18], edx
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x20]
push ebp
push eax
push ecx
call fcn.004915e0
mov ecx, dword [esi + 0x10]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x48f104
mov ecx, dword [esi + 0x20]
mov bl, byte [ecx + eax]
xor bl, 0x80
mov byte [ecx + eax], bl
mov ecx, dword [esi + 0x10]
inc eax
cmp eax, ecx
jl 0x48f0f0
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x20]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
inc eax
add esi, 0x24
add edx, 0x30
cmp eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x20], esi
mov dword [esp + 0x10], edx
jl 0x48f04c
mov edx, dword [edi + 0x544]
mov eax, dword [edi + 0x30]
cmp edx, eax
jle 0x48f146
mov dword [edi + 0x544], 0
push ebp
call fcn.00491570
push edi
call fcn.0048b9d0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
push str.Unable_to_allocate_enough_memory_for_SAMPLE_DATA
push 0x4b06c4
call fcn.00492257
push ebp
call fcn.00491570
push edi
call fcn.0048b880
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret