Function at 0x5b1060
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x2c]
sar eax, 1
push esi
xor esi, esi
cmp ecx, 4
lea ebx, [ebp + eax*4]
push edi
mov dword [esp + 0x34], ebx
jl 0x5b1089
mov eax, ecx
sar eax, 1
lea edi, [eax*4 + 0x769360]
jmp 0x5b108e
mov edi, 0x76a368
lea edx, [edi + 0x1000]
lea eax, [ecx*4]
mov dword [esp + 0x2c], edx
mov dword [esp + 0x20], eax
mov ecx, esi
sar ecx, 4
and ecx, 0xf
movzx eax, byte [ecx + 0x7dc698]
mov edx, esi
and edx, 0xf
movzx ecx, byte [edx + 0x7dc698]
shl ecx, 4
or eax, ecx
mov edx, esi
sar edx, 8
movzx ecx, byte [edx + 0x7dc698]
shl eax, 4
or eax, ecx
mov ecx, dword [esp + 0x38]
mov edx, eax
xor edx, 0xfff
sar edx, cl
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x1c], eax
inc esi
lea edx, [ecx + edx*4 - 4]
mov ecx, dword [esp + 0x38]
sar eax, cl
mov ecx, dword [esp + 0x34]
lea eax, [ecx + eax*4]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x14], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx]
mov dword [esp + 0x18], edx
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x14]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x24]
sub edx, ecx
mov dword [esp + 0x34], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x38], eax
push edx
add eax, ecx
call fcn.005b05a0
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x3c]
add eax, edx
mov edx, dword [esp + 0x24]
add edi, dword [esp + 0x34]
sar eax, 1
add edx, eax
sub eax, dword [esp + 0x24]
mov dword [ebp], edx
mov edx, dword [esp + 0x30]
sar ecx, 1
mov dword [esp + 0x3c], ecx
add ecx, edx
sub edx, dword [esp + 0x3c]
mov dword [ebp + 4], ecx
mov dword [ebx - 8], eax
sub ebx, 0x10
mov dword [ebx + 0xc], edx
mov eax, esi
sar eax, 4
mov ecx, esi
and ecx, 0xf
movzx edx, byte [ecx + 0x7dc698]
and eax, 0xf
movzx eax, byte [eax + 0x7dc698]
shl edx, 4
or eax, edx
mov ecx, esi
shl eax, 4
sar ecx, 8
movzx edx, byte [ecx + 0x7dc698]
mov ecx, dword [esp + 0x4c]
or eax, edx
mov edx, eax
xor edx, 0xfff
sar edx, cl
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x30], eax
inc esi
lea edx, [ecx + edx*4 - 4]
mov ecx, dword [esp + 0x4c]
sar eax, cl
mov ecx, dword [esp + 0x48]
lea eax, [ecx + eax*4]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x28], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx]
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x30]
push edx
lea edx, [esp + 0x28]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [esp + 0x38]
sub edx, ecx
mov dword [esp + 0x48], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x4c], eax
push edx
add eax, ecx
call fcn.005b05a0
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x50]
add edi, dword [esp + 0x48]
add eax, edx
mov edx, dword [esp + 0x38]
sar eax, 1
add edx, eax
sub eax, dword [esp + 0x38]
mov dword [ebp + 8], edx
mov edx, dword [esp + 0x44]
sar ecx, 1
mov dword [esp + 0x50], ecx
add ecx, edx
sub edx, dword [esp + 0x50]
mov dword [ebp + 0xc], ecx
add esp, 0x28
add ebp, 0x10
mov dword [ebx], eax
mov dword [ebx + 4], edx
cmp edi, dword [esp + 0x2c]
jb 0x5b10a3
lea ecx, [ecx]
mov eax, esi
sar eax, 4
and eax, 0xf
movzx eax, byte [eax + 0x7dc698]
mov ecx, esi
and ecx, 0xf
movzx edx, byte [ecx + 0x7dc698]
shl edx, 4
or eax, edx
mov ecx, esi
sar ecx, 8
movzx edx, byte [ecx + 0x7dc698]
mov ecx, dword [esp + 0x38]
shl eax, 4
or eax, edx
mov edx, eax
xor edx, 0xfff
sar edx, cl
mov ecx, dword [esp + 0x34]
sub edi, dword [esp + 0x20]
mov dword [esp + 0x14], eax
lea edx, [ecx + edx*4 - 4]
mov ecx, dword [esp + 0x38]
sar eax, cl
mov ecx, dword [esp + 0x34]
inc esi
lea eax, [ecx + eax*4]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x1c], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx]
mov dword [esp + 0x18], edx
lea edx, [esp + 0x14]
push edx
lea edx, [esp + 0x14]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [esp + 0x2c]
sub edx, ecx
mov dword [esp + 0x38], ecx
mov ecx, dword [esp + 0x28]
mov dword [esp + 0x34], eax
push edx
add eax, ecx
call fcn.005b05a0
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
sub ecx, dword [esp + 0x38]
add eax, edx
mov edx, dword [esp + 0x24]
sar eax, 1
add edx, eax
sub eax, dword [esp + 0x24]
mov dword [ebp], edx
mov edx, dword [esp + 0x28]
sar ecx, 1
mov dword [esp + 0x3c], ecx
add ecx, edx
sub edx, dword [esp + 0x3c]
mov dword [ebp + 4], ecx
mov dword [ebx - 8], eax
sub ebx, 0x10
mov dword [ebx + 0xc], edx
mov eax, esi
sar eax, 4
mov ecx, esi
and ecx, 0xf
movzx edx, byte [ecx + 0x7dc698]
and eax, 0xf
movzx eax, byte [eax + 0x7dc698]
shl edx, 4
or eax, edx
mov ecx, esi
shl eax, 4
sar ecx, 8
movzx edx, byte [ecx + 0x7dc698]
mov ecx, dword [esp + 0x4c]
or eax, edx
mov edx, eax
xor edx, 0xfff
sar edx, cl
mov ecx, dword [esp + 0x48]
sub edi, dword [esp + 0x34]
mov dword [esp + 0x28], eax
lea edx, [ecx + edx*4 - 4]
mov ecx, dword [esp + 0x4c]
sar eax, cl
mov ecx, dword [esp + 0x48]
inc esi
lea eax, [ecx + eax*4]
mov ecx, dword [eax + 4]
mov eax, dword [eax]
mov dword [esp + 0x30], ecx
mov ecx, dword [edx + 4]
mov edx, dword [edx]
mov dword [esp + 0x2c], edx
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x28]
push edx
mov edx, dword [edi + 4]
push edx
mov edx, dword [edi]
push edx
mov edx, dword [esp + 0x40]
sub edx, ecx
mov dword [esp + 0x4c], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x48], eax
push edx
add eax, ecx
call fcn.005b05a0
mov edx, dword [esp + 0x50]
mov eax, dword [esp + 0x44]
mov ecx, dword [esp + 0x40]
sub ecx, dword [esp + 0x4c]
add eax, edx
mov edx, dword [esp + 0x38]
sar eax, 1
add edx, eax
sub eax, dword [esp + 0x38]
mov dword [ebp + 8], edx
mov edx, dword [esp + 0x3c]
sar ecx, 1
mov dword [esp + 0x50], ecx
add ecx, edx
sub edx, dword [esp + 0x50]
mov dword [ebp + 0xc], ecx
add ebp, 0x10
add esp, 0x28
mov dword [ebx], eax
mov dword [ebx + 4], edx
cmp ebp, ebx
jb 0x5b1260
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret