Function at 0x57d8a7
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10033b81
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [reloc.WINMM.dll_midiStreamStop]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], 0
call fcn.0057d207
mov edx, dword [edx]
push 0
push 0x8000000
push 3
push 0
push 3
push 0x80000000
push edx
call dword [0x10035110]
mov edi, eax
push 0
push edi
call dword [0x10035050]
mov esi, eax
push esi
push 0x20
lea ecx, [ebp - 0x2c]
call fcn.0057cb97
mov ecx, 1
mov dword [ebp - 4], ecx
test esi, esi
jns 0x57d930
push 0x80070057
call fcn.00567147
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x57d94b
push esi
lea ecx, [ebp - 0x2c]
call fcn.00568527
mov edx, dword [ebp - 0x2c]
push 0
lea eax, [ebp - 0x44]
push eax
push esi
push edx
push edi
call dword [0x1003504c]
push edi
call dword [0x10035100]
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.00585e90
add esp, 8
test eax, eax
js 0x57d926
mov ecx, dword [ebp - 0x2c]
cmp eax, dword [ecx - 8]
jg 0x57d926
mov dword [ecx - 0xc], eax
mov edx, dword [ebp - 0x2c]
xor ecx, ecx
mov word [edx + eax*2], cx
mov edx, dword [ebp - 0x2c]
or eax, reloc.WINMM.dll_midiStreamStop
mov ecx, esi
test esi, esi
je 0x57d9b2
mov edi, edi
movzx edi, byte [edx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
xor eax, dword [esi*4 + reloc.WINMM.dll_midiStreamStop]
inc edx
dec ecx
jne 0x57d997
xor ecx, ecx
mov dword [ebp - 0x23], ecx
mov dword [ebp - 0x1f], ecx
mov dword [ebp - 0x1b], ecx
mov dword [ebp - 0x17], ecx
mov word [ebp - 0x13], cx
mov byte [ebp - 0x11], cl
push 0x10
lea ecx, [ebp - 0x24]
not eax
push ecx
push eax
mov byte [ebp - 0x24], 0
call fcn.00595e8e
add esp, 0xc
lea edx, [ebp - 0x24]
push edx
call dword [0x10035090]
lea esi, [eax + 1]
cmp esi, 0x3fffffff
jg 0x57da1d
lea eax, [esi + esi]
call fcn.00586827
mov edi, esp
test edi, edi
je 0x57da1d
push esi
push edi
push 0xffffffffffffffff
lea ecx, [ebp - 0x24]
xor eax, eax
push ecx
push eax
push 3
mov word [edi], ax
call dword [0x100350f0]
neg eax
sbb eax, eax
and eax, edi
jmp 0x57da1f
xor eax, eax
push eax
lea ecx, [ebp - 0x28]
call fcn.0056aa07
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx - 0xc]
cmp ecx, 8
jge 0x57db26
mov eax, 8
sub eax, ecx
test eax, eax
jle 0x57db26
mov dword [ebp - 0x30], eax
jmp 0x57da57
push 0x100362f4
lea ecx, [ebp - 0x34]
call fcn.0056aa07
mov byte [ebp - 4], 3
lea edx, [ebp - 0x28]
push edx
push eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00569f47
add esp, 0xc
mov byte [ebp - 4], 4
mov ecx, dword [eax]
mov esi, dword [ebp - 0x28]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x57dad1
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x57dac4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x57dac4
push eax
call fcn.00568587
mov ebx, eax
add esp, 4
or eax, reloc.WINMM.dll_midiStreamStop
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x57dabc
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x28], ebx
jmp 0x57dad1
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x28]
call fcn.00569117
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_midiStreamStop
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57daf4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_midiStreamStop
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57db17
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
dec dword [ebp - 0x30]
jne 0x57da57
mov edx, dword [ebp - 0x28]
mov ebx, dword [ebp - 0x40]
mov esi, dword [edx - 0xc]
test esi, esi
jns 0x57db37
push 0x80070057
call fcn.00567147
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, esi
or eax, ecx
jge 0x57db54
push esi
lea ecx, [ebp - 0x28]
call fcn.00568527
mov edx, dword [ebp - 0x28]
lea ecx, [esi + 1]
push ecx
push edx
call fcn.00585464
mov eax, dword [ebp - 0x28]
add esp, 8
cmp esi, dword [eax - 8]
jg 0x57d926
mov dword [eax - 0xc], esi
mov eax, dword [ebp - 0x28]
xor edx, edx
mov word [eax + esi*2], dx
mov esi, dword [ebp - 0x28]
mov ecx, dword [esi - 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
call eax
cmp dword [esi - 4], 0
lea ecx, [esi - 4]
jl 0x57dba2
cmp eax, dword [esi - 0x10]
jne 0x57dba2
lea edi, [esi - 0x10]
mov edx, 1
lock xadd dword [ecx], edx
jmp 0x57dbdb
mov ecx, dword [esi - 0xc]
mov edx, dword [eax]
mov edx, dword [edx]
push 2
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x57dbbb
call fcn.00567a17
mov eax, dword [esi - 0xc]
mov dword [edi + 4], eax
mov eax, dword [esi - 0xc]
lea ecx, [eax + eax + 2]
push ecx
lea edx, [eax + eax + 2]
push esi
push edx
lea eax, [edi + 0x10]
push eax
call fcn.00585eb0
add esp, 0x10
add edi, 0x10
mov dword [ebx], edi
mov byte [ebp - 4], 2
mov dword [ebp - 0x38], 1
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x28]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_midiStreamStop
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57dc0e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, reloc.WINMM.dll_midiStreamStop
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x57dc34
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
lea esp, [ebp - 0x54]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00584ef1
mov esp, ebp
pop ebp
ret