Function at 0x6722c760
Capabilities:
Encode data using xor

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
test ecx, ecx
mov byte [esp + 0x3b], dl
je 0x6722c775
mov edx, dword [ecx]
test edx, edx
jle 0x6722c77d
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
test eax, eax
mov ebp, eax
je 0x6722ca59
cmp byte [ebp + 0x22017], 0
jne 0x6722c775
lea eax, [ebp + 0x22018]
mov dword [esp + 8], 0x22084
mov dword [esp + 4], 0xff
mov dword [esp], eax
call sym._memset
mov eax, dword [ebp + 0x22008]
test eax, eax
jle 0x6722c7e0
lea ecx, [ebp + eax*4]
mov edx, ebp
nop
mov ebx, dword [edx]
mov eax, dword [edx]
add edx, 4
sar ebx, 0x1f
xor eax, ebx
sub eax, ebx
sar eax, 5
cmp edx, ecx
mov dword [ebp + eax*4 + 0x22018], 0
jne 0x6722c7c0
cmp byte [ebp + 0x22016], 1
mov dword [ebp + 0x22018], 0
mov esi, 0x20
mov dword [esp + 0x2c], 0x20
sbb eax, eax
xor al, al
add eax, 0x120
mov dword [esp + 0x3c], eax
mov eax, dword [ebp + 0x22010]
mov dword [esp + 0x34], eax
cmp esi, dword [esp + 0x34]
jge 0x6722c897
mov eax, esi
sar eax, 5
lea eax, [ebp + eax*4]
mov dword [esp + 0x28], eax
mov eax, dword [eax + 0x22018]
test eax, eax
js 0x6722c8eb
cmp esi, dword [esp + 0x3c]
jge 0x6722c8f3
cmp esi, dword [esp + 0x2c]
jle 0x6722ca1a
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x2c]
lea edx, [esi*4]
mov dword [ecx + 0x22018], edi
mov ecx, dword [ebp + 0x22000]
lea eax, [ecx + edx]
lea ebx, [ecx + edx + 0x80]
mov ecx, edi
sub ecx, esi
mov edx, dword [eax]
mov dword [eax + ecx*4], edx
add eax, 4
cmp eax, ebx
jne 0x6722c873
mov eax, dword [ebp + 0x22010]
add dword [esp + 0x2c], 0x20
add esi, 0x20
mov dword [esp + 0x34], eax
cmp esi, dword [esp + 0x34]
jl 0x6722c81b
mov edx, dword [ebp + 0x22008]
test edx, edx
jle 0x6722c8cf
lea ecx, [ebp + edx*4]
mov eax, ebp
mov esi, esi
lea edi, [edi]
mov ebx, dword [eax]
mov edx, dword [eax]
add eax, 4
sar ebx, 0x1f
xor edx, ebx
sub edx, ebx
sar edx, 5
mov edx, dword [ebp + edx*4 + 0x22018]
mov dword [eax - 4], edx
cmp eax, ecx
jne 0x6722c8b0
mov eax, dword [esp + 0x2c]
mov dword [ebp + 0x22010], eax
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x28]
mov dword [eax + 0x22018], ebx
add esi, 0x20
jmp 0x6722c815
cmp byte [esp + 0x3b], 0
je 0x6722ca34
mov eax, dword [ebp + 0x22000]
mov edi, 4
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
sub eax, 0x20
mov dword [esp + 0x20], eax
js 0x6722ca64
mov eax, dword [esp + 0x30]
lea ebx, [edi*4]
mov dword [esp + 0x24], ebx
xor ebx, ebx
lea ecx, [eax + esi*4]
mov edx, eax
xor eax, eax
mov dword [esp + 0x1c], edi
jmp 0x6722c94a
add eax, 4
cmp eax, 0x80
je 0x6722c8e1
mov edi, dword [ecx + eax]
cmp dword [edx + eax], edi
je 0x6722c940
mov edi, dword [esp + 0x1c]
add edx, dword [esp + 0x24]
add ebx, edi
cmp dword [esp + 0x20], ebx
jge 0x6722c934
cmp byte [esp + 0x3b], 0
je 0x6722c840
mov dword [esp + 0x20], ecx
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x2c]
mov ebx, 0x1c
lea edi, [eax + ecx*4 - 0x70]
mov eax, dword [esp + 0x20]
mov edx, edi
mov ecx, ebx
mov dword [esp + 0x1c], edi
nop
mov edi, dword [eax]
cmp dword [edx], edi
jne 0x6722ca00
add edx, 4
add eax, 4
sub ecx, 1
jne 0x6722c990
mov ecx, dword [esp + 0x2c]
mov edi, dword [esp + 0x28]
add esi, ebx
mov edx, esi
sub edx, ebx
mov eax, ecx
sub ecx, esi
sub eax, ebx
mov dword [edi + 0x22018], eax
mov edi, dword [esp + 0x30]
lea eax, [edi + esi*4]
lea edi, [edi + edx*4 + 0x80]
mov edx, dword [eax]
mov dword [eax + ecx*4], edx
add eax, 4
cmp eax, edi
jne 0x6722c9c9
mov ecx, dword [esp + 0x2c]
mov eax, 0x1f
sub eax, ebx
lea esi, [esi + eax + 1]
lea ecx, [ecx + eax + 1]
mov eax, dword [ebp + 0x22010]
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x34], eax
jmp 0x6722c815
mov edi, dword [esp + 0x1c]
add edi, 0x10
sub ebx, 4
jne 0x6722c982
cmp esi, dword [esp + 0x2c]
jg 0x6722c84a
mov eax, dword [esp + 0x28]
mov dword [eax + 0x22018], esi
mov esi, dword [esp + 0x2c]
add esi, 0x20
mov dword [esp + 0x2c], esi
jmp 0x6722c815
mov eax, dword [ebp + 0x22000]
mov edi, 0x20
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x2c]
sub eax, 0x20
mov dword [esp + 0x20], eax
jns 0x6722c91e
jmp 0x6722c840
mov dword [ecx], 1
jmp 0x6722c775
mov eax, dword [esp + 0x30]
lea eax, [eax + esi*4]
mov dword [esp + 0x20], eax
jmp 0x6722c971