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

Disassembly:
sub esp, 0x28
cmp byte [esp + 0x38], 0
push ebx
push ebp
push esi
push edi
je 0x405b05
mov edi, dword [esp + 0x44]
mov dword [esp + 0x24], edi
jmp 0x405b1c
mov edi, dword [esp + 0x40]
push 0x40
push dword [esp + 0x48]
mov dword [esp + 0x2c], edi
push edi
call fcn.00416ad0
add esp, 0xc
mov esi, dword [esp + 0x3c]
push dword [edi]
mov eax, dword [esi + 8]
mov ebx, dword [esi + 4]
mov ebp, dword [esi]
mov dword [esp + 0x20], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esi + 0x10]
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
call fcn.0041ccd4
pop ecx
mov ecx, dword [esp + 0x20]
mov edx, ebp
xor ecx, dword [esp + 0x1c]
add esi, 0x5a827999
and ebx, ecx
rol edx, 5
xor ebx, dword [esp + 0x20]
lea ecx, [edi + 0xc]
add edx, eax
mov dword [edi], eax
add ebx, edx
mov eax, edi
add ebx, esi
mov dword [esp + 0x28], eax
mov esi, dword [esp + 0x18]
ror esi, 2
mov dword [esp + 0x18], ecx
push dword [eax + 4]
call fcn.0041ccd4
mov ecx, dword [esp + 0x2c]
mov edx, ebx
rol edx, 5
add edx, eax
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
xor ecx, esi
and ecx, ebp
add eax, 0x5a827999
xor ecx, dword [esp + 0x20]
add ecx, edx
ror ebp, 2
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x1c]
push dword [eax - 4]
call fcn.0041ccd4
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x28]
rol edx, 5
add edx, eax
mov dword [ecx - 4], eax
mov ecx, esi
mov eax, dword [esp + 0x24]
xor ecx, ebp
and ecx, ebx
add eax, 0x5a827999
xor ecx, esi
ror ebx, 2
add ecx, edx
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
push dword [eax]
call fcn.0041ccd4
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
rol edx, 5
add edx, 0x5a827999
mov dword [ecx], eax
add edx, eax
mov eax, dword [esp + 0x24]
mov ecx, ebx
xor ecx, ebp
and ecx, dword [esp + 0x2c]
ror dword [esp + 0x2c], 2
xor ecx, ebp
push dword [eax + 4]
add ecx, edx
add esi, ecx
call fcn.0041ccd4
mov ecx, dword [esp + 0x28]
mov edx, esi
add dword [esp + 0x28], 0x14
rol edx, 5
mov dword [ecx + 4], eax
add eax, 0x5a827999
add edx, eax
mov ecx, ebx
mov eax, dword [esp + 0x24]
xor ecx, dword [esp + 0x30]
add eax, 5
and ecx, dword [esp + 0x2c]
ror dword [esp + 0x2c], 2
xor ecx, ebx
mov dword [esp + 0x24], eax
add ecx, edx
lea eax, [edi + eax*4]
add ebp, ecx
push dword [eax]
mov dword [esp + 0x3c], eax
call fcn.0041ccd4
mov ecx, dword [esp + 0x3c]
mov edx, ebp
add esp, 0x14
rol edx, 5
mov dword [ecx], eax
mov ecx, dword [esp + 0x20]
xor ecx, dword [esp + 0x1c]
add edx, eax
mov eax, dword [esp + 0x28]
and ecx, esi
xor ecx, dword [esp + 0x20]
add ebx, 0x5a827999
add ecx, edx
ror esi, 2
add ebx, ecx
cmp dword [esp + 0x14], 0xf
jne 0x405b7d
mov eax, dword [esp + 0x1c]
mov ecx, ebx
mov edx, dword [edi + 0x38]
xor edx, dword [edi + 0x24]
xor edx, dword [edi + 4]
xor edx, dword [edi + 0xc]
mov dword [esp + 0x18], esi
xor eax, dword [esp + 0x18]
mov esi, dword [edi + 0x34]
and eax, ebp
xor eax, dword [esp + 0x1c]
xor esi, dword [edi + 0x20]
xor esi, dword [edi]
xor esi, dword [edi + 8]
rol ecx, 5
rol esi, 1
add ecx, esi
rol edx, 1
add eax, ecx
ror ebp, 2
mov ecx, dword [esp + 0x20]
add ecx, 0x5a827999
mov dword [edi + 4], edx
add eax, ecx
mov dword [edi], esi
mov dword [esp + 0x10], eax
mov ecx, eax
mov eax, dword [esp + 0x18]
xor eax, ebp
rol ecx, 5
add ecx, edx
and eax, ebx
xor eax, dword [esp + 0x18]
mov edx, dword [edi + 0x3c]
add eax, ecx
xor edx, dword [edi + 0x28]
mov ecx, dword [esp + 0x1c]
xor edx, dword [edi + 0x10]
add ecx, 0x5a827999
xor edx, dword [edi + 8]
add eax, ecx
mov dword [esp + 0x14], eax
mov ecx, eax
ror ebx, 2
rol edx, 1
mov eax, ebx
xor eax, ebp
rol ecx, 5
and eax, dword [esp + 0x10]
add ecx, edx
ror dword [esp + 0x10], 2
xor eax, ebp
add eax, ecx
mov dword [edi + 8], edx
mov ecx, dword [esp + 0x18]
mov edx, dword [edi + 0x2c]
add ecx, 0x5a827999
xor edx, dword [edi + 0x14]
add eax, ecx
mov ecx, eax
mov dword [esp + 0x18], eax
xor edx, esi
rol ecx, 5
xor edx, dword [edi + 0xc]
mov eax, ebx
mov esi, dword [esp + 0x10]
add ecx, 0x5a827999
xor eax, esi
rol edx, 1
and eax, dword [esp + 0x14]
add ecx, edx
xor eax, ebx
mov dword [edi + 0xc], edx
add eax, ecx
mov dword [esp + 0x20], ebx
push 0x11
add eax, ebp
ror dword [esp + 0x18], 2
pop edx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], edx
xor esi, dword [esp + 0x14]
lea eax, [edx + 5]
lea ecx, [edx - 5]
mov dword [esp + 0x30], eax
and ecx, 0xf
lea ebp, [edx + 3]
mov ebx, eax
and ebp, 0xf
mov eax, edx
mov dword [esp + 0x2c], ebp
and eax, 0xf
and ebx, 0xf
mov edx, dword [edi + ecx*4]
mov ecx, dword [esp + 0x1c]
rol ecx, 5
xor edx, dword [edi + eax*4]
xor edx, dword [edi + ebp*4]
xor edx, dword [edi + ebx*4]
mov eax, dword [esp + 0x28]
rol edx, 1
add ecx, edx
mov dword [edi + ebp*4], edx
mov ebp, dword [esp + 0x18]
xor esi, ebp
add esi, ecx
ror ebp, 2
mov ecx, dword [esp + 0x20]
lea edi, [eax + 6]
add ecx, 0x6ed9eba1
mov dword [esp + 0x18], ebp
add ecx, esi
lea ebp, [eax + 4]
mov esi, dword [esp + 0x24]
mov dword [esp + 0x20], ecx
lea ecx, [eax - 4]
push 0xf
pop edx
and ecx, edx
and ebp, edx
and edi, edx
inc eax
and eax, edx
mov edx, dword [esi + ecx*4]
mov ecx, dword [esp + 0x20]
xor edx, dword [esi + eax*4]
xor edx, dword [esi + ebp*4]
xor edx, dword [esi + edi*4]
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x18]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x1c]
xor eax, esi
rol ecx, 5
add ecx, edx
ror esi, 2
mov edx, dword [esp + 0x24]
add eax, ecx
mov ecx, dword [esp + 0x10]
add ecx, 0x6ed9eba1
mov dword [esp + 0x1c], esi
add ecx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x10], ecx
lea ecx, [eax - 3]
and ecx, 0xf
lea esi, [eax + 7]
add eax, 2
and esi, 0xf
and eax, 0xf
mov edx, dword [edx + ecx*4]
mov ecx, dword [esp + 0x24]
xor edx, dword [ecx + eax*4]
xor edx, dword [ecx + esi*4]
xor edx, dword [ecx + ebx*4]
rol edx, 1
mov dword [ecx + ebx*4], edx
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
mov eax, ebx
rol ecx, 5
xor eax, dword [esp + 0x18]
add ecx, edx
xor eax, dword [esp + 0x1c]
add eax, ecx
ror ebx, 2
mov ecx, dword [esp + 0x14]
add ecx, 0x6ed9eba1
mov dword [esp + 0x20], ebx
add ecx, eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x14], ecx
lea ecx, [eax - 8]
add eax, 0xfffffffe
and ecx, 0xf
and eax, 0xf
mov edx, dword [ebx + ecx*4]
xor edx, dword [ebx + eax*4]
xor edx, dword [ebx + edi*4]
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
rol ecx, 5
xor edx, dword [ebx + eax*4]
rol edx, 1
add ecx, edx
mov dword [ebx + edi*4], edx
mov ebx, dword [esp + 0x20]
mov eax, ebx
mov edi, dword [esp + 0x10]
xor eax, edi
xor eax, dword [esp + 0x1c]
add eax, ecx
ror edi, 2
mov ecx, dword [esp + 0x18]
add ecx, 0x6ed9eba1
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x24]
add ecx, eax
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], ecx
lea ecx, [eax - 7]
and ecx, 0xf
dec eax
and eax, 0xf
mov edx, dword [edi + ecx*4]
xor edx, dword [edi + eax*4]
mov eax, ebx
xor edx, dword [edi + esi*4]
xor edx, dword [edi + ebp*4]
mov ecx, dword [esp + 0x18]
mov ebp, dword [esp + 0x14]
rol edx, 1
rol ecx, 5
mov dword [edi + esi*4], edx
add ecx, edx
mov esi, dword [esp + 0x10]
xor eax, esi
mov edx, dword [esp + 0x30]
xor eax, ebp
add eax, ecx
ror ebp, 2
mov ecx, dword [esp + 0x1c]
add ecx, 0x6ed9eba1
mov dword [esp + 0x14], ebp
add ecx, eax
mov dword [esp + 0x28], edx
lea eax, [edx + 3]
mov dword [esp + 0x1c], ecx
cmp eax, 0x23
jbe 0x405d9c
push 0x25
pop esi
mov dword [esp + 0x28], esi
jmp 0x405f86
mov edi, dword [esp + 0x24]
lea eax, [esi + 5]
lea ecx, [esi - 5]
mov dword [esp + 0x34], eax
and ecx, 0xf
lea edx, [esi + 3]
mov ebp, eax
and edx, 0xf
mov eax, esi
mov dword [esp + 0x30], edx
and eax, 0xf
and ebp, 0xf
mov esi, dword [edi + ecx*4]
push 0xf
xor esi, dword [edi + eax*4]
xor esi, dword [edi + ebp*4]
xor esi, dword [edi + edx*4]
mov eax, dword [esp + 0x18]
mov ecx, eax
or ecx, dword [esp + 0x1c]
and ecx, dword [esp + 0x14]
and eax, dword [esp + 0x1c]
or ecx, eax
rol esi, 1
mov dword [edi + edx*4], esi
add ecx, esi
mov edx, dword [esp + 0x20]
add ecx, ebx
ror dword [esp + 0x1c], 2
rol edx, 5
pop esi
lea eax, [edx - 0x70e44324]
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
lea ebx, [eax + 6]
and ebx, esi
lea edx, [eax + 4]
and edx, esi
lea ecx, [eax - 4]
and ecx, esi
mov dword [esp + 0x2c], edx
inc eax
and eax, esi
mov esi, dword [edi + ecx*4]
xor esi, dword [edi + eax*4]
xor esi, dword [edi + edx*4]
xor esi, dword [edi + ebx*4]
mov eax, dword [esp + 0x18]
mov ecx, eax
rol esi, 1
mov dword [edi + edx*4], esi
mov edi, dword [esp + 0x1c]
or ecx, edi
and ecx, dword [esp + 0x14]
and eax, edi
mov edx, dword [esp + 0x20]
or ecx, eax
add ecx, esi
rol edx, 5
add ecx, dword [esp + 0x10]
ror edi, 2
mov dword [esp + 0x1c], edi
lea eax, [edx - 0x70e44324]
mov edx, dword [esp + 0x24]
add eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
lea ecx, [eax - 3]
lea edi, [eax + 7]
and ecx, 0xf
add eax, 2
and edi, 0xf
and eax, 0xf
mov esi, dword [edx + ecx*4]
xor esi, dword [edx + eax*4]
xor esi, dword [edx + edi*4]
xor esi, dword [edx + ebp*4]
rol esi, 1
mov dword [edx + ebp*4], esi
mov edx, dword [esp + 0x10]
rol edx, 5
mov ebp, dword [esp + 0x20]
add edx, 0x8f1bbcdc
mov ecx, ebp
mov eax, ebp
or ecx, dword [esp + 0x1c]
and ecx, dword [esp + 0x18]
and eax, dword [esp + 0x1c]
or ecx, eax
ror ebp, 2
mov eax, dword [esp + 0x28]
add ecx, esi
add ecx, dword [esp + 0x14]
add edx, ecx
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x24]
lea ecx, [eax - 8]
mov dword [esp + 0x14], edx
and ecx, 0xf
rol edx, 5
add eax, 0xfffffffe
and eax, 0xf
mov esi, dword [ebp + ecx*4]
xor esi, dword [ebp + eax*4]
mov eax, dword [esp + 0x30]
xor esi, dword [ebp + eax*4]
xor esi, dword [ebp + ebx*4]
rol esi, 1
mov dword [ebp + ebx*4], esi
mov ebx, dword [esp + 0x20]
mov ecx, ebx
or ecx, dword [esp + 0x10]
mov eax, ebx
and ecx, dword [esp + 0x1c]
and eax, dword [esp + 0x10]
ror dword [esp + 0x10], 2
or ecx, eax
mov eax, dword [esp + 0x28]
add ecx, 0x8f1bbcdc
add ecx, esi
add ecx, dword [esp + 0x18]
add edx, ecx
lea ecx, [eax - 7]
mov dword [esp + 0x18], edx
and ecx, 0xf
rol edx, 5
dec eax
and eax, 0xf
mov esi, dword [ebp + ecx*4]
xor esi, dword [ebp + eax*4]
mov eax, dword [esp + 0x2c]
xor esi, dword [ebp + eax*4]
xor esi, dword [ebp + edi*4]
mov eax, dword [esp + 0x10]
mov ecx, eax
rol esi, 1
mov dword [ebp + edi*4], esi
mov ebp, dword [esp + 0x14]
or ecx, ebp
and eax, ebp
and ecx, ebx
or ecx, eax
ror ebp, 2
add ecx, esi
mov dword [esp + 0x14], ebp
add ecx, dword [esp + 0x1c]
lea eax, [edx - 0x70e44324]
mov esi, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], esi
lea eax, [esi + 3]
cmp eax, 0x37
jbe 0x405f82
push 0x39
pop edx
mov dword [esp + 0x28], edx
mov edi, ebx
lea eax, [edx + 5]
mov ebx, eax
mov dword [esp + 0x30], eax
lea ebp, [edx + 3]
mov eax, edx
lea ecx, [edx - 5]
push 0xf
pop esi
and eax, esi
and ecx, esi
and ebp, esi
and ebx, esi
mov esi, dword [esp + 0x24]
mov dword [esp + 0x34], ebp
push 0xf
mov edx, dword [esi + ecx*4]
xor edx, dword [esi + eax*4]
xor edx, dword [esi + ebp*4]
xor edx, dword [esi + ebx*4]
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
rol edx, 1
mov dword [esi + ebp*4], edx
mov ebp, dword [esp + 0x1c]
xor eax, ebp
add eax, edx
rol ecx, 5
add eax, edi
ror ebp, 2
add ecx, 0xca62c1d6
mov dword [esp + 0x1c], ebp
add eax, ecx
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x2c]
pop edx
lea edi, [eax + 6]
lea ebp, [eax + 4]
and edi, edx
and ebp, edx
lea ecx, [eax - 4]
and ecx, edx
inc eax
and eax, edx
mov edx, dword [esi + ecx*4]
xor edx, dword [esi + eax*4]
xor edx, dword [esi + ebp*4]
xor edx, dword [esi + edi*4]
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x1c]
xor eax, esi
add eax, edx
rol ecx, 5
add eax, dword [esp + 0x10]
add ecx, 0xca62c1d6
mov edx, dword [esp + 0x24]
add eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x28]
ror esi, 2
mov dword [esp + 0x1c], esi
lea ecx, [eax - 3]
and ecx, 0xf
lea esi, [eax + 7]
add eax, 2
and esi, 0xf
and eax, 0xf
mov edx, dword [edx + ecx*4]
mov ecx, dword [esp + 0x24]
xor edx, dword [ecx + eax*4]
xor edx, dword [ecx + esi*4]
xor edx, dword [ecx + ebx*4]
rol edx, 1
mov dword [ecx + ebx*4], edx
mov ecx, dword [esp + 0x10]
mov ebx, dword [esp + 0x20]
rol ecx, 5
add ecx, 0xca62c1d6
mov eax, ebx
xor eax, dword [esp + 0x18]
xor eax, dword [esp + 0x1c]
add eax, edx
ror ebx, 2
add eax, dword [esp + 0x14]
add eax, ecx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x28]
lea ecx, [eax - 8]
add eax, 0xfffffffe
and eax, 0xf
and ecx, 0xf
mov edx, dword [ebx + ecx*4]
xor edx, dword [ebx + eax*4]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x14]
rol ecx, 5
add ecx, 0xca62c1d6
xor edx, dword [ebx + eax*4]
xor edx, dword [ebx + edi*4]
rol edx, 1
mov dword [ebx + edi*4], edx
mov edi, dword [esp + 0x20]
mov eax, edi
xor eax, dword [esp + 0x10]
xor eax, dword [esp + 0x1c]
ror dword [esp + 0x10], 2
add eax, edx
add eax, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x28]
lea ecx, [eax - 7]
and ecx, 0xf
dec eax
and eax, 0xf
mov edx, dword [ebx + ecx*4]
xor edx, dword [ebx + eax*4]
mov eax, edi
xor edx, dword [ebx + esi*4]
xor edx, dword [ebx + ebp*4]
mov ebp, dword [esp + 0x14]
rol edx, 1
mov dword [ebx + esi*4], edx
mov ebx, dword [esp + 0x10]
xor eax, ebx
mov esi, dword [esp + 0x18]
xor eax, ebp
add eax, edx
ror ebp, 2
add eax, dword [esp + 0x1c]
mov ecx, esi
mov edx, dword [esp + 0x30]
rol ecx, 5
add ecx, 0xca62c1d6
mov dword [esp + 0x14], ebp
add ecx, eax
mov dword [esp + 0x28], edx
lea eax, [edx + 3]
mov dword [esp + 0x1c], ecx
cmp eax, 0x4b
jbe 0x40617c
mov eax, dword [esp + 0x3c]
add dword [eax + 4], esi
add dword [eax + 8], ebp
add dword [eax + 0xc], ebx
add dword [eax], ecx
add dword [eax + 0x10], edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x28
ret 0x10