Function at 0x513600
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xfc
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, eax
xor eax, eax
mov ebx, ecx
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov edx, dword [ecx]
inc dword [ebp + edx*4 - 0x80]
lea edx, [ebp + edx*4 - 0x80]
add ecx, 4
dec esi
jne 0x513645
mov ecx, dword [ebp + 8]
cmp dword [ebp - 0x80], ecx
jne 0x51366d
mov edx, dword [ebp + 0x18]
mov dword [edx], eax
mov dword [edi], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi]
mov dword [ebp - 4], edx
mov ecx, 1
cmp dword [ebp + ecx*4 - 0x80], eax
jne 0x513683
inc ecx
cmp ecx, 0xf
jbe 0x513677
mov dword [ebp - 8], ecx
cmp edx, ecx
jae 0x51368f
mov dword [ebp - 4], ecx
mov edx, ecx
mov esi, 0xf
cmp dword [ebp + esi*4 - 0x80], eax
jne 0x51369d
dec esi
jne 0x513694
mov dword [ebp - 0x1c], esi
cmp edx, esi
jbe 0x5136a9
mov dword [ebp - 4], esi
mov edx, esi
mov dword [edi], edx
mov edi, 1
shl edi, cl
cmp ecx, esi
jae 0x5136c7
sub edi, dword [ebp + ecx*4 - 0x80]
js 0x513789
inc ecx
add edi, edi
cmp ecx, esi
jb 0x5136b6
lea ecx, [esi*4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp + ecx - 0x80]
sub edi, ecx
mov dword [ebp - 0x40], edi
js 0x513789
add ecx, edi
mov edi, dword [ebp - 0xc]
mov dword [ebp + edi - 0x80], ecx
xor ecx, ecx
dec esi
mov dword [ebp - 0xbc], eax
je 0x513707
xor edi, edi
add ecx, dword [ebp + edi - 0x7c]
add edi, 4
dec esi
mov dword [ebp + edi - 0xbc], ecx
jne 0x5136f6
mov esi, ebx
xor edi, edi
jmp 0x513710
mov ecx, dword [esi]
add esi, 4
mov dword [ebp - 0x10], esi
cmp ecx, eax
je 0x513736
mov esi, dword [ebp + ecx*4 - 0xc0]
mov ebx, dword [ebp + 0x24]
lea ecx, [ebp + ecx*4 - 0xc0]
mov dword [ebx + esi*4], edi
inc esi
mov dword [ecx], esi
mov esi, dword [ebp - 0x10]
inc edi
cmp edi, dword [ebp + 8]
jb 0x513710
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ebp + ecx - 0xc0]
mov dword [ebp + 8], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 8]
mov ebx, edx
xor edi, edi
neg ebx
mov dword [ebp - 0x24], edi
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0x18], 0xffffffff
mov dword [ebp - 0xfc], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], eax
cmp ecx, dword [ebp - 0x1c]
jg 0x5139af
mov esi, dword [ebp - 0x28]
lea ecx, [ebp + ecx*4 - 0x80]
mov dword [ebp - 0xc], ecx
jmp 0x513797
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx]
mov dword [ebp - 0x14], ecx
cmp ecx, eax
je 0x513999
dec dword [ebp - 0x14]
lea eax, [ebx + edx]
cmp dword [ebp - 8], eax
jle 0x5138a9
mov ecx, dword [ebp - 0x14]
inc ecx
sub ebx, edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x30], ebx
jmp 0x5137c7
mov edx, dword [ebp - 4]
add dword [ebp - 0x30], edx
mov edx, dword [ebp - 0x1c]
inc dword [ebp - 0x18]
mov ebx, eax
mov eax, dword [ebp - 4]
sub edx, ebx
cmp edx, eax
jbe 0x5137dd
mov edx, eax
mov ecx, dword [ebp - 8]
sub ecx, ebx
mov eax, 1
shl eax, cl
cmp eax, dword [ebp - 0x38]
jbe 0x51381c
or edi, 0xffffffff
sub edi, dword [ebp - 0x14]
add eax, edi
mov edi, dword [ebp - 0xc]
cmp ecx, edx
jae 0x51381c
inc ecx
cmp ecx, edx
jae 0x51381c
jmp 0x513807
mov edi, dword [ebp - 0x20]
add edi, 4
mov dword [ebp - 0x20], edi
mov edi, dword [edi]
add eax, eax
cmp eax, edi
jbe 0x51381c
inc ecx
sub eax, edi
cmp ecx, edx
jb 0x513804
mov eax, dword [ebp + 0x20]
mov eax, dword [eax]
mov edx, 1
shl edx, cl
mov dword [ebp - 0x34], edx
add edx, eax
cmp edx, 0x5a0
ja 0x513789
mov edi, dword [ebp + 0x1c]
lea edi, [edi + eax*8]
mov eax, dword [ebp - 0x18]
lea eax, [ebp + eax*4 - 0xfc]
mov dword [ebp - 0x3c], eax
mov dword [eax], edi
mov eax, dword [ebp + 0x20]
mov dword [eax], edx
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x20], edi
test eax, eax
je 0x513892
mov esi, dword [ebp - 0x24]
mov dl, byte [ebp - 4]
mov dword [ebp + eax*4 - 0xc0], esi
mov byte [ebp - 0x2c], cl
mov ecx, dword [ebp - 0x30]
mov eax, esi
shr eax, cl
mov ecx, dword [ebp - 0x3c]
mov ecx, dword [ecx - 4]
mov esi, edi
sub esi, ecx
mov byte [ebp - 0x2b], dl
mov edx, dword [ebp - 0x2c]
sar esi, 3
sub esi, eax
mov dword [ecx + eax*8], edx
mov dword [ecx + eax*8 + 4], esi
jmp 0x513897
mov eax, dword [ebp + 0x18]
mov dword [eax], edi
mov ecx, dword [ebp - 4]
lea eax, [ebx + ecx]
cmp dword [ebp - 8], eax
jg 0x5137c4
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp + 0x24]
mov dl, cl
sub dl, bl
mov byte [ebp - 0x2b], dl
mov edx, dword [ebp + 8]
lea edx, [eax + edx*4]
mov eax, dword [ebp - 0x10]
cmp eax, edx
jb 0x5138c9
mov byte [ebp - 0x2c], 0xc0
jmp 0x513902
mov eax, dword [eax]
mov edx, dword [ebp + 0xc]
cmp eax, edx
jae 0x5138e6
cmp eax, 0x100
sbb dl, dl
and dl, 0xa0
add dl, 0x60
mov byte [ebp - 0x2c], dl
mov esi, eax
jmp 0x5138fe
sub eax, edx
mov edx, dword [ebp + 0x14]
add eax, eax
add eax, eax
mov dl, byte [eax + edx]
add dl, 0x50
mov byte [ebp - 0x2c], dl
mov edx, dword [ebp + 0x10]
mov esi, dword [eax + edx]
add dword [ebp - 0x10], 4
sub ecx, ebx
mov edx, 1
shl edx, cl
mov eax, edi
mov ecx, ebx
shr eax, cl
cmp eax, dword [ebp - 0x34]
jae 0x513937
mov ecx, dword [ebp - 0x20]
lea ecx, [ecx + eax*8]
mov edi, dword [ebp - 0x2c]
mov dword [ecx], edi
lea edi, [edx*8]
mov dword [ecx + 4], esi
add eax, edx
add ecx, edi
cmp eax, dword [ebp - 0x34]
jb 0x51391c
mov edi, dword [ebp - 0x24]
mov ecx, dword [ebp - 8]
dec ecx
mov eax, 1
shl eax, cl
test edi, eax
je 0x51394e
xor edi, eax
shr eax, 1
test edi, eax
jne 0x513946
mov edx, 1
mov ecx, ebx
shl edx, cl
xor edi, eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x24], edi
dec edx
and edx, edi
cmp edx, dword [ebp + eax*4 - 0xc0]
je 0x51398c
jmp 0x513970
sub ebx, dword [ebp - 4]
mov edx, 1
mov ecx, ebx
shl edx, cl
dec eax
dec edx
and edx, edi
cmp edx, dword [ebp + eax*4 - 0xc0]
jne 0x513970
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x14], 0
mov edx, dword [ebp - 4]
jne 0x5137a7
mov eax, dword [ebp - 8]
add dword [ebp - 0xc], 4
inc eax
mov dword [ebp - 8], eax
cmp eax, dword [ebp - 0x1c]
jle 0x513795
xor eax, eax
cmp dword [ebp - 0x40], eax
je 0x5139bf
cmp dword [ebp - 0x1c], 1
je 0x5139bf
mov eax, 0xfffffffb
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret