Function at 0x40d5e9
Capabilities:
Encode data using xor
Hash data using murmur2

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x110
mov ebx, ecx
mov edi, edx
mov esi, eax
movsx ebp, byte [edi]
test ebp, ebp
je 0x40d632
xor ebp, ebp
mov edx, edi
movsx eax, byte [edx]
mov ecx, edx
mov edx, esi
mov esi, ecx
cmp eax, 0x2f
je 0x40d7c9
movzx eax, al
movzx eax, byte [eax + 0x5950a0]
inc eax
movsx eax, al
add ebp, eax
lea esi, [edi + ebp]
movsx eax, byte [esi]
test eax, eax
jne 0x40d60d
mov esi, edx
test esi, esi
je 0x40d810
mov ebp, dword [esi]
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x40d64e
inc ecx
inc eax
mov dl, byte [ecx]
test dl, dl
jne 0x40d646
mov ecx, eax
xor eax, eax
xor eax, ecx
mov edx, edi
cmp ecx, 4
jl 0x40d68f
mov dword [esp + 0x10c], ebx
imul esi, dword [edx], 0x5bd1e995
mov ebx, esi
shr ebx, 0x18
xor esi, ebx
imul ebx, esi, 0x5bd1e995
imul eax, eax, 0x5bd1e995
xor eax, ebx
add edx, 4
add ecx, 0xfffffffc
cmp ecx, 4
jge 0x40d662
mov ebx, dword [esp + 0x10c]
cmp ecx, 3
je 0x40d6a0
cmp ecx, 2
je 0x40d6a9
cmp ecx, 1
je 0x40d6b2
jmp 0x40d6bd
movzx ecx, byte [edx + 2]
shl ecx, 0x10
xor eax, ecx
movzx ecx, byte [edx + 1]
shl ecx, 8
xor eax, ecx
movzx edx, byte [edx]
xor eax, edx
imul eax, eax, 0x5bd1e995
mov edx, eax
shr edx, 0xd
xor eax, edx
imul eax, eax, 0x5bd1e995
mov edx, eax
shr edx, 0xf
xor eax, edx
and eax, 0x7fffffff
movsx edx, bl
test edx, edx
jne 0x40d725
test ebp, ebp
je 0x40d773
mov ebx, eax
mov ecx, edi
cmp ebx, dword [ebp + 0x1c]
jne 0x40d71c
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40d713
or dl, dl
je 0x40d70f
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x40d713
add edi, 2
add esi, 2
or dl, dl
jne 0x40d6f3
xor eax, eax
jmp 0x40d718
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d773
mov ebp, dword [ebp + 0xc]
test ebp, ebp
jne 0x40d6e9
jmp 0x40d773
cmp edx, 1
je 0x40d780
test ebp, ebp
je 0x40d773
mov ebx, eax
mov ecx, edi
mov eax, dword [ebp + 0x1c]
and eax, 0x7fffffff
cmp eax, ebx
jne 0x40d76c
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40d763
or dl, dl
je 0x40d75f
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x40d763
add edi, 2
add esi, 2
or dl, dl
jne 0x40d743
xor eax, eax
jmp 0x40d768
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d773
mov ebp, dword [ebp + 0xc]
test ebp, ebp
jne 0x40d732
mov eax, ebp
add esp, 0x110
pop ebx
pop ebp
pop esi
pop edi
ret
add eax, 0x80000000
test ebp, ebp
je 0x40d773
mov ebx, eax
mov ecx, edi
cmp ebx, dword [ebp + 0x1c]
jne 0x40d7c0
mov edi, dword [ebp + 0x14]
mov esi, ecx
mov dl, byte [edi]
cmp dl, byte [esi]
jne 0x40d7b7
or dl, dl
je 0x40d7b3
mov dl, byte [edi + 1]
cmp dl, byte [esi + 1]
jne 0x40d7b7
add edi, 2
add esi, 2
or dl, dl
jne 0x40d797
xor eax, eax
jmp 0x40d7bc
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d773
mov ebp, dword [ebp + 0xc]
test ebp, ebp
jne 0x40d78d
jmp 0x40d773
mov eax, edx
mov edx, edi
mov ecx, ebp
call fcn.0040d82c
mov edx, eax
test edx, edx
je 0x40d7e4
lea edi, [esi + 1]
xor ebp, ebp
jmp 0x40d626
mov esi, edx
lea eax, [esp + 0xc]
push ebp
push edi
push eax
call fcn.0045de9c
mov byte [esp + ebp + 0x18], 0
lea ebp, [esp + 0x18]
push ebp
push 1
push 0x18786
call fcn.0045da34
add esp, 0x18
jmp 0x40d632
xor eax, eax
add esp, 0x110
pop ebx
pop ebp
pop esi
pop edi
ret