Function at 0x580a20
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8fc
push ebx
xor ebx, ebx
push esi
mov esi, eax
cmp byte [ebp + 0x10], bl
jne 0x580a4b
mov ebx, dword [ebp + 8]
push esi
call fcn.00580440
test al, al
jne 0x580a49
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
xor ebx, ebx
lea eax, [ebp - 0x44]
push edi
push eax
call fcn.0057acf0
mov edi, eax
call fcn.0057b0f0
push eax
mov eax, 0x40
call fcn.0057eaf0
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xbc]
push edx
push eax
lea eax, [ebp - 0x44]
push eax
mov dword [ebp - 4], 0x40
call fcn.0057d0d0
mov ecx, dword [ebp - 4]
add esp, 0x10
push 4
lea edx, [ebp - 4]
push edx
push 0x10
mov eax, esi
mov byte [ebp + ecx - 0xbc], bl
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x18], 0x67452301
mov dword [ebp - 0x14], 0xefcdab89
mov dword [ebp - 0x10], 0x98badcfe
mov dword [ebp - 0xc], 0x10325476
mov dword [ebp - 8], 0xc3d2e1f0
mov byte [ebp - 0x68], bl
call fcn.0057ce40
test al, al
je 0x580ad7
mov edi, dword [ebp - 4]
jmp 0x580ada
or edi, 0xffffffff
push 4
lea eax, [ebp - 4]
push eax
push 0xc
mov eax, esi
call fcn.0057ce40
test al, al
je 0x580af2
mov eax, dword [ebp - 4]
jmp 0x580af5
or eax, 0xffffffff
push edi
push eax
push esi
lea esi, [ebp - 0x68]
call fcn.0057d350
cmp byte [ebp - 0x68], bl
jne 0x580b0e
call fcn.0057d8a0
mov byte [ebp - 0x68], 1
xor ecx, ecx
mov eax, dword [ebp + ecx - 0x18]
mov edx, eax
shr edx, 0x10
rol dx, 8
rol ax, 8
movzx eax, ax
movzx edx, dx
shl eax, 0x10
or edx, eax
mov dword [ebp + ecx - 0x7c], edx
add ecx, 4
cmp ecx, 0x14
jb 0x580b10
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xfc]
push edx
lea eax, [ebp - 0x7c]
push 0x14
push eax
mov dword [ebp - 4], 0x40
call fcn.0057d0d0
mov ecx, dword [ebp - 4]
add esp, 0x10
mov byte [ebp + ecx - 0xfc], bl
mov ecx, 0x598318
cmp byte [ebp + 0x10], bl
jne 0x580b71
mov ecx, 0x598330
mov esi, dword [ebp + 8]
add esi, 4
xor eax, eax
cmp byte [esi], bl
je 0x580b86
lea ecx, [ecx]
inc eax
cmp byte [esi + eax], bl
jne 0x580b80
cmp byte [ecx], bl
je 0x580ba2
lea ebx, [ebx]
cmp eax, 0x800
jae 0x580ba2
mov dl, byte [ecx]
mov byte [esi + eax], dl
inc ecx
inc eax
cmp byte [ecx], bl
jne 0x580b90
mov ecx, dword [ebp + 8]
mov byte [eax + ecx + 4], bl
mov eax, dword [ebp + 0xc]
push 1
call fcn.005808d0
xor eax, eax
mov ecx, 0x598348
cmp byte [esi], bl
je 0x580bc6
mov edi, edi
inc eax
cmp byte [esi + eax], bl
jne 0x580bc0
cmp eax, 0x800
jae 0x580bd8
mov dl, byte [ecx]
mov byte [esi + eax], dl
inc ecx
inc eax
cmp byte [ecx], bl
jne 0x580bc6
mov ecx, dword [ebp + 8]
mov byte [eax + ecx + 4], bl
push 1
lea eax, [ebp - 0xbc]
call fcn.005808d0
xor eax, eax
mov ecx, 0x598350
cmp byte [esi], bl
je 0x580c00
inc eax
cmp byte [esi + eax], bl
jne 0x580bf7
lea ecx, [ecx]
cmp eax, 0x800
jae 0x580c12
mov dl, byte [ecx]
mov byte [esi + eax], dl
inc ecx
inc eax
cmp byte [ecx], bl
jne 0x580c00
mov edi, dword [ebp + 8]
mov byte [eax + edi + 4], bl
push 1
lea eax, [ebp - 0xfc]
mov ecx, edi
call fcn.005808d0
cmp byte [ebp + 0x10], bl
je 0x580c77
push esi
lea eax, [ebp - 0x8fc]
push 0x800
push eax
call fcn.0058846c
lea eax, [ebp - 0x8fc]
add esp, 0xc
mov dword [ebp + 0x10], 0x800
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x580c52
lea ecx, [ebp + 0x10]
push ecx
sub eax, edx
push esi
push eax
lea edx, [ebp - 0x8fc]
push edx
call fcn.0057d0d0
mov eax, dword [ebp + 0x10]
add esp, 0x10
mov byte [eax + edi + 4], bl
pop edi
pop esi
mov al, 1
pop ebx
mov esp, ebp
pop ebp
ret 0xc