Function at 0x505d50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x15c
mov eax, dword [0x5601cc]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x15c], eax
push esi
push edi
mov eax, dword [ebx + 0x54]
mov ecx, eax
mov dword [ebp - 0x158], ebx
and ecx, 0x80000003
jns 0x505d8a
dec ecx
or ecx, 0xfffffffc
inc ecx
add eax, 3
mov dword [ebp - 0x148], ecx
cdq
xor esi, esi
and edx, 3
add eax, edx
sar eax, 2
test eax, eax
mov eax, dword [0x514c74]
jle 0x505ddd
lea edi, [ebx + 0x14]
nop word [eax + eax]
push dword [edi]
call eax
mov dword [ebp + esi*4 - 0x144], eax
lea edi, [edi + 4]
mov eax, dword [ebx + 0x54]
inc esi
add eax, 3
cdq
and edx, 3
add eax, edx
sar eax, 2
cmp esi, eax
mov eax, dword [0x514c74]
jl 0x505db0
mov ecx, dword [ebp - 0x148]
cmp ecx, 3
ja case.default.0x505de2
jmp dword [ecx*4 + 0x506380]
push dword [ebx + esi*4 + 0x10]
call eax
and eax, 0xffffff80
mov dword [ebp + esi*4 - 0x144], 0
or eax, 0x80
mov dword [ebp + esi*4 - 0x148], eax
jmp case.default.0x505de2
push dword [ebx + esi*4 + 0x10]
call eax
and eax, 0xffff8000
mov dword [ebp + esi*4 - 0x144], 0
or eax, 0x8000
mov dword [ebp + esi*4 - 0x148], eax
jmp case.default.0x505de2
push dword [ebx + esi*4 + 0x10]
call eax
and eax, 0xff800000
mov dword [ebp + esi*4 - 0x144], 0
or eax, 0x800000
mov dword [ebp + esi*4 - 0x148], eax
jmp case.default.0x505de2
mov dword [ebp + esi*4 - 0x144], 0x80000000
inc esi
cmp esi, 0xf
jge 0x505e7e
mov ecx, 0xf
lea edi, [ebp - 0x144]
sub ecx, esi
lea edi, [edi + esi*4]
shl ecx, 2
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x54]
cmp ecx, 0x38
jge 0x505e8b
mov eax, dword [ebx + 0x58]
jmp 0x505e99
mov eax, dword [ebp - 0x108]
xor edx, edx
cmp ecx, 0x3c
cmovl eax, edx
mov dword [ebp - 0x108], eax
lea ecx, [ebp - 0x13c]
mov edx, 0x40
nop word [eax + eax]
mov eax, dword [ecx + 0x2c]
lea ecx, [ecx + 4]
xor eax, dword [ecx + 0x14]
xor eax, dword [ecx - 0xc]
xor eax, dword [ecx - 4]
rol eax, 1
mov dword [ecx + 0x34], eax
sub edx, 1
jne 0x505eb0
mov eax, dword [ebx + 4]
xor esi, esi
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x10]
mov edi, dword [ebx + 8]
mov dword [ebp - 0x154], eax
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebp - 0x154]
mov dword [ebp - 0x148], ecx
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x150], edx
mov edx, ecx
mov ecx, ebx
not ecx
rol edx, 5
and ecx, eax
mov eax, edi
and eax, ebx
or ecx, eax
mov eax, dword [ebp - 0x14c]
add edx, ecx
add edx, dword [ebp + esi*4 - 0x144]
inc esi
add edx, dword [0x563b28]
add edx, dword [ebp - 0x150]
mov dword [ebp - 0x150], eax
mov ecx, edx
mov eax, edi
mov edi, ebx
mov ebx, dword [ebp - 0x148]
ror edi, 2
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x148], ecx
cmp esi, 0x14
jl 0x505ef7
mov dword [ebp - 0x154], ebx
mov ebx, dword [ebp - 0x158]
mov ecx, dword [ebp - 0x154]
cmp esi, 0x28
jge 0x505fb6
mov ebx, dword [ebp - 0x150]
xor eax, edi
rol edx, 5
xor eax, ecx
add edx, eax
mov eax, edi
add edx, dword [ebp + esi*4 - 0x144]
mov edi, ecx
add edx, dword [0x563b2c]
inc esi
mov ecx, dword [ebp - 0x148]
add edx, ebx
mov ebx, dword [ebp - 0x14c]
ror edi, 2
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x148], edx
cmp esi, 0x28
jl 0x505f67
mov dword [ebp - 0x150], ebx
mov ebx, dword [ebp - 0x158]
mov dword [ebp - 0x154], ecx
cmp esi, 0x3c
jge 0x506033
mov ebx, dword [ebp - 0x150]
mov dword [ebp - 0x148], edx
nop word [eax + eax]
mov ecx, edi
rol edx, 5
or ecx, dword [ebp - 0x154]
and ecx, eax
mov eax, edi
and eax, dword [ebp - 0x154]
or ecx, eax
mov eax, edi
mov edi, dword [ebp - 0x154]
add edx, ecx
add edx, dword [ebp + esi*4 - 0x144]
inc esi
add edx, dword [0x563b30]
mov ecx, dword [ebp - 0x148]
add edx, ebx
mov ebx, dword [ebp - 0x14c]
ror edi, 2
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x148], edx
cmp esi, 0x3c
jl 0x505fd0
mov dword [ebp - 0x150], ebx
mov ebx, dword [ebp - 0x158]
cmp esi, 0x50
jge 0x50608d
mov ebx, dword [ebp - 0x150]
mov dword [ebp - 0x148], edx
xor eax, edi
rol edx, 5
xor eax, ecx
add edx, eax
mov eax, edi
add edx, dword [ebp + esi*4 - 0x144]
mov edi, ecx
add edx, dword [0x563b34]
inc esi
mov ecx, dword [ebp - 0x148]
add edx, ebx
mov ebx, dword [ebp - 0x14c]
ror edi, 2
mov dword [ebp - 0x14c], eax
mov dword [ebp - 0x148], edx
cmp esi, 0x50
jl 0x506044
mov dword [ebp - 0x150], ebx
mov ebx, dword [ebp - 0x158]
mov eax, dword [ebx]
add dword [ebx + 4], ecx
add eax, edx
add dword [ebx + 8], edi
mov dword [ebp - 0x148], eax
mov dword [ebx], eax
mov eax, dword [ebp - 0x14c]
add dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x150]
add dword [ebx + 0x10], eax
mov eax, dword [0x563b20]
test eax, eax
je 0x5060da
push 0
push dword [0x563b24]
push str._s:__final__running_srtp_sha1_core___n
push 3
call fcn.004df170
mov edi, dword [ebx]
add esp, 0x10
mov eax, dword [0x563b20]
jmp 0x5060e0
mov edi, dword [ebp - 0x148]
cmp dword [ebx + 0x54], 0x38
jl 0x506335
test eax, eax
je 0x506105
push 0
push dword [0x563b24]
push str._s:__final__running_srtp_sha1_core___again_n
push 3
call fcn.004df170
add esp, 0x10
mov eax, dword [ebx + 0x58]
lea ecx, [ebp - 0x13c]
xorps xmm0, xmm0
mov dword [ebp - 0x10c], 0
movups xmmword [ebp - 0x144], xmm0
mov dword [ebp - 0x108], eax
mov edx, 0x40
movups xmmword [ebp - 0x134], xmm0
movups xmmword [ebp - 0x124], xmm0
movq qword [ebp - 0x114], xmm0
mov eax, dword [ecx + 0x2c]
lea ecx, [ecx + 4]
xor eax, dword [ecx + 0x14]
xor eax, dword [ecx - 0xc]
xor eax, dword [ecx - 4]
rol eax, 1
mov dword [ecx + 0x34], eax
sub edx, 1
jne 0x506143
mov eax, dword [ebx + 4]
xor edi, edi
mov edx, dword [ebx]
mov esi, dword [ebx + 8]
mov dword [ebp - 0x150], eax
mov eax, dword [ebx + 0xc]
mov ecx, eax
mov dword [ebp - 0x154], eax
mov eax, dword [ebx + 0x10]
mov ebx, dword [ebp - 0x150]
mov dword [ebp - 0x148], edx
mov dword [ebp - 0x14c], eax
nop dword [eax]
mov eax, edx
mov edx, ebx
not edx
rol eax, 5
and edx, ecx
mov ecx, esi
and ecx, ebx
or edx, ecx
mov ecx, dword [ebp - 0x154]
add eax, edx
add eax, dword [ebp + edi*4 - 0x144]
inc edi
add eax, dword [0x563b28]
add eax, dword [ebp - 0x14c]
mov dword [ebp - 0x14c], ecx
mov edx, eax
mov ecx, esi
mov esi, ebx
mov ebx, dword [ebp - 0x148]
ror esi, 2
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x148], edx
cmp edi, 0x14
jl 0x506190
mov dword [ebp - 0x150], ebx
mov ebx, dword [ebp - 0x158]
mov edx, dword [ebp - 0x150]
cmp edi, 0x28
jge 0x50624f
mov ebx, dword [ebp - 0x14c]
xor ecx, esi
rol eax, 5
xor ecx, edx
add eax, ecx
mov ecx, esi
add eax, dword [ebp + edi*4 - 0x144]
mov esi, edx
add eax, dword [0x563b2c]
inc edi
mov edx, dword [ebp - 0x148]
add eax, ebx
mov ebx, dword [ebp - 0x154]
ror esi, 2
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x148], eax
cmp edi, 0x28
jl 0x506200
mov dword [ebp - 0x14c], ebx
mov ebx, dword [ebp - 0x158]
mov dword [ebp - 0x150], edx
cmp edi, 0x3c
jge 0x5062c3
mov ebx, dword [ebp - 0x14c]
mov dword [ebp - 0x148], eax
mov edx, esi
rol eax, 5
or edx, dword [ebp - 0x150]
and edx, ecx
mov ecx, esi
and ecx, dword [ebp - 0x150]
or edx, ecx
mov ecx, esi
mov esi, dword [ebp - 0x150]
add eax, edx
add eax, dword [ebp + edi*4 - 0x144]
inc edi
add eax, dword [0x563b30]
mov edx, dword [ebp - 0x148]
add eax, ebx
mov ebx, dword [ebp - 0x154]
ror esi, 2
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x150], edx
mov dword [ebp - 0x148], eax
cmp edi, 0x3c
jl 0x506260
mov dword [ebp - 0x14c], ebx
mov ebx, dword [ebp - 0x158]
cmp edi, 0x50
jge 0x50631d
mov ebx, dword [ebp - 0x14c]
mov dword [ebp - 0x148], eax
xor ecx, esi
rol eax, 5
xor ecx, edx
add eax, ecx
mov ecx, esi
add eax, dword [ebp + edi*4 - 0x144]
mov esi, edx
add eax, dword [0x563b34]
inc edi
mov edx, dword [ebp - 0x148]
add eax, ebx
mov ebx, dword [ebp - 0x154]
ror esi, 2
mov dword [ebp - 0x154], ecx
mov dword [ebp - 0x148], eax
cmp edi, 0x50
jl 0x5062d4
mov dword [ebp - 0x14c], ebx
mov ebx, dword [ebp - 0x158]
mov edi, dword [ebx]
add dword [ebx + 0xc], ecx
add edi, eax
add dword [ebx + 4], edx
add dword [ebx + 8], esi
mov ecx, dword [ebp - 0x14c]
add dword [ebx + 0x10], ecx
mov dword [ebx], edi
mov esi, dword [0x514c74]
push edi
call esi
mov edi, dword [ebp - 0x15c]
mov dword [edi], eax
push dword [ebx + 4]
call esi
mov dword [edi + 4], eax
push dword [ebx + 8]
call esi
mov dword [edi + 8], eax
push dword [ebx + 0xc]
call esi
mov dword [edi + 0xc], eax
push dword [ebx + 0x10]
call esi
mov ecx, dword [ebp - 4]
mov dword [edi + 0x10], eax
xor ecx, ebp
pop edi
pop esi
mov dword [ebx + 0x54], 0
pop ebx
call fcn.0043c187
mov esp, ebp
pop ebp
ret