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

Disassembly:
sub esp, 0x2c
cmp byte [esp + 0x34], 0
push ebx
push ebp
push esi
push edi
mov edi, edx
mov esi, ecx
mov dword [esp + 0x24], edi
mov dword [esp + 0x38], esi
je 0x41511b
mov edi, dword [esp + 0x40]
mov dword [esp + 0x24], edi
jmp 0x41512a
push 0x40
push dword [esp + 0x44]
push edi
call fcn.004247c0
add esp, 0xc
mov eax, dword [esi + 8]
mov ebx, dword [esi + 4]
mov ebp, dword [esi]
mov ecx, dword [edi]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0xc]
mov esi, dword [esi + 0x10]
mov dword [esp + 0x20], eax
xor eax, eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
call fcn.00415c07
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
mov ecx, dword [eax + 4]
call fcn.00415c07
mov ecx, dword [esp + 0x28]
mov edx, ebx
rol edx, 5
add edx, eax
mov dword [ecx + 4], eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
xor ecx, esi
and ecx, ebp
add eax, 0x5a827999
xor ecx, dword [esp + 0x1c]
add ecx, edx
ror ebp, 2
add eax, ecx
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax - 4]
call fcn.00415c07
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
rol edx, 5
add edx, eax
mov dword [ecx - 4], eax
mov ecx, esi
mov eax, dword [esp + 0x1c]
xor ecx, ebp
and ecx, ebx
add eax, 0x5a827999
xor ecx, esi
ror ebx, 2
add ecx, edx
add eax, ecx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x18]
mov ecx, dword [eax]
call fcn.00415c07
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
rol edx, 5
add edx, 0x5a827999
mov dword [ecx], eax
add edx, eax
mov eax, dword [esp + 0x18]
mov ecx, ebx
xor ecx, ebp
and ecx, dword [esp + 0x20]
ror dword [esp + 0x20], 2
xor ecx, ebp
add ecx, edx
add esi, ecx
mov ecx, dword [eax + 4]
call fcn.00415c07
mov ecx, dword [esp + 0x18]
mov edx, esi
add dword [esp + 0x18], 0x14
rol edx, 5
mov dword [ecx + 4], eax
add eax, 0x5a827999
add edx, eax
mov ecx, ebx
xor ecx, dword [esp + 0x20]
and ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
xor ecx, ebx
ror dword [esp + 0x1c], 2
add eax, 5
add ecx, edx
mov dword [esp + 0x14], eax
add ebp, ecx
lea eax, [edi + eax*4]
mov ecx, dword [eax]
mov dword [esp + 0x28], eax
call fcn.00415c07
mov ecx, dword [esp + 0x28]
mov edx, ebp
rol edx, 5
mov dword [ecx], eax
mov ecx, dword [esp + 0x20]
xor ecx, dword [esp + 0x1c]
and ecx, esi
add edx, eax
xor ecx, dword [esp + 0x20]
add ebx, 0x5a827999
mov eax, dword [esp + 0x28]
add ecx, edx
add ebx, ecx
ror esi, 2
cmp dword [esp + 0x14], 0xf
jne 0x415186
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 + ebx*4]
xor edx, dword [edi + ebp*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 + 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 + 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 0x4153a2
push 0x25
pop esi
mov dword [esp + 0x28], esi
jmp 0x41558c
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 + 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]
xor esi, dword [ebp + ebx*4]
mov eax, dword [esp + 0x30]
xor esi, dword [ebp + eax*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 0x415588
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 + ebx*4]
xor edx, dword [esi + ebp*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 + ebp*4]
xor edx, dword [ebx + esi*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 0x415782
mov eax, dword [esp + 0x38]
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, 0x2c
ret 8