Function at 0x404c30
Capabilities:
Hash data using sha1

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [0x4c6184]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, edx
cmp byte [esi], 0
mov ebx, ecx
mov dword [ebp - 0x318], ebx
mov dword [ebp - 0x314], esi
je 0x405240
cmp byte [ebp + 0xc], 0
push edi
je 0x404e0d
cmp dword [0x4cc1dc], 0
jne 0x404c77
call fcn.00404150
push esi
mov esi, ebx
call fcn.004052d0
push 0x80
lea eax, [ebp - 0xa4]
push 0
push eax
mov dword [ebx + 0x204], 0xd3a3b879
mov dword [ebx + 0x208], 0x3f6d12f7
mov dword [ebx + 0x20c], 0x7515a235
mov dword [ebx + 0x210], 0xa4e7f123
call fcn.0048a470
mov esi, dword [ebp - 0x314]
push 0x7f
lea ecx, [ebp - 0xa4]
push esi
push ecx
call fcn.00487470
mov eax, esi
add esp, 0x18
mov byte [ebp - 0x25], 0
lea edx, [eax + 1]
jmp 0x404ce0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x404ce0
sub eax, edx
lea edi, [ebx + 0x104]
mov ecx, 0x40
mov esi, 0x4c7780
rep movsd dword es:[edi], dword [esi]
mov edx, eax
xor edi, edi
mov dword [ebp - 0x310], edx
mov dword [ebp - 0x30c], edi
jmp 0x404d10
xor ecx, ecx
mov dword [ebp - 0x314], ecx
test edx, edx
jle 0x404dc0
movzx esi, byte [ebp + ecx - 0xa3]
movzx eax, byte [ebp + ecx - 0xa4]
add esi, edi
sub eax, edi
and esi, 0xff
movzx esi, byte [esi*4 + 0x4cc1d8]
and eax, 0xff
movzx eax, byte [eax*4 + 0x4cc1d8]
mov dword [ebp - 0x31c], esi
mov esi, 1
cmp eax, dword [ebp - 0x31c]
je 0x404daf
mov edi, dword [ebp - 0x318]
lea edx, [esi + eax]
add edx, ecx
and edx, 0xff
lea ecx, [edx + ebx + 0x104]
mov dl, byte [ebx + eax + 0x104]
mov bl, byte [ecx]
mov byte [edi + eax + 0x104], bl
inc eax
and eax, 0xff
inc esi
mov byte [ecx], dl
mov ecx, dword [ebp - 0x314]
mov ebx, edi
cmp eax, dword [ebp - 0x31c]
jne 0x404d62
mov edi, dword [ebp - 0x30c]
mov edx, dword [ebp - 0x310]
add ecx, 2
mov dword [ebp - 0x314], ecx
cmp ecx, edx
jl 0x404d20
inc edi
mov dword [ebp - 0x30c], edi
cmp edi, 0x100
jl 0x404d10
xor esi, esi
test edx, edx
jle 0x40523f
lea ecx, [ecx]
lea eax, [ebp + esi - 0xa4]
push eax
mov eax, ebx
call fcn.00404320
add esi, 0x10
cmp esi, dword [ebp - 0x310]
jl 0x404de0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00486a8b
mov esp, ebp
pop ebp
ret 0xc
xor edi, edi
mov eax, 0x81
sub eax, dword [ebp + 8]
mov dword [ebp - 0x30c], edi
mov dword [ebp - 0x310], eax
jmp 0x404e36
mov esi, dword [ebp - 0x314]
lea edx, [edi + 0x4cfd50]
mov eax, edx
mov edi, edi
mov cl, byte [eax]
cmp cl, byte [esi]
jne 0x404e60
test cl, cl
je 0x404e5c
mov cl, byte [eax + 1]
cmp cl, byte [esi + 1]
jne 0x404e60
add eax, 2
add esi, 2
test cl, cl
jne 0x404e40
xor eax, eax
jmp 0x404e65
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x404eb1
mov eax, dword [ebp + 8]
test eax, eax
jne 0x404e7a
cmp byte [edi + 0x4cfdd0], al
je 0x404ea2
jmp 0x404eb1
cmp byte [edi + 0x4cfdd0], 0
je 0x404eb1
add edx, dword [ebp - 0x310]
mov ecx, 8
mov edi, edi
mov esi, dword [edx + eax]
cmp esi, dword [eax]
jne 0x404eb1
sub ecx, 4
add eax, 4
cmp ecx, 4
jae 0x404e90
mov cl, byte [ebp + 0x10]
cmp byte [edi + 0x4cfdd9], cl
je 0x405252
inc dword [ebp - 0x30c]
add edi, 0xaa
cmp edi, 0x2a8
jb 0x404e30
mov edx, dword [ebp - 0x314]
push 0x7f
lea ecx, [ebp - 0x1a4]
push ecx
push 0xffffffffffffffff
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
lea edi, [ebp - 0x2ac]
lea ecx, [ebp - 0x1a4]
mov word [ebp - 0xa6], ax
call fcn.00410460
xor ebx, ebx
xor ecx, ecx
lea eax, [ebp - 0x1a4]
cmp word [ebp - 0x1a4], bx
je 0x404f1b
add eax, 2
inc ecx
cmp word [eax], bx
jne 0x404f12
mov eax, dword [ebp + 8]
lea edi, [ecx + ecx]
mov dword [ebp - 0x310], edi
cmp eax, ebx
je 0x404f47
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp + edi - 0x2ac], ecx
mov dword [ebp + edi - 0x2a8], edx
add edi, 8
mov dword [ebp - 0x310], edi
mov dword [ebp - 0x308], 0x67452301
mov dword [ebp - 0x304], 0xefcdab89
mov dword [ebp - 0x300], 0x98badcfe
mov dword [ebp - 0x2fc], 0x10325476
mov dword [ebp - 0x2f8], 0xc3d2e1f0
mov dword [ebp - 0x2f0], ebx
mov dword [ebp - 0x2f4], ebx
mov dword [ebp - 0x31c], ebx
jmp 0x404f90
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x2ac]
push ecx
mov eax, edi
lea esi, [ebp - 0x308]
call fcn.0040f940
mov ecx, dword [ebp + 0x10]
mov edx, ebx
sar edx, 8
mov eax, ebx
sar eax, 0x10
mov byte [ebp - 0x30b], dl
push ecx
lea edx, [ebp - 0x30c]
mov byte [ebp - 0x30a], al
push edx
mov eax, 3
mov byte [ebp - 0x30c], bl
call fcn.0040f940
mov eax, ebx
add esp, 0x10
and eax, 0x80003fff
jns 0x404fec
dec eax
or eax, 0xffffc000
inc eax
jne 0x40503a
mov bl, byte [ebp + 0x10]
mov ecx, 0x17
lea esi, [ebp - 0x308]
lea edi, [ebp - 0x80]
rep movsd dword es:[edi], dword [esi]
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x80]
call fcn.0040fa00
mov eax, dword [ebp - 0x31c]
mov cl, byte [ebp - 8]
mov ebx, dword [ebp - 0x31c]
mov edi, dword [ebp - 0x310]
cdq
and edx, 0x3fff
add eax, edx
mov edx, dword [ebp - 0x318]
sar eax, 0xe
mov byte [eax + edx + 0x22f], cl
inc ebx
mov dword [ebp - 0x31c], ebx
cmp ebx, 0x40000
jl 0x404f90
mov bl, byte [ebp + 0x10]
lea edx, [ebp - 0x18]
lea ecx, [ebp - 0x308]
call fcn.0040fa00
mov esi, dword [ebp - 0x318]
xor edi, edi
lea ecx, [esi + 0x220]
lea esp, [esp]
mov eax, dword [ebp + edi*4 - 0x18]
mov edx, eax
shr edx, 8
mov byte [ecx], dl
mov edx, eax
mov byte [ecx - 1], al
shr edx, 0x10
shr eax, 0x18
mov byte [ecx + 1], dl
mov byte [ecx + 2], al
inc edi
add ecx, 4
cmp edi, 4
jl 0x405070
mov ebx, dword [0x4cfc48]
mov ecx, dword [ebp - 0x314]
mov eax, ebx
imul eax, eax, 0xaa
mov edx, eax
sub edx, ecx
lea edi, [edx + 0x4cfd50]
mov dl, byte [ecx]
mov byte [ecx + edi], dl
inc ecx
test dl, dl
jne 0x4050b3
mov edx, dword [ebp + 8]
xor ecx, ecx
test edx, edx
setne cl
mov byte [eax + 0x4cfdd0], cl
cmp cl, 1
jne 0x4050e3
mov ecx, dword [edx]
mov dword [eax + 0x4cfdd1], ecx
mov edx, dword [edx + 4]
mov dword [eax + 0x4cfdd5], edx
mov cl, byte [ebp + 0x10]
mov byte [eax + 0x4cfdd9], cl
mov edx, dword [esi + 0x21f]
mov dword [eax + 0x4cfd30], edx
mov ecx, dword [esi + 0x223]
mov dword [eax + 0x4cfd34], ecx
mov edx, dword [esi + 0x227]
mov dword [eax + 0x4cfd38], edx
mov ecx, dword [esi + 0x22b]
mov dword [eax + 0x4cfd3c], ecx
mov edx, dword [esi + 0x22f]
mov dword [eax + 0x4cfd40], edx
mov ecx, dword [esi + 0x233]
mov dword [eax + 0x4cfd44], ecx
mov edx, dword [esi + 0x237]
inc ebx
mov dword [eax + 0x4cfd48], edx
mov ecx, dword [esi + 0x23b]
and ebx, 3
mov dword [0x4cfc48], ebx
mov dword [eax + 0x4cfd4c], ecx
mov ebx, esi
mov dword [ebx], 1
xor eax, eax
mov ecx, eax
mov edx, eax
and ecx, 3
mov dword [ebp - 0x310], ebx
mov bl, byte [ebx + eax + 0x21f]
shr edx, 2
lea ecx, [ebp + ecx - 0x24]
inc eax
mov byte [ecx + edx*4], bl
mov ebx, dword [ebp - 0x310]
cmp eax, 0x10
jb 0x405160
movzx edx, byte [ebx + 0x22f]
movzx eax, byte [ebx + 0x230]
movzx ecx, byte [ebx + 0x231]
mov byte [ebx + 4], dl
movzx edx, byte [ebx + 0x232]
mov byte [ebx + 5], al
movzx eax, byte [ebx + 0x233]
mov byte [ebx + 6], cl
movzx ecx, byte [ebx + 0x234]
mov byte [ebx + 7], dl
movzx edx, byte [ebx + 0x235]
mov byte [ebx + 8], al
movzx eax, byte [ebx + 0x236]
mov byte [ebx + 9], cl
movzx ecx, byte [ebx + 0x237]
mov byte [ebx + 0xa], dl
movzx edx, byte [ebx + 0x238]
mov byte [ebx + 0xb], al
movzx eax, byte [ebx + 0x239]
mov byte [ebx + 0xc], cl
movzx ecx, byte [ebx + 0x23a]
mov byte [ebx + 0xd], dl
movzx edx, byte [ebx + 0x23b]
mov byte [ebx + 0xe], al
movzx eax, byte [ebx + 0x23c]
mov byte [ebx + 0xf], cl
movzx ecx, byte [ebx + 0x23d]
mov byte [ebx + 0x10], dl
movzx edx, byte [ebx + 0x23e]
mov byte [ebx + 0x11], al
mov byte [ebx + 0x12], cl
mov byte [ebx + 0x13], dl
lea ecx, [ebp - 0x24]
mov edx, ebx
call fcn.0040d9c0
cmp dword [ebx], 1
jne 0x40523f
push ebx
call fcn.0040db50
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00486a8b
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 0x30c]
imul eax, eax, 0xaa
mov edx, dword [eax + 0x4cfd30]
mov dword [ebx + 0x21f], edx
mov ecx, dword [eax + 0x4cfd34]
mov dword [ebx + 0x223], ecx
mov edx, dword [eax + 0x4cfd38]
mov dword [ebx + 0x227], edx
mov ecx, dword [eax + 0x4cfd3c]
mov dword [ebx + 0x22b], ecx
mov edx, dword [eax + 0x4cfd40]
mov dword [ebx + 0x22f], edx
mov ecx, dword [eax + 0x4cfd44]
mov dword [ebx + 0x233], ecx
mov edx, dword [eax + 0x4cfd48]
mov dword [ebx + 0x237], edx
mov eax, dword [eax + 0x4cfd4c]
mov dword [ebx + 0x23b], eax
jmp 0x405158