Function at 0x102f2d50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x100387a6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x180
mov eax, dword [0x10046638]
push ebx
push esi
mov esi, ecx
lea ecx, [esi + 0x48]
push edi
mov dword [esp + reloc.WINMM.dll_midiStreamOut], eax
mov dword [esp + 0x1c], esi
mov byte [esp + 0x13], 0
mov dword [esp + 0x20], ecx
call fcn.103009c0
lea ecx, [esp + 0x28]
call fcn.102ff350
xor ebx, ebx
mov dword [esp + reloc.WINMM.dll_midiStreamOut], ebx
mov dword [esp + 0x14], ebx
lea ecx, [ecx]
mov eax, dword [esi + 0x30]
test eax, eax
je 0x102f2e70
mov ecx, dword [esi + 0x34]
sub ecx, eax
mov eax, 0x2e8ba2e9
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp ebx, eax
jae 0x102f2e70
mov esi, dword [esi + 0x30]
add esi, dword [esp + 0x14]
push esi
lea ecx, [esp + 0x2c]
call fcn.102ff060
push 0x1003a94c
lea ecx, [esp + 0x2c]
call fcn.102ff080
mov eax, dword [esi + 0x50]
mov edi, dword [eax]
cmp edi, eax
mov dword [esp + 0x18], edi
je 0x102f2e4d
lea eax, [edi + 0xc]
push eax
lea ecx, [esp + 0x2c]
call fcn.102ff060
push 0x1003ad14
lea ecx, [esp + 0x2c]
call fcn.102ff080
add edi, 0x58
push edi
lea ecx, [esp + 0x2c]
call fcn.102ff060
push 0x1003a94c
lea ecx, [esp + 0x2c]
call fcn.102ff080
lea ecx, [esp + 0x18]
call fcn.102f2b00
mov edi, dword [esp + 0x18]
cmp edi, dword [esi + 0x50]
jne 0x102f2e05
push 0x1003a94c
lea ecx, [esp + 0x2c]
call fcn.102ff080
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x1c]
inc ebx
add eax, 0x58
mov dword [esp + 0x14], eax
jmp 0x102f2db0
lea ecx, [esp + 0x28]
call fcn.102fed30
mov ebx, eax
push ebx
call fcn.10319198
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x14], edi
je 0x102f2fb9
lea ecx, [esp + 0x28]
call fcn.102fed50
mov ecx, ebx
mov edx, ecx
shr ecx, 2
mov esi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
xor esi, esi
test ebx, ebx
jle 0x102f2ed1
mov edi, dword [esp + 0x14]
xor eax, eax
mov al, byte [esi + edi]
push 3
push eax
call fcn.102ed570
xor al, 1
add esp, 8
mov byte [esi + edi], al
inc esi
cmp esi, ebx
jl 0x102f2eb3
mov eax, dword [esp + 0x1c]
mov edi, dword [eax + 0x40]
test edi, edi
je 0x102f2f0e
cmp ebx, 0x100000
jl 0x102f2ee9
mov ebx, 0xfffff
mov esi, dword [esp + 0x14]
mov ecx, ebx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [eax + 0x40]
mov byte [ebx + eax], 1
mov byte [esp + 0x13], 1
jmp 0x102f2fac
mov byte [esp + 0x78], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x79]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea ecx, [esp + 0x7c]
push ecx
stosb byte es:[edi], al
call dword [fcn.1003a2fc]
push 0x1003afb4
lea edx, [esp + 0x7c]
push edx
call dword [fcn.1003a300]
lea ecx, [esp + 0x18]
call fcn.10300a20
push 0x80
push 2
push 0
push 0x40000000
lea eax, [esp + 0x88]
push eax
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1a8], 1
call fcn.10300a30
test al, al
je 0x102f2f9b
mov edx, dword [esp + 0x14]
push 0
lea ecx, [esp + 0x28]
push ecx
push ebx
push edx
lea ecx, [esp + 0x28]
call fcn.10300ae0
lea ecx, [esp + 0x18]
call fcn.10300b30
mov byte [esp + 0x13], 1
lea ecx, [esp + 0x18]
mov byte [esp + 0x194], 0
call fcn.10300b30
mov eax, dword [esp + 0x14]
push eax
call fcn.10319193
add esp, 4
mov ecx, dword [esp + 0x20]
call fcn.103009d0
lea ecx, [esp + 0x28]
mov dword [esp + reloc.WINMM.dll_midiStreamOut], reloc.WINMM.dll_midiStreamOut
call fcn.102fece0
mov ecx, dword [esp + reloc.WINMM.dll_midiStreamOut]
mov al, byte [esp + 0x13]
mov dword fs:[0], ecx
mov ecx, dword [esp + reloc.WINMM.dll_midiStreamOut]
call fcn.1030b41a
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret