Function at 0x40a7d0
Capabilities:
Encode data using xor
Hash data using sha1

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffd8
mov esi, 0x41af54
mov byte [esp + 4], cl
mov dword [esp], eax
cmp byte [esp + 4], 0
je 0x40a7fd
mov ebx, 0x41af14
mov ecx, 0x40
mov eax, ebx
call fcn.0040fc7c
jmp 0x40a7ff
mov ebx, edx
cmp byte [0x4156a8], 0
jne 0x40a873
xor edi, edi
xor ecx, ecx
lea ebp, [edi + edi*4]
lea eax, [ecx + 1]
cdq
mov dword [esi + ebp*4], ecx
push ecx
mov ecx, 5
idiv ecx
pop ecx
mov dword [esi + ebp*4 + 4], edx
push ecx
lea eax, [ecx + 2]
cdq
mov ecx, 5
idiv ecx
pop ecx
mov dword [esi + ebp*4 + 8], edx
push ecx
lea eax, [ecx + 3]
cdq
mov ecx, 5
idiv ecx
pop ecx
mov dword [esi + ebp*4 + 0xc], edx
push ecx
lea eax, [ecx + 4]
cdq
mov ecx, 5
idiv ecx
pop ecx
mov dword [esi + ebp*4 + 0x10], edx
inc edi
test ecx, ecx
je 0x40a860
lea eax, [ecx - 1]
jmp 0x40a865
mov eax, 4
mov ecx, eax
cmp edi, 0x50
jl 0x40a80c
mov byte [0x4156a8], 1
xor eax, eax
mov edx, dword [esp]
mov ecx, dword [edx + eax*4]
mov dword [esp + eax*4 + 0x14], ecx
inc eax
cmp eax, 5
jl 0x40a875
xor eax, eax
mov ecx, dword [ebx + eax*4]
mov edi, dword [ebx + eax*4]
shr edi, 8
mov ebp, dword [ebx + eax*4]
shl ecx, 0x18
lea edx, [eax + eax*4]
or ecx, edi
mov edi, dword [ebx + eax*4]
shl edi, 8
and ecx, 0xff00ff00
shr ebp, 0x18
or edi, ebp
and edi, 0xff00ff
or ecx, edi
mov dword [ebx + eax*4], ecx
mov edi, dword [esi + edx*4 + 8]
mov ebp, dword [esi + edx*4 + 0xc]
mov edi, dword [esp + edi*4 + 0x14]
xor edi, dword [esp + ebp*4 + 0x14]
mov ebp, dword [esi + edx*4 + 4]
and edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
mov ebp, dword [esi + ebp*4 + 0xc]
xor edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
add ecx, edi
mov edi, dword [esi + edx*4]
mov ebp, dword [esi + ebp*4]
mov edi, dword [esp + edi*4 + 0x14]
shl edi, 5
mov ebp, dword [esp + ebp*4 + 0x14]
shr ebp, 0x1b
or edi, ebp
add ecx, edi
mov edi, dword [esi + edx*4 + 0x10]
add ecx, 0x5a827999
add dword [esp + edi*4 + 0x14], ecx
mov edx, dword [esi + edx*4 + 4]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
shl ecx, 0x1e
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
shr edx, 2
or ecx, edx
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov dword [esp + edx*4 + 0x14], ecx
inc eax
cmp eax, 0x10
jl 0x40a887
mov eax, 0x10
lea ecx, [eax + 0xd]
lea edi, [eax + 8]
and ecx, 0xf
and edi, 0xf
lea ebp, [eax + 8]
lea edx, [eax + eax*4]
mov ecx, dword [ebx + ecx*4]
and ebp, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 2]
and edi, 0xf
xor ecx, dword [ebx + edi*4]
mov edi, eax
and edi, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 0xd]
and edi, 0xf
add ecx, ecx
mov edi, dword [ebx + edi*4]
xor edi, dword [ebx + ebp*4]
lea ebp, [eax + 2]
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
mov ebp, eax
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
shr edi, 0x1f
or ecx, edi
mov edi, eax
and edi, 0xf
mov dword [ebx + edi*4], ecx
mov edi, dword [esi + edx*4 + 8]
mov ebp, dword [esi + edx*4 + 0xc]
mov edi, dword [esp + edi*4 + 0x14]
xor edi, dword [esp + ebp*4 + 0x14]
mov ebp, dword [esi + edx*4 + 4]
and edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
mov ebp, dword [esi + ebp*4 + 0xc]
xor edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
add ecx, edi
mov edi, dword [esi + edx*4]
mov ebp, dword [esi + ebp*4]
mov edi, dword [esp + edi*4 + 0x14]
shl edi, 5
mov ebp, dword [esp + ebp*4 + 0x14]
shr ebp, 0x1b
or edi, ebp
add ecx, edi
mov edi, dword [esi + edx*4 + 0x10]
add ecx, 0x5a827999
add dword [esp + edi*4 + 0x14], ecx
mov edx, dword [esi + edx*4 + 4]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
shl ecx, 0x1e
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
shr edx, 2
or ecx, edx
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov dword [esp + edx*4 + 0x14], ecx
inc eax
cmp eax, 0x14
jl 0x40a93a
mov eax, 0x14
lea ecx, [eax + 0xd]
lea edi, [eax + 8]
and ecx, 0xf
and edi, 0xf
lea ebp, [eax + 8]
lea edx, [eax + eax*4]
mov ecx, dword [ebx + ecx*4]
and ebp, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 2]
and edi, 0xf
xor ecx, dword [ebx + edi*4]
mov edi, eax
and edi, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 0xd]
and edi, 0xf
add ecx, ecx
mov edi, dword [ebx + edi*4]
xor edi, dword [ebx + ebp*4]
lea ebp, [eax + 2]
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
mov ebp, eax
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
shr edi, 0x1f
or ecx, edi
mov edi, eax
and edi, 0xf
mov dword [ebx + edi*4], ecx
mov edi, dword [esi + edx*4 + 4]
mov ebp, dword [esi + edx*4 + 8]
mov edi, dword [esp + edi*4 + 0x14]
xor edi, dword [esp + ebp*4 + 0x14]
mov ebp, dword [esi + edx*4 + 0xc]
xor edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
add ecx, edi
mov edi, dword [esi + edx*4]
mov ebp, dword [esi + ebp*4]
mov edi, dword [esp + edi*4 + 0x14]
shl edi, 5
mov ebp, dword [esp + ebp*4 + 0x14]
shr ebp, 0x1b
or edi, ebp
add ecx, edi
mov edi, dword [esi + edx*4 + 0x10]
add ecx, 0x6ed9eba1
add dword [esp + edi*4 + 0x14], ecx
mov edx, dword [esi + edx*4 + 4]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
shl ecx, 0x1e
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
shr edx, 2
or ecx, edx
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov dword [esp + edx*4 + 0x14], ecx
inc eax
cmp eax, 0x28
jl 0x40aa15
mov eax, 0x28
lea ecx, [eax + eax*4]
lea edi, [eax + eax*4]
lea ebp, [eax + 8]
and ebp, 0xf
mov edx, dword [esi + ecx*4 + 4]
mov edi, dword [esi + edi*4 + 8]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 8]
or ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 0xc]
and ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
and edx, dword [esp + edi*4 + 0x14]
lea edi, [eax + 8]
or ecx, edx
lea edx, [eax + 0xd]
and edx, 0xf
and edi, 0xf
mov edx, dword [ebx + edx*4]
xor edx, dword [ebx + edi*4]
lea edi, [eax + 2]
and edi, 0xf
xor edx, dword [ebx + edi*4]
mov edi, eax
and edi, 0xf
xor edx, dword [ebx + edi*4]
lea edi, [eax + 0xd]
and edi, 0xf
add edx, edx
mov edi, dword [ebx + edi*4]
xor edi, dword [ebx + ebp*4]
lea ebp, [eax + 2]
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
mov ebp, eax
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
shr edi, 0x1f
or edx, edi
mov edi, eax
and edi, 0xf
add ecx, edx
mov dword [ebx + edi*4], edx
lea edx, [eax + eax*4]
lea edi, [eax + eax*4]
mov edx, dword [esi + edx*4]
mov edi, dword [esi + edi*4]
mov edx, dword [esp + edx*4 + 0x14]
shl edx, 5
mov edi, dword [esp + edi*4 + 0x14]
shr edi, 0x1b
or edx, edi
add ecx, edx
lea edx, [eax + eax*4]
add ecx, 0x8f1bbcdc
mov edx, dword [esi + edx*4 + 0x10]
add dword [esp + edx*4 + 0x14], ecx
lea ecx, [eax + eax*4]
mov edx, dword [esi + ecx*4 + 4]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
shl ecx, 0x1e
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
shr edx, 2
or ecx, edx
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov dword [esp + edx*4 + 0x14], ecx
inc eax
cmp eax, 0x3c
jl 0x40aae5
mov eax, 0x3c
lea ecx, [eax + 0xd]
lea edi, [eax + 8]
and ecx, 0xf
and edi, 0xf
lea ebp, [eax + 8]
lea edx, [eax + eax*4]
mov ecx, dword [ebx + ecx*4]
and ebp, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 2]
and edi, 0xf
xor ecx, dword [ebx + edi*4]
mov edi, eax
and edi, 0xf
xor ecx, dword [ebx + edi*4]
lea edi, [eax + 0xd]
and edi, 0xf
add ecx, ecx
mov edi, dword [ebx + edi*4]
xor edi, dword [ebx + ebp*4]
lea ebp, [eax + 2]
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
mov ebp, eax
and ebp, 0xf
xor edi, dword [ebx + ebp*4]
shr edi, 0x1f
or ecx, edi
mov edi, eax
and edi, 0xf
mov dword [ebx + edi*4], ecx
mov edi, dword [esi + edx*4 + 4]
mov ebp, dword [esi + edx*4 + 8]
mov edi, dword [esp + edi*4 + 0x14]
xor edi, dword [esp + ebp*4 + 0x14]
mov ebp, dword [esi + edx*4 + 0xc]
xor edi, dword [esp + ebp*4 + 0x14]
lea ebp, [eax + eax*4]
add ecx, edi
mov edi, dword [esi + edx*4]
mov ebp, dword [esi + ebp*4]
mov edi, dword [esp + edi*4 + 0x14]
shl edi, 5
mov ebp, dword [esp + ebp*4 + 0x14]
shr ebp, 0x1b
or edi, ebp
add ecx, edi
mov edi, dword [esi + edx*4 + 0x10]
add ecx, 0xca62c1d6
add dword [esp + edi*4 + 0x14], ecx
mov edx, dword [esi + edx*4 + 4]
mov ecx, dword [esp + edx*4 + 0x14]
lea edx, [eax + eax*4]
shl ecx, 0x1e
mov edx, dword [esi + edx*4 + 4]
mov edx, dword [esp + edx*4 + 0x14]
shr edx, 2
or ecx, edx
lea edx, [eax + eax*4]
mov edx, dword [esi + edx*4 + 4]
mov dword [esp + edx*4 + 0x14], ecx
inc eax
cmp eax, 0x50
jl 0x40abdc
xor eax, eax
mov ecx, dword [esp]
mov edx, dword [esp + eax*4 + 0x14]
add dword [ecx + eax*4], edx
inc eax
cmp eax, 5
jl 0x40aca9
add esp, 0x28
pop ebp
pop edi
pop esi
pop ebx
ret