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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x160
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebx]
mov esi, 0x40
mov edx, eax
add eax, edi
and edx, 0x3f
mov dword [ebx], eax
sub esi, edx
cmp eax, edi
jae 0x40549d
inc dword [ebx + 4]
cmp edi, esi
jb 0x405675
lea eax, [ebx + 0x1c]
push esi
push ecx
add eax, edx
push eax
call fcn.00425130
add dword [ebp - 0x10], esi
sub edi, esi
add esp, 0xc
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x20], 0x40
lea esi, [ebx + 0x1c]
mov dword [ebp - 0x14], 0
xor edx, edx
mov ecx, dword [esi]
lea esi, [esi + 4]
mov eax, ecx
rol ecx, 8
ror eax, 8
and ecx, 0xff00ff
and eax, 0xff00ff00
or eax, ecx
mov dword [ebp + edx*4 - 0x160], eax
inc edx
cmp edx, 0x10
jb 0x4054d0
lea eax, [ebp - 0x158]
mov edx, 0x40
mov ecx, dword [eax + 0x2c]
lea eax, [eax + 4]
xor ecx, dword [eax + 0x14]
xor ecx, dword [eax - 0xc]
xor ecx, dword [eax - 4]
rol ecx, 1
mov dword [eax + 0x34], ecx
sub edx, 1
jne 0x405502
mov ecx, dword [ebp + 8]
mov eax, dword [ebx + 8]
mov esi, eax
mov ebx, dword [ebx + 0xc]
mov dword [ebp - 0x18], eax
mov eax, dword [ecx + 0x14]
mov edi, dword [ecx + 0x10]
mov ecx, dword [ecx + 0x18]
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
nop dword [eax + eax]
mov ecx, ebx
mov edx, esi
not ecx
rol esi, 5
and ecx, eax
mov eax, edi
and eax, ebx
xor ecx, eax
mov eax, dword [ebp - 0xc]
add esi, ecx
add eax, 0x5a827999
mov ecx, dword [ebp - 8]
add esi, dword [ebp + ecx*4 - 0x160]
inc ecx
add esi, eax
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, edi
mov edi, ebx
mov dword [ebp - 4], eax
ror edi, 2
mov ebx, edx
cmp ecx, 0x14
jb 0x405540
mov edx, 0x14
xor eax, edi
mov ecx, esi
xor eax, ebx
rol esi, 5
add esi, eax
mov eax, dword [ebp - 0xc]
add esi, dword [ebp + edx*4 - 0x160]
add eax, 0x6ed9eba1
add esi, eax
inc edx
mov eax, dword [ebp - 4]
mov dword [ebp - 0xc], eax
mov eax, edi
mov edi, ebx
mov dword [ebp - 4], eax
ror edi, 2
mov ebx, ecx
cmp edx, 0x28
jb 0x405587
mov dword [ebp - 8], 0x28
mov ecx, edi
mov edx, esi
xor ecx, ebx
rol esi, 5
add esi, dword [ebp - 0xc]
and ecx, eax
mov eax, edi
and eax, ebx
xor ecx, eax
mov eax, dword [ebp - 8]
add ecx, 0x8f1bbcdc
add ecx, dword [ebp + eax*4 - 0x160]
mov eax, dword [ebp - 4]
add esi, ecx
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], eax
inc ecx
mov eax, edi
mov dword [ebp - 8], ecx
mov edi, ebx
mov dword [ebp - 4], eax
ror edi, 2
mov ebx, edx
cmp ecx, 0x3c
jb 0x4055c2
mov edx, dword [ebp - 0xc]
mov ecx, 0x3c
nop
xor eax, edi
mov dword [ebp - 8], esi
xor eax, ebx
rol esi, 5
add eax, 0xca62c1d6
add esi, edx
add eax, dword [ebp + ecx*4 - 0x160]
inc ecx
mov edx, dword [ebp - 4]
add esi, eax
mov eax, edi
mov edi, ebx
mov ebx, dword [ebp - 8]
ror edi, 2
mov dword [ebp - 4], eax
cmp ecx, 0x50
jb 0x405610
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
add eax, esi
mov esi, dword [ebp - 0x20]
add dword [ebx + 0x10], edi
add dword [ebx + 0x18], edx
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x14]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 8]
add dword [ebx + 0xc], eax
mov eax, dword [ebp - 4]
add dword [ebx + 0x14], eax
lea eax, [ebx + 0x1c]
cmp edi, 0x40
jae 0x4054a8
push edi
lea eax, [ebx + 0x1c]
push ecx
add eax, edx
push eax
call fcn.00425130
add esp, 0xc
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret