Function at 0x4058d4
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 0x4058ec
mov edi, dword [esp + 0x44]
mov dword [esp + 0x24], edi
jmp 0x405903
mov edi, dword [esp + 0x40]
push 0x40
push dword [esp + 0x48]
mov dword [esp + 0x2c], edi
push edi
call fcn.00414f50
add esp, 0xc
mov esi, dword [esp + 0x3c]
push dword [edi]
mov eax, dword [esi + 8]
mov ebx, dword [esi]
mov ebp, dword [esi + 4]
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esi + 0x10]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x18], eax
call fcn.0041b394
pop ecx
mov ecx, dword [esp + 0x1c]
mov edx, ebx
xor ecx, dword [esp + 0x20]
add esi, 0x5a827999
and ecx, ebp
rol edx, 5
xor ecx, dword [esp + 0x1c]
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 + 0x28], eax
mov dword [esp + 0x18], ecx
push dword [eax + 4]
call fcn.0041b394
mov ecx, dword [esp + 0x2c]
mov edx, esi
rol edx, 5
add edx, eax
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
xor ecx, ebp
and ecx, ebx
add eax, 0x5a827999
xor ecx, dword [esp + 0x24]
add ecx, edx
ror ebx, 2
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
push dword [eax - 4]
call fcn.0041b394
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
rol edx, 5
add edx, eax
mov dword [ecx - 4], eax
mov ecx, ebp
mov eax, dword [esp + 0x28]
xor ecx, ebx
and ecx, esi
add eax, 0x5a827999
xor ecx, ebp
ror esi, 2
add ecx, edx
add eax, ecx
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x20]
push dword [eax]
call fcn.0041b394
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x2c]
rol edx, 5
add edx, 0x5a827999
mov dword [ecx], eax
add edx, eax
mov eax, dword [esp + 0x24]
mov ecx, esi
xor ecx, ebx
and ecx, dword [esp + 0x28]
ror dword [esp + 0x28], 2
xor ecx, ebx
push dword [eax + 4]
add ecx, edx
add ebp, ecx
call fcn.0041b394
mov ecx, dword [esp + 0x28]
mov edx, ebp
add dword [esp + 0x28], 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 + 0x2c]
add eax, 5
and ecx, dword [esp + 0x30]
ror dword [esp + 0x30], 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 + 0x3c], eax
call fcn.0041b394
mov ecx, dword [esp + 0x3c]
mov edx, ebx
add esp, 0x14
rol edx, 5
mov dword [ecx], eax
mov ecx, dword [esp + 0x1c]
xor ecx, dword [esp + 0x20]
add edx, eax
mov eax, dword [esp + 0x28]
and ecx, ebp
xor ecx, dword [esp + 0x1c]
add esi, 0x5a827999
add ecx, edx
ror ebp, 2
add esi, ecx
cmp dword [esp + 0x14], 0xf
jne 0x40595c
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 + 0x20]
xor eax, ebp
rol edx, 1
and eax, ebx
rol ecx, 5
xor eax, dword [esp + 0x20]
add ecx, edx
add eax, ecx
mov dword [edi], edx
mov ecx, dword [esp + 0x1c]
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 + 0x10], 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 + 0x20]
xor edx, dword [edi + 8]
add ecx, 0x5a827999
add eax, ecx
ror esi, 2
mov dword [esp + 0x18], eax
mov ecx, eax
rol edx, 1
mov eax, esi
xor eax, ebx
rol ecx, 5
and eax, dword [esp + 0x10]
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 + 0x10]
mov ecx, eax
xor edx, dword [edi]
mov dword [esp + 0x1c], eax
mov eax, esi
ror ebp, 2
xor eax, ebp
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x18]
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 + 0x14], eax
mov dword [esp + 0x18], ebp
mov dword [esp + 0x28], edx
lea eax, [edx + 5]
mov ebx, eax
mov dword [esp + 0x30], 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 + 0x2c], 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 + 0x14]
xor eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
rol edx, 1
mov dword [edi + ebp*4], edx
mov ebp, dword [esp + 0x20]
xor eax, ebp
rol ecx, 5
add eax, 0x6ed9eba1
add ecx, edx
ror ebp, 2
add eax, ecx
mov dword [esp + 0x20], ebp
add esi, eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x28]
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 + 0x20]
mov eax, dword [esp + 0x18]
xor eax, dword [esp + 0x1c]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x14]
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 + 0x14], 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 + ebx*4]
xor edx, dword [ecx + esi*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 + 0x1c]
add ecx, edx
xor eax, dword [esp + 0x14]
add eax, ecx
ror ebx, 2
mov ecx, dword [esp + 0x18]
add ecx, 0x6ed9eba1
mov dword [esp + 0x20], ebx
add ecx, eax
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
mov dword [esp + 0x18], 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 + 0x18]
rol ecx, 5
xor edx, dword [ebx + eax*4]
mov eax, dword [esp + 0x20]
rol edx, 1
add ecx, edx
mov dword [ebx + edi*4], edx
mov ebx, dword [esp + 0x10]
xor eax, ebx
xor eax, dword [esp + 0x14]
mov edi, dword [esp + 0x24]
add eax, ecx
mov ecx, dword [esp + 0x1c]
add ecx, 0x6ed9eba1
ror ebx, 2
add ecx, eax
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], 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 + 0x1c]
mov ebp, dword [esp + 0x18]
rol edx, 1
mov dword [edi + esi*4], edx
mov esi, dword [esp + 0x20]
mov eax, esi
rol ecx, 5
xor eax, ebx
add ecx, edx
xor eax, ebp
mov edx, dword [esp + 0x30]
add eax, ecx
mov ecx, dword [esp + 0x14]
add ecx, 0x6ed9eba1
ror ebp, 2
add ecx, eax
mov dword [esp + 0x18], ebp
lea eax, [edx + 3]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x28], edx
cmp eax, 0x23
jbe 0x405b6e
push 0x25
pop esi
mov dword [esp + 0x28], esi
jmp 0x405d55
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 + edx*4]
xor esi, dword [edi + ebp*4]
mov eax, dword [esp + 0x1c]
mov ecx, eax
or ecx, dword [esp + 0x20]
and ecx, ebx
rol esi, 1
mov ebx, dword [esp + 0x20]
and eax, ebx
mov dword [edi + edx*4], esi
or ecx, eax
mov edx, dword [esp + 0x18]
add ecx, esi
add ecx, dword [esp + 0x24]
rol edx, 5
ror ebx, 2
pop esi
mov dword [esp + 0x1c], ebx
lea eax, [edx - 0x70e44324]
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x28]
lea ebx, [eax + 6]
lea edx, [eax + 4]
and ebx, esi
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 + 0x1c]
mov ecx, eax
rol esi, 1
mov dword [edi + edx*4], esi
mov edi, dword [esp + 0x14]
or ecx, edi
and ecx, dword [esp + 0x18]
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 + 0x14], 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 ebp, dword [esp + 0x20]
mov ecx, ebp
or ecx, dword [esp + 0x14]
mov eax, ebp
and ecx, dword [esp + 0x1c]
and eax, dword [esp + 0x14]
or ecx, eax
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x28]
add ecx, esi
add ecx, dword [esp + 0x18]
rol edx, 5
add edx, 0x8f1bbcdc
ror ebp, 2
add edx, ecx
mov dword [esp + 0x20], ebp
mov ebp, dword [esp + 0x24]
lea ecx, [eax - 8]
and ecx, 0xf
mov dword [esp + 0x18], 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 + 0x30]
xor esi, dword [ebp + eax*4]
xor esi, dword [ebp + ebx*4]
mov eax, dword [esp + 0x20]
mov ecx, eax
rol esi, 1
mov dword [ebp + ebx*4], esi
mov ebx, dword [esp + 0x10]
or ecx, ebx
and ecx, dword [esp + 0x14]
and eax, ebx
or ecx, eax
ror ebx, 2
mov eax, dword [esp + 0x28]
add ecx, 0x8f1bbcdc
add ecx, esi
mov dword [esp + 0x10], ebx
add ecx, dword [esp + 0x1c]
add edx, ecx
lea ecx, [eax - 7]
mov dword [esp + 0x1c], 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 + 0x2c]
xor esi, dword [ebp + eax*4]
mov eax, ebx
rol esi, 1
mov dword [ebp + edi*4], esi
mov ebp, dword [esp + 0x18]
or ecx, ebp
mov edi, dword [esp + 0x20]
and eax, ebp
and ecx, edi
ror ebp, 2
or ecx, eax
mov dword [esp + 0x18], ebp
add ecx, esi
lea eax, [edx - 0x70e44324]
add ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x34]
add eax, ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], esi
lea eax, [esi + 3]
cmp eax, 0x37
jbe 0x405d51
push 0x39
pop edx
mov dword [esp + 0x28], edx
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 + ebx*4]
xor edx, dword [esi + ebp*4]
mov eax, dword [esp + 0x14]
xor eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
rol edx, 1
mov dword [esi + ebp*4], edx
mov ebp, dword [esp + 0x20]
xor eax, ebp
add eax, edx
rol ecx, 5
add eax, edi
ror ebp, 2
add ecx, 0xca62c1d6
mov dword [esp + 0x20], 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 + 0x18]
xor eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
rol edx, 1
mov dword [esi + ebp*4], edx
mov esi, dword [esp + 0x14]
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 + 0x14], 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 + ebx*4]
xor edx, dword [ecx + esi*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 + 0x1c]
xor eax, dword [esp + 0x14]
add eax, edx
ror ebx, 2
add eax, dword [esp + 0x18]
add eax, ecx
mov dword [esp + 0x20], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x18], 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]
xor edx, dword [ebx + edi*4]
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x18]
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 + 0x20]
mov eax, edi
xor eax, dword [esp + 0x10]
xor eax, dword [esp + 0x14]
ror dword [esp + 0x10], 2
add eax, edx
add eax, dword [esp + 0x1c]
add eax, ecx
mov dword [esp + 0x1c], 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 + ebp*4]
xor edx, dword [ebx + esi*4]
mov ebp, dword [esp + 0x18]
rol edx, 1
mov dword [ebx + esi*4], edx
mov ebx, dword [esp + 0x10]
xor eax, ebx
mov esi, dword [esp + 0x1c]
xor eax, ebp
add eax, edx
ror ebp, 2
add eax, dword [esp + 0x14]
mov ecx, esi
mov edx, dword [esp + 0x30]
rol ecx, 5
add ecx, 0xca62c1d6
mov dword [esp + 0x18], ebp
add ecx, eax
mov dword [esp + 0x28], edx
lea eax, [edx + 3]
mov dword [esp + 0x14], ecx
cmp eax, 0x4b
jbe 0x405f4f
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