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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c8
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x14], ecx
mov esi, 0x104
sub esi, ecx
test ecx, ecx
je 0x100519dd
mov eax, dword [ecx + ebx - 0x14]
mov dword [ebp - 0x80], eax
mov eax, dword [ecx + ebx - 0x10]
mov dword [ebp - 0x7c], eax
mov eax, dword [ecx + ebx - 0xc]
mov dword [ebp - 0x78], eax
mov eax, dword [ecx + ebx - 8]
mov dword [ebp - 0x74], eax
mov eax, dword [ecx + ebx - 4]
mov dword [ebp - 0x70], eax
cmp esi, 0x40
ja 0x10051a0a
mov eax, esi
jmp 0x10051a0f
mov eax, dword [ebx + 0xf0]
mov dword [ebp - 0x80], eax
mov eax, dword [ebx + 0xf4]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebx + 0xf8]
mov dword [ebp - 0x78], eax
mov eax, dword [ebx + 0xfc]
mov dword [ebp - 0x74], eax
mov eax, dword [ebx + 0x100]
mov dword [ebp - 0x70], eax
mov eax, 0x40
push eax
add ecx, ebx
lea eax, [ebp - 0x6c]
push ecx
push eax
mov dword [ebp - 0x28], ecx
call fcn.1007d410
add esp, 0xc
cmp esi, 0x40
jae 0x10051a3e
mov eax, 0x40
sub eax, esi
push eax
lea eax, [ebp - 0x6c]
add eax, esi
push ebx
push eax
call fcn.1007d410
add esp, 0xc
xor ecx, ecx
mov eax, dword [ebp + ecx - 0x6c]
bswap eax
mov dword [ebp + ecx - 0x1c8], eax
add ecx, 4
cmp ecx, 0x40
jb 0x10051a40
lea eax, [ebp - 0x1c0]
mov edx, 0x40
mov ecx, dword [eax + 0x18]
lea eax, [eax + 4]
xor ecx, dword [eax - 0xc]
xor ecx, dword [eax + 0x28]
xor ecx, dword [eax - 4]
ror ecx, 0x1f
mov dword [eax + 0x34], ecx
sub edx, 1
jne 0x10051a60
mov eax, dword [ebp - 0x80]
mov esi, eax
mov ecx, dword [ebp - 0x70]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x7c]
mov ebx, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x78]
mov edi, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x24], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 4], edx
mov ecx, ebx
mov edx, esi
not ecx
ror esi, 0x1b
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 - 4]
add esi, dword [ebp + ecx*4 - 0x1c8]
inc ecx
add esi, eax
mov dword [ebp - 4], ecx
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, edi
mov edi, ebx
mov dword [ebp - 8], eax
shr ebx, 2
shl edi, 0x1e
or edi, ebx
mov ebx, edx
cmp ecx, 0x14
jb 0x10051aa7
mov edx, 0x14
xor eax, edi
mov ecx, esi
xor eax, ebx
ror esi, 0x1b
add esi, eax
mov eax, dword [ebp - 0xc]
add esi, dword [ebp + edx*4 - 0x1c8]
add eax, 0x6ed9eba1
add esi, eax
inc edx
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, edi
mov edi, ebx
mov dword [ebp - 8], eax
shr ebx, 2
shl edi, 0x1e
or edi, ebx
mov ebx, ecx
cmp edx, 0x28
jb 0x10051af3
mov dword [ebp - 4], 0x28
mov ecx, edi
mov edx, esi
xor ecx, ebx
ror esi, 0x1b
add esi, dword [ebp - 0xc]
and ecx, eax
mov eax, edi
and eax, ebx
xor ecx, eax
mov eax, dword [ebp - 4]
add ecx, 0x8f1bbcdc
add ecx, dword [ebp + eax*4 - 0x1c8]
mov eax, dword [ebp - 8]
add esi, ecx
mov ecx, dword [ebp - 4]
mov dword [ebp - 0xc], eax
inc ecx
mov eax, edi
mov dword [ebp - 4], ecx
mov edi, ebx
mov dword [ebp - 8], eax
shr ebx, 2
shl edi, 0x1e
or edi, ebx
mov ebx, edx
cmp ecx, 0x3c
jb 0x10051b33
mov edx, dword [ebp - 0xc]
mov ecx, 0x3c
xor eax, edi
mov dword [ebp - 4], esi
xor eax, ebx
ror esi, 0x1b
add eax, 0xca62c1d6
add esi, edx
add eax, dword [ebp + ecx*4 - 0x1c8]
inc ecx
mov edx, dword [ebp - 8]
add esi, eax
mov eax, edi
mov dword [ebp - 8], edi
mov edi, ebx
shr ebx, 2
shl edi, 0x1e
or edi, ebx
mov ebx, dword [ebp - 4]
cmp ecx, 0x50
jb 0x10051b84
mov ecx, dword [ebp - 0x18]
add dword [ebp - 0x10], edx
add ecx, esi
mov esi, dword [ebp - 0x1c]
add esi, ebx
mov ebx, dword [ebp - 0x20]
add ebx, edi
mov edi, dword [ebp - 0x24]
add edi, eax
mov eax, dword [ebp - 0x28]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
mov ebx, dword [ebp - 0x2c]
mov dword [eax + 0xc], edi
mov dword [eax + 0x10], ecx
mov ecx, dword [ebp - 0x14]
add ecx, 0x14
mov dword [ebp - 0x14], ecx
cmp ecx, 0x104
jb 0x100519a6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret