Function at 0x5a5e10
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
push edi
xor edi, edi
mov esi, ecx
push 0x38
mov ebx, edx
mov dword [ebp - 0xc], esi
push edi
push esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], edi
call fcn.00582240
mov edx, dword [ebx + 4]
add esp, 0xc
xor ecx, ecx
test edx, edx
jle 0x5a5e57
mov esi, dword [ebx + 8]
cmp byte [esi + ecx], 0
lea eax, [edi + 1]
cmovle eax, edi
inc ecx
mov edi, eax
cmp ecx, edx
jl 0x5a5e40
mov esi, dword [ebp - 0xc]
mov dword [ebp - 0x14], edi
mov dword [esi + 4], edx
mov dword [esi + 8], edi
mov eax, dword [ebx]
mov dword [esi], eax
test edi, edi
jle 0x5a635f
mov edx, dword [ebx + 4]
mov ecx, dword [ebx + 8]
push edi
call fcn.005a5c00
add esp, 4
mov dword [ebp - 8], eax
lea eax, [edi*4]
call fcn.00568c10
mov eax, dword [ebp - 8]
mov ecx, esp
mov dword [ebp - 0x1c], ecx
test eax, eax
jne 0x5a5efd
mov eax, dword [esi + 0x10]
test eax, eax
je 0x5a5ea3
push eax
call fcn.0058550e
add esp, 4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x5a5eb3
push eax
call fcn.0058550e
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x5a5ec3
push eax
call fcn.0058550e
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x5a5ed3
push eax
call fcn.0058550e
add esp, 4
mov eax, dword [esi + 0x20]
test eax, eax
je 0x5a5ee3
push eax
call fcn.0058550e
add esp, 4
push 0x38
push 0
push esi
call fcn.00582240
add esp, 0xc
or eax, 0xffffffff
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x5a5f8e
sub ecx, eax
mov dword [ebp - 0x20], edi
mov ebx, eax
mov dword [ebp - 0x10], ecx
mov esi, ecx
mov ecx, dword [ebx]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov dword [ebx], ecx
mov dword [esi + ebx], ebx
add ebx, 4
sub edi, 1
jne 0x5a5f11
mov esi, dword [ebp - 0xc]
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x1c]
push 0x5a57e0
push 4
push edi
push ecx
call fcn.0058edc0
add esp, 0x10
lea eax, [edi*4]
call fcn.00568c10
lea eax, [edi*4]
mov dword [ebp - 0x10], esp
push eax
call fcn.0058552b
add esp, 4
mov dword [esi + 0x14], eax
xor ecx, ecx
test edi, edi
jle 0x5a600e
mov edx, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
nop dword [eax]
mov eax, dword [esi + ecx*4]
sub eax, dword [ebp - 8]
sar eax, 2
mov dword [edx + eax*4], ecx
inc ecx
cmp ecx, edi
jl 0x5a5fd0
mov eax, dword [ebp - 8]
mov ebx, edx
mov esi, dword [ebp - 0xc]
sub eax, edx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], edi
mov edx, dword [ebx]
lea ebx, [ebx + 4]
mov ecx, dword [esi + 0x14]
mov eax, dword [eax + ebx - 4]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x1c]
sub edi, 1
jne 0x5a5ff1
mov edi, dword [ebp - 0x14]
mov ebx, dword [ebp - 0x18]
push dword [ebp - 8]
call fcn.0058550e
add esp, 4
mov edx, edi
mov ecx, ebx
push dword [ebp - 0x10]
call fcn.005a5870
add esp, 4
mov dword [esi + 0x10], eax
lea eax, [edi*4]
push eax
call fcn.0058552b
xor edx, edx
mov dword [esi + 0x18], eax
add esp, 4
xor edi, edi
cmp dword [ebx + 4], edx
jle 0x5a6063
mov eax, dword [ebx + 8]
cmp byte [edx + eax], 0
jle 0x5a605d
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x18]
mov dword [eax + ecx*4], edx
inc edx
cmp edx, dword [ebx + 4]
jl 0x5a6047
push edi
call fcn.0058552b
xor edi, edi
mov dword [esi + 0x1c], eax
xor edx, edx
mov dword [esi + 0x28], 0
add esp, 4
mov dword [ebp - 0x14], edi
cmp dword [ebx + 4], edx
jle 0x5a60ea
mov eax, dword [ebx + 8]
mov al, byte [edx + eax]
mov byte [ebp - 1], al
test al, al
jle 0x5a60b1
mov eax, dword [ebp - 0x10]
mov bl, byte [ebp - 1]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x1c]
mov byte [ecx + eax], bl
mov ebx, dword [ebp - 0x18]
mov eax, dword [ebx + 8]
movsx eax, byte [edx + eax]
cmp eax, dword [esi + 0x28]
jle 0x5a60b1
mov dword [esi + 0x28], eax
inc edx
cmp edx, dword [ebx + 4]
jl 0x5a6082
mov dword [ebp - 0x14], edi
cmp edi, 1
jne 0x5a60ea
cmp dword [esi + 0x28], edi
jne 0x5a60ea
push 4
push 2
mov dword [esi + 0x24], edi
call fcn.00589a1d
mov dword [esi + 0x20], eax
add esp, 8
mov dword [eax + 4], edi
mov eax, dword [esi + 0x20]
mov dword [eax], edi
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [esi + 8]
xor ecx, ecx
test eax, eax
je 0x5a60f8
inc ecx
shr eax, 1
jne 0x5a60f3
lea eax, [ecx - 4]
mov dword [ebp - 8], eax
mov dword [esi + 0x24], eax
cmp eax, 5
jge 0x5a6115
mov eax, 5
mov dword [esi + 0x24], 5
mov dword [ebp - 8], eax
cmp eax, 8
jle 0x5a6129
mov eax, 8
mov dword [esi + 0x24], 8
mov dword [ebp - 8], eax
mov ecx, eax
mov edx, 1
shl edx, cl
push 4
push edx
mov dword [ebp - 0x10], edx
call fcn.00589a1d
add esp, 8
mov dword [esi + 0x20], eax
xor ebx, ebx
test edi, edi
jle 0x5a6236
nop dword [eax]
mov eax, dword [esi + 0x1c]
movsx edx, byte [ebx + eax]
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x18], edx
cmp edx, eax
jg 0x5a622b
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + ebx*4]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor edx, edx
xor ecx, eax
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x24], ecx
mov eax, 1
mov ecx, dword [esi + 0x24]
mov dword [ebp - 8], ecx
sub ecx, dword [ebp - 0x18]
shl eax, cl
test eax, eax
jle 0x5a6228
nop dword [eax]
mov eax, dword [esi + 0x1c]
lea edi, [ebx + 1]
mov cl, byte [ebx + eax]
mov eax, dword [esi + 0x20]
shl edx, cl
or edx, dword [ebp - 0x24]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
inc edx
movsx eax, byte [ebx + eax]
sub ecx, eax
mov dword [ebp - 0x1c], edx
mov eax, 1
shl eax, cl
cmp edx, eax
jl 0x5a61f0
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 8]
inc ebx
cmp ebx, edi
jl 0x5a6150
jmp 0x5a6239
mov eax, dword [ebp - 8]
mov ecx, 0x1f
xor ebx, ebx
sub ecx, eax
xor edi, edi
mov eax, 0xfffffffe
shl eax, cl
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x10], eax
jle 0x5a635f
nop dword [eax]
mov ecx, 0x20
sub ecx, dword [esi + 0x24]
shl eax, cl
mov ecx, eax
mov dword [ebp - 0x1c], eax
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [esi + 0x20]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0x20], eax
jne 0x5a634f
mov edx, dword [ebp - 0x14]
lea ecx, [ebx + 1]
cmp ecx, edx
jge 0x5a6306
mov eax, dword [esi + 0x14]
mov esi, dword [ebp - 0x1c]
lea eax, [eax + ebx*4]
add eax, 4
cmp dword [eax], esi
ja 0x5a6303
inc ecx
inc ebx
add eax, 4
cmp ecx, edx
jl 0x5a62f6
mov esi, dword [ebp - 0xc]
cmp edi, edx
jge 0x5a6327
mov eax, dword [esi + 0x14]
mov esi, dword [ebp - 0x24]
lea ecx, [eax + edi*4]
mov eax, esi
and eax, dword [ecx]
cmp dword [ebp - 0x1c], eax
jb 0x5a6324
inc edi
add ecx, 4
cmp edi, edx
jl 0x5a6313
mov esi, dword [ebp - 0xc]
mov ecx, edx
mov eax, ebx
sub ecx, edi
mov edx, 0x7fff
cmp ebx, 0x7fff
cmova eax, edx
cmp ecx, edx
cmova ecx, edx
or eax, 0xffff0000
shl eax, 0xf
or eax, ecx
mov ecx, dword [ebp - 0x20]
mov dword [ecx], eax
mov eax, dword [ebp - 0x18]
inc eax
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0x10]
jl 0x5a6260
xor eax, eax
lea esp, [ebp - 0x30]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret