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

Disassembly:
sub esp, 0x1c
cmp byte [esp + 0x2c], 0
push ebx
push ebp
push esi
push edi
je 0x405764
mov edi, dword [esp + 0x38]
mov dword [esp + 0x18], edi
jmp 0x40577b
mov edi, dword [esp + 0x34]
push 0x40
push dword [esp + 0x3c]
mov dword [esp + 0x20], edi
push edi
call fcn.004141a0
add esp, 0xc
mov esi, dword [esp + 0x30]
push dword [edi]
mov eax, dword [esi + 8]
mov ebx, dword [esi]
mov ebp, dword [esi + 4]
mov dword [esp + 0x3c], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esi + 0x10]
mov dword [esp + 0x40], eax
xor eax, eax
mov dword [esp + 0x18], eax
call fcn.0041a5d4
pop ecx
mov ecx, dword [esp + 0x3c]
mov edx, ebx
xor ecx, dword [esp + 0x38]
add esi, 0x5a827999
and ecx, ebp
rol edx, 5
xor ecx, dword [esp + 0x3c]
add edx, eax
add ecx, edx
mov dword [edi], eax
add esi, ecx
mov eax, edi
lea ecx, [edi + 0xc]
ror ebp, 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x34], ecx
push dword [eax + 4]
call fcn.0041a5d4
mov ecx, dword [esp + 0x20]
mov edx, esi
rol edx, 5
add edx, eax
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
xor ecx, ebp
and ecx, ebx
add eax, 0x5a827999
xor ecx, dword [esp + 0x3c]
add ecx, edx
ror ebx, 2
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x38]
push dword [eax - 4]
call fcn.0041a5d4
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x44]
rol edx, 5
add edx, eax
mov dword [ecx - 4], eax
mov ecx, ebp
mov eax, dword [esp + 0x40]
xor ecx, ebx
and ecx, esi
add eax, 0x5a827999
xor ecx, ebp
ror esi, 2
add ecx, edx
add eax, ecx
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x3c]
push dword [eax]
call fcn.0041a5d4
mov ecx, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
rol edx, 5
add edx, 0x5a827999
mov dword [ecx], eax
add edx, eax
mov eax, dword [esp + 0x40]
mov ecx, esi
xor ecx, ebx
and ecx, dword [esp + 0x48]
ror dword [esp + 0x48], 2
xor ecx, ebx
push dword [eax + 4]
add ecx, edx
add ebp, ecx
call fcn.0041a5d4
mov ecx, dword [esp + 0x44]
mov edx, ebp
add dword [esp + 0x44], 0x14
rol edx, 5
mov dword [ecx + 4], eax
add eax, 0x5a827999
add edx, eax
mov ecx, esi
mov eax, dword [esp + 0x24]
xor ecx, dword [esp + 0x4c]
add eax, 5
and ecx, dword [esp + 0x48]
ror dword [esp + 0x48], 2
xor ecx, esi
mov dword [esp + 0x24], eax
add ecx, edx
lea eax, [edi + eax*4]
add ebx, ecx
push dword [eax]
mov dword [esp + 0x30], eax
call fcn.0041a5d4
mov ecx, dword [esp + 0x30]
mov edx, ebx
add esp, 0x14
rol edx, 5
mov dword [ecx], eax
mov ecx, dword [esp + 0x3c]
xor ecx, dword [esp + 0x38]
add edx, eax
mov eax, dword [esp + 0x1c]
and ecx, ebp
xor ecx, dword [esp + 0x3c]
add esi, 0x5a827999
add ecx, edx
ror ebp, 2
add esi, ecx
cmp dword [esp + 0x14], 0xf
jne 0x4057d4
mov edx, dword [edi + 0x34]
mov ecx, esi
xor edx, dword [edi + 0x20]
xor edx, dword [edi + 8]
xor edx, dword [edi]
mov eax, dword [esp + 0x38]
xor eax, ebp
rol edx, 1
and eax, ebx
rol ecx, 5
xor eax, dword [esp + 0x38]
add ecx, edx
add eax, ecx
mov dword [edi], edx
mov ecx, dword [esp + 0x3c]
mov edx, dword [edi + 0x38]
add ecx, 0x5a827999
xor edx, dword [edi + 0x24]
add eax, ecx
xor edx, dword [edi + 0xc]
mov ecx, eax
xor edx, dword [edi + 4]
mov dword [esp + 0x3c], eax
mov eax, ebp
rol edx, 1
rol ecx, 5
add ecx, edx
ror ebx, 2
xor eax, ebx
mov dword [edi + 4], edx
mov edx, dword [edi + 0x3c]
and eax, esi
xor edx, dword [edi + 0x28]
xor eax, ebp
xor edx, dword [edi + 0x10]
add eax, ecx
mov ecx, dword [esp + 0x38]
xor edx, dword [edi + 8]
add ecx, 0x5a827999
add eax, ecx
ror esi, 2
mov dword [esp + 0x34], eax
mov ecx, eax
rol edx, 1
mov eax, esi
xor eax, ebx
rol ecx, 5
and eax, dword [esp + 0x3c]
add ecx, 0x5a827999
add ecx, edx
mov dword [edi + 8], edx
mov edx, dword [edi + 0x2c]
xor eax, ebx
xor edx, dword [edi + 0x14]
add eax, ecx
xor edx, dword [edi + 0xc]
add eax, ebp
mov ebp, dword [esp + 0x3c]
mov ecx, eax
xor edx, dword [edi]
mov dword [esp + 0x10], eax
mov eax, esi
ror ebp, 2
xor eax, ebp
mov dword [esp + 0x3c], ebp
mov ebp, dword [esp + 0x34]
and eax, ebp
rol edx, 1
xor eax, esi
rol ecx, 5
add eax, 0x5a827999
add ecx, edx
mov dword [edi + 0xc], edx
add eax, ecx
add eax, ebx
ror ebp, 2
push 0x11
pop edx
mov dword [esp + 0x38], eax
mov dword [esp + 0x34], ebp
mov dword [esp + 0x1c], edx
lea eax, [edx + 5]
mov ebx, eax
mov dword [esp + 0x24], eax
lea ecx, [edx - 5]
mov eax, edx
and ecx, 0xf
lea ebp, [edx + 3]
and eax, 0xf
and ebp, 0xf
and ebx, 0xf
mov dword [esp + 0x20], ebp
push 0xf
mov edx, dword [edi + ecx*4]
xor edx, dword [edi + eax*4]
xor edx, dword [edi + ebx*4]
xor edx, dword [edi + ebp*4]
mov eax, dword [esp + 0x40]
xor eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
rol edx, 1
mov dword [edi + ebp*4], edx
mov ebp, dword [esp + 0x14]
xor eax, ebp
rol ecx, 5
add eax, 0x6ed9eba1
add ecx, edx
ror ebp, 2
add eax, ecx
mov dword [esp + 0x14], ebp
add esi, eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x18], esi
mov esi, dword [esp + 0x1c]
pop edx
lea edi, [eax + 6]
and edi, edx
lea ebp, [eax + 4]
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 ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
xor eax, dword [esp + 0x10]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x38]
xor eax, esi
rol ecx, 5
add ecx, edx
ror esi, 2
mov edx, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x3c]
add ecx, 0x6ed9eba1
mov dword [esp + 0x38], esi
add ecx, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x3c], 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 + 0x18]
xor edx, dword [ecx + eax*4]
xor edx, dword [ecx + ebx*4]
xor edx, dword [ecx + esi*4]
rol edx, 1
mov dword [ecx + ebx*4], edx
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x14]
mov eax, ebx
rol ecx, 5
xor eax, dword [esp + 0x10]
add ecx, edx
xor eax, dword [esp + 0x38]
add eax, ecx
ror ebx, 2
mov ecx, dword [esp + 0x34]
add ecx, 0x6ed9eba1
mov dword [esp + 0x14], ebx
add ecx, eax
mov ebx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x34], 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 + 0x20]
mov ecx, dword [esp + 0x34]
rol ecx, 5
xor edx, dword [ebx + eax*4]
mov eax, dword [esp + 0x14]
rol edx, 1
add ecx, edx
mov dword [ebx + edi*4], edx
mov ebx, dword [esp + 0x3c]
xor eax, ebx
xor eax, dword [esp + 0x38]
mov edi, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esp + 0x10]
add ecx, 0x6ed9eba1
ror ebx, 2
add ecx, eax
mov dword [esp + 0x3c], ebx
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x10], 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]
xor edx, dword [edi + ebp*4]
xor edx, dword [edi + esi*4]
mov ecx, dword [esp + 0x10]
mov ebp, dword [esp + 0x34]
rol edx, 1
mov dword [edi + esi*4], edx
mov esi, dword [esp + 0x14]
mov eax, esi
rol ecx, 5
xor eax, ebx
add ecx, edx
xor eax, ebp
mov edx, dword [esp + 0x24]
add eax, ecx
mov ecx, dword [esp + 0x38]
add ecx, 0x6ed9eba1
ror ebp, 2
add ecx, eax
mov dword [esp + 0x34], ebp
lea eax, [edx + 3]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x1c], edx
cmp eax, 0x23
jbe 0x4059e6
push 0x25
pop esi
mov dword [esp + 0x1c], esi
jmp 0x405bcd
mov edi, dword [esp + 0x18]
lea eax, [esi + 5]
lea ecx, [esi - 5]
mov dword [esp + 0x28], eax
and ecx, 0xf
lea edx, [esi + 3]
mov ebp, eax
and edx, 0xf
mov eax, esi
mov dword [esp + 0x24], 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 + edx*4]
xor esi, dword [edi + ebp*4]
mov eax, dword [esp + 0x38]
mov ecx, eax
or ecx, dword [esp + 0x14]
and ecx, ebx
rol esi, 1
mov ebx, dword [esp + 0x14]
and eax, ebx
mov dword [edi + edx*4], esi
or ecx, eax
mov edx, dword [esp + 0x3c]
add ecx, esi
add ecx, dword [esp + 0x18]
rol edx, 5
ror ebx, 2
pop esi
mov dword [esp + 0x10], ebx
lea eax, [edx - 0x70e44324]
add eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x1c]
lea ebx, [eax + 6]
lea edx, [eax + 4]
and ebx, esi
and edx, esi
lea ecx, [eax - 4]
and ecx, esi
mov dword [esp + 0x20], 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 + 0x10]
mov ecx, eax
rol esi, 1
mov dword [edi + edx*4], esi
mov edi, dword [esp + 0x38]
or ecx, edi
and ecx, dword [esp + 0x34]
and eax, edi
mov edx, dword [esp + 0x14]
or ecx, eax
add ecx, esi
rol edx, 5
add ecx, dword [esp + 0x3c]
ror edi, 2
mov dword [esp + 0x38], edi
lea eax, [edx - 0x70e44324]
mov edx, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
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 ebp, dword [esp + 0x14]
mov ecx, ebp
or ecx, dword [esp + 0x38]
mov eax, ebp
and ecx, dword [esp + 0x10]
and eax, dword [esp + 0x38]
or ecx, eax
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x1c]
add ecx, esi
add ecx, dword [esp + 0x34]
rol edx, 5
add edx, 0x8f1bbcdc
ror ebp, 2
add edx, ecx
mov dword [esp + 0x14], ebp
mov ebp, dword [esp + 0x18]
lea ecx, [eax - 8]
and ecx, 0xf
mov dword [esp + 0x34], edx
add eax, 0xfffffffe
rol edx, 5
and eax, 0xf
mov esi, dword [ebp + ecx*4]
xor esi, dword [ebp + eax*4]
mov eax, dword [esp + 0x24]
xor esi, dword [ebp + eax*4]
xor esi, dword [ebp + ebx*4]
mov eax, dword [esp + 0x14]
mov ecx, eax
rol esi, 1
mov dword [ebp + ebx*4], esi
mov ebx, dword [esp + 0x3c]
or ecx, ebx
and ecx, dword [esp + 0x38]
and eax, ebx
or ecx, eax
ror ebx, 2
mov eax, dword [esp + 0x1c]
add ecx, 0x8f1bbcdc
add ecx, esi
mov dword [esp + 0x3c], ebx
add ecx, dword [esp + 0x10]
add edx, ecx
lea ecx, [eax - 7]
mov dword [esp + 0x10], edx
and ecx, 0xf
rol edx, 5
dec eax
and eax, 0xf
mov esi, dword [ebp + ecx*4]
mov ecx, ebx
xor esi, dword [ebp + eax*4]
xor esi, dword [ebp + edi*4]
mov eax, dword [esp + 0x20]
xor esi, dword [ebp + eax*4]
mov eax, ebx
rol esi, 1
mov dword [ebp + edi*4], esi
mov ebp, dword [esp + 0x34]
or ecx, ebp
mov edi, dword [esp + 0x14]
and eax, ebp
and ecx, edi
ror ebp, 2
or ecx, eax
mov dword [esp + 0x34], ebp
add ecx, esi
lea eax, [edx - 0x70e44324]
add ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x28]
add eax, ecx
mov dword [esp + 0x38], eax
mov dword [esp + 0x1c], esi
lea eax, [esi + 3]
cmp eax, 0x37
jbe 0x405bc9
push 0x39
pop edx
mov dword [esp + 0x1c], edx
lea eax, [edx + 5]
mov ebx, eax
mov dword [esp + 0x24], 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 + 0x18]
mov dword [esp + 0x28], ebp
push 0xf
mov edx, dword [esi + ecx*4]
xor edx, dword [esi + eax*4]
xor edx, dword [esi + ebx*4]
xor edx, dword [esi + ebp*4]
mov eax, dword [esp + 0x40]
xor eax, dword [esp + 0x38]
mov ecx, dword [esp + 0x3c]
rol edx, 1
mov dword [esi + ebp*4], edx
mov ebp, dword [esp + 0x14]
xor eax, ebp
add eax, edx
rol ecx, 5
add eax, edi
ror ebp, 2
add ecx, 0xca62c1d6
mov dword [esp + 0x14], ebp
add eax, ecx
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x20]
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 + 0x34]
xor eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x38]
xor eax, esi
add eax, edx
rol ecx, 5
add eax, dword [esp + 0x3c]
add ecx, 0xca62c1d6
mov edx, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x1c]
ror esi, 2
mov dword [esp + 0x38], 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 + 0x18]
xor edx, dword [ecx + eax*4]
xor edx, dword [ecx + ebx*4]
xor edx, dword [ecx + esi*4]
rol edx, 1
mov dword [ecx + ebx*4], edx
mov ecx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x14]
rol ecx, 5
add ecx, 0xca62c1d6
mov eax, ebx
xor eax, dword [esp + 0x10]
xor eax, dword [esp + 0x38]
add eax, edx
ror ebx, 2
add eax, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x14], ebx
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x1c]
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]
xor edx, dword [ebx + edi*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x34]
rol ecx, 5
add ecx, 0xca62c1d6
xor edx, dword [ebx + eax*4]
rol edx, 1
mov dword [ebx + edi*4], edx
mov edi, dword [esp + 0x14]
mov eax, edi
xor eax, dword [esp + 0x3c]
xor eax, dword [esp + 0x38]
ror dword [esp + 0x3c], 2
add eax, edx
add eax, dword [esp + 0x10]
add eax, ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
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 + ebp*4]
xor edx, dword [ebx + esi*4]
mov ebp, dword [esp + 0x34]
rol edx, 1
mov dword [ebx + esi*4], edx
mov ebx, dword [esp + 0x3c]
xor eax, ebx
mov esi, dword [esp + 0x10]
xor eax, ebp
add eax, edx
ror ebp, 2
add eax, dword [esp + 0x38]
mov ecx, esi
mov edx, dword [esp + 0x24]
rol ecx, 5
add ecx, 0xca62c1d6
mov dword [esp + 0x34], ebp
add ecx, eax
mov dword [esp + 0x1c], edx
lea eax, [edx + 3]
mov dword [esp + 0x38], ecx
cmp eax, 0x4b
jbe 0x405dc7
mov eax, dword [esp + 0x30]
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, 0x1c
ret 0x10