Function at 0x599190
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [ebp + 0xc]
xor ecx, ecx
mov edx, dword [ebp + 8]
push ebx
sar eax, 1
push esi
push edi
mov edi, dword [ebp + 0x10]
lea eax, [edx + eax*4]
mov dword [ebp - 8], eax
mov dword [ebp + 0xc], eax
cmp edi, 4
jl 0x5991c1
mov eax, edi
shr eax, 1
lea esi, [eax*4 + 0x5f7030]
jmp 0x5991c6
mov esi, 0x5f8038
lea eax, [esi + 0x1000]
mov dword [ebp + 0x10], esi
mov dword [ebp - 0x28], eax
lea eax, [edi*4]
mov dword [ebp - 0xc], eax
jmp 0x5991e3
mov ecx, dword [ebp - 4]
mov eax, ecx
mov ebx, dword [ebp + 0x14]
sar eax, 4
and eax, 0xf
mov edi, dword [ebp - 8]
sub dword [ebp + 0xc], 0x10
movzx edx, byte [eax + 0x62292c]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x62292c]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
inc ecx
shl edx, 4
mov dword [ebp - 4], ecx
mov ecx, ebx
movzx eax, byte [eax + 0x62292c]
or edx, eax
mov eax, edx
sar edx, cl
xor eax, 0xfff
sar eax, cl
mov ecx, dword [edi + edx*4]
mov edx, dword [edi + edx*4 + 4]
mov ebx, dword [edi + eax*4 - 4]
mov eax, dword [edi + eax*4]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], ecx
add ecx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, edx
sub ebx, eax
mov dword [ebp - 0x1c], edx
mov eax, ecx
imul dword [esi + 4]
mov eax, ebx
mov ecx, edx
imul dword [esi]
mov eax, ebx
mov ebx, dword [ebp - 0x14]
add edx, ecx
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x20], edx
imul dword [esi + 4]
mov eax, dword [ebp - 0x10]
mov edi, edx
sar ecx, 1
lea eax, [ebx + eax]
imul dword [esi]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
sub edi, edx
add dword [ebp + 0x10], eax
sub esi, ebx
mov edx, dword [ebp - 0x20]
mov ebx, dword [ebp + 8]
sar esi, 1
lea eax, [edx + ecx]
sub ecx, edx
mov dword [ebx], eax
lea eax, [esi + edi]
sub edi, esi
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 4]
mov dword [eax + 0xc], edi
mov eax, ecx
sar eax, 4
and eax, 0xf
movzx edx, byte [eax + 0x62292c]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x62292c]
shl eax, 4
or edx, eax
mov eax, ecx
shl edx, 4
mov esi, dword [ebp - 8]
inc ecx
sar eax, 8
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x14]
movzx eax, byte [eax + 0x62292c]
or edx, eax
mov eax, edx
sar edx, cl
xor eax, 0xfff
sar eax, cl
mov ecx, dword [esi + edx*4]
mov edx, dword [esi + edx*4 + 4]
mov ebx, dword [esi + eax*4 - 4]
mov eax, dword [esi + eax*4]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], ecx
add ecx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, edx
sub ebx, eax
mov dword [ebp - 0x18], edx
mov eax, ecx
imul dword [esi + 4]
mov eax, ebx
mov ecx, edx
imul dword [esi]
mov eax, ebx
mov ebx, dword [ebp - 0x20]
add edx, ecx
mov ecx, dword [ebp - 0x18]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], edx
imul dword [esi + 4]
mov eax, dword [ebp - 0x10]
mov edi, edx
sar ecx, 1
lea eax, [ebx + eax]
imul dword [esi]
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
sub edi, edx
mov edx, dword [ebp - 0x14]
sub esi, ebx
mov ebx, dword [ebp + 8]
add dword [ebp + 0x10], eax
sar esi, 1
lea eax, [edx + ecx]
sub ecx, edx
mov dword [ebx + 8], eax
lea eax, [esi + edi]
sub edi, esi
mov esi, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
add ebx, 0x10
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ebx
mov dword [eax], ecx
mov dword [eax + 4], edi
cmp esi, dword [ebp - 0x28]
jb 0x5991e0
nop dword [eax + eax]
mov ecx, dword [ebp - 4]
mov eax, ecx
sar eax, 4
and eax, 0xf
mov edi, dword [ebp - 8]
sub esi, dword [ebp - 0xc]
sub dword [ebp + 0xc], 0x10
mov dword [ebp + 0x10], esi
movzx edx, byte [eax + 0x62292c]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x62292c]
shl eax, 4
or edx, eax
mov eax, ecx
sar eax, 8
inc ecx
shl edx, 4
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x14]
movzx eax, byte [eax + 0x62292c]
or edx, eax
mov eax, edx
sar edx, cl
xor eax, 0xfff
sar eax, cl
mov ecx, dword [edi + edx*4]
mov edx, dword [edi + edx*4 + 4]
mov ebx, dword [edi + eax*4 - 4]
mov eax, dword [edi + eax*4]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ecx
add ecx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, edx
sub ebx, eax
mov dword [ebp - 0x1c], edx
mov eax, ecx
imul dword [esi]
mov eax, ebx
mov ecx, edx
imul dword [esi + 4]
mov eax, ebx
mov ebx, dword [ebp - 0x28]
add edx, ecx
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
imul dword [esi]
mov eax, dword [ebp - 0x10]
mov edi, edx
sar ecx, 1
lea eax, [ebx + eax]
imul dword [esi + 4]
mov esi, dword [ebp - 0x10]
sub edi, edx
sub esi, ebx
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
sar esi, 1
lea eax, [ecx + edx]
sub ecx, edx
mov dword [ebx], eax
lea eax, [esi + edi]
sub edi, esi
mov dword [ebx + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 4]
mov dword [eax + 0xc], edi
mov eax, ecx
sar eax, 4
and eax, 0xf
movzx edx, byte [eax + 0x62292c]
mov eax, ecx
and eax, 0xf
movzx eax, byte [eax + 0x62292c]
shl eax, 4
or edx, eax
mov eax, ecx
shl edx, 4
mov esi, dword [ebp - 8]
inc ecx
sar eax, 8
mov dword [ebp - 4], ecx
mov ecx, dword [ebp + 0x14]
movzx eax, byte [eax + 0x62292c]
or edx, eax
mov eax, edx
sar edx, cl
xor eax, 0xfff
sar eax, cl
mov ecx, dword [esi + edx*4]
mov edx, dword [esi + edx*4 + 4]
mov ebx, dword [esi + eax*4 - 4]
mov eax, dword [esi + eax*4]
mov esi, dword [ebp + 0x10]
sub esi, dword [ebp - 0xc]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ecx
add ecx, ebx
mov dword [ebp - 0x10], ebx
mov ebx, edx
sub ebx, eax
mov dword [ebp - 0x1c], edx
mov eax, ecx
mov dword [ebp + 0x10], esi
imul dword [esi]
mov eax, ebx
mov ecx, edx
imul dword [esi + 4]
mov eax, ebx
mov ebx, dword [ebp - 0x28]
add edx, ecx
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x20]
mov dword [ebp - 0x18], edx
imul dword [esi]
mov eax, dword [ebp - 0x10]
mov edi, edx
sar ecx, 1
lea eax, [ebx + eax]
imul dword [esi + 4]
mov esi, dword [ebp - 0x10]
sub edi, edx
sub esi, ebx
mov edx, dword [ebp - 0x18]
mov ebx, dword [ebp + 8]
sar esi, 1
lea eax, [ecx + edx]
sub ecx, edx
mov dword [ebx + 8], eax
lea eax, [esi + edi]
sub edi, esi
mov esi, dword [ebp + 0x10]
mov dword [ebx + 0xc], eax
add ebx, 0x10
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], ebx
mov dword [eax], ecx
mov dword [eax + 4], edi
cmp ebx, eax
jb 0x599380
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret