Function at 0x10137197
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
push edi
xor ebx, ebx
xor edi, edi
test eax, eax
mov dword [esi + reloc.WINMM.dll_midiStreamOut], 2
je 0x101373b5
cmp dword [esi + reloc.WINMM.dll_midiStreamOut], 3
jb 0x1013720e
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
movzx eax, byte [ecx + esi + 0x1af72]
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
shl edx, 5
xor eax, edx
and eax, 0x7fff
mov dword [esi + reloc.WINMM.dll_midiStreamOut], eax
mov ebx, dword [esi + eax*4 + reloc.WINMM.dll_midiStreamOut]
and ecx, 0x7fff
mov dword [esi + ecx*4 + reloc.WINMM.dll_midiStreamOut], ebx
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov dword [esi + eax*4 + reloc.WINMM.dll_midiStreamOut], ecx
test ebx, ebx
je 0x1013724e
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
sub edx, ebx
cmp edx, 0x7efa
ja 0x1013724e
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
cmp dword [esi + reloc.WINMM.dll_midiStreamOut], eax
jbe 0x10137236
mov dword [esi + reloc.WINMM.dll_midiStreamOut], eax
push ebx
push esi
call fcn.10134807
mov edi, eax
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
add esp, 8
cmp edi, eax
jbe 0x1013724e
mov edi, eax
cmp edi, 3
jb 0x1013732b
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
lea eax, [edi - 3]
push eax
sub ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
push ecx
push esi
call fcn.10134247
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
sub ecx, edi
add esp, 0xc
cmp edi, edx
mov dword [esi + reloc.WINMM.dll_midiStreamOut], ecx
ja 0x101372f1
cmp ecx, 3
jb 0x101372f1
dec edi
jmp 0x10137297
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov ebx, dword [esi + reloc.WINMM.dll_midiStreamOut]
inc ecx
mov dword [esi + reloc.WINMM.dll_midiStreamOut], ecx
mov edx, ecx
movzx ecx, byte [esi + edx + 0x1af72]
shl ebx, 5
xor ecx, ebx
and ecx, 0x7fff
mov dword [esi + reloc.WINMM.dll_midiStreamOut], ecx
mov ebx, dword [esi + ecx*4 + reloc.WINMM.dll_midiStreamOut]
and edx, 0x7fff
dec edi
mov dword [esi + edx*4 + reloc.WINMM.dll_midiStreamOut], ebx
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov ecx, dword [esi + reloc.WINMM.dll_midiStreamOut]
mov dword [esi + edx*4 + reloc.WINMM.dll_midiStreamOut], ecx
jne 0x10137297
jmp 0x10137352
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
add edx, edi
mov dword [esi + reloc.WINMM.dll_midiStreamOut], edx
movzx ecx, byte [edx + esi + 0x1af70]
add edx, esi
mov dword [esi + reloc.WINMM.dll_midiStreamOut], ecx
movzx edx, byte [edx + 0x1af71]
shl ecx, 5
xor edx, ecx
xor edi, edi
and edx, 0x7fff
mov dword [esi + reloc.WINMM.dll_midiStreamOut], edx
jmp 0x10137358
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
movzx ecx, byte [eax + esi + 0x1af70]
push ecx
push 0
push esi
call fcn.10134247
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
add esp, 0xc
dec edx
mov dword [esi + reloc.WINMM.dll_midiStreamOut], edx
inc dword [esi + reloc.WINMM.dll_midiStreamOut]
test eax, eax
je 0x10137392
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
test eax, eax
jl 0x1013736f
lea ecx, reloc.WINMM.dll_midiStreamOut
jmp 0x10137371
xor ecx, ecx
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
push 0
sub edx, eax
push edx
push ecx
push esi
call fcn.10136fb7
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
add esp, 0x10
mov dword [esi + reloc.WINMM.dll_midiStreamOut], eax
cmp dword [esi + reloc.WINMM.dll_midiStreamOut], 0x106
jae 0x101373a7
push esi
call fcn.101349a7
add esp, 4
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
test eax, eax
jne 0x101371ba
mov eax, dword [esi + reloc.WINMM.dll_midiStreamOut]
test eax, eax
jl 0x101373c8
lea ecx, reloc.WINMM.dll_midiStreamOut
jmp 0x101373ca
xor ecx, ecx
mov edx, dword [esi + reloc.WINMM.dll_midiStreamOut]
push 1
sub edx, eax
push edx
push ecx
push esi
call fcn.10136fb7
add esp, 0x10
pop edi
pop esi
pop ebx
ret