Function at 0x403860
Capabilities:
Encode data using xor
Hash data using crc32b

Disassembly:
push ebp
mov edx, 0x17c8
push edi
push esi
push ebx
sub esp, 0x2c
mov ebp, dword [esp + 0x44]
test ebp, 1
mov edi, ebp
jne 0x403c12
test edi, 2
jne 0x403c27
mov ecx, edx
xor eax, eax
shr ecx, 2
test dl, 2
rep stosd dword es:[edi], eax
je 0x4038a1
xor eax, eax
add edi, 2
mov word [edi - 2], ax
and edx, 1
je 0x4038a9
mov byte [edi], 0
mov eax, dword [esp + 0x48]
mov dword [eax], 0
mov eax, dword [esp + 0x40]
test eax, eax
je 0x403a85
mov eax, dword [esp + 0x40]
xor ebx, ebx
xor esi, esi
mov dword [esp + 8], eax
mov eax, dword [esp + 8]
mov eax, dword [eax + 0xc]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp eax, ebx
jbe 0x4038e4
mov edi, dword [esp + 0x48]
mov dword [edi], eax
mov eax, dword [esp + 8]
mov edx, 0x20
mov ecx, dword [eax + 8]
mov eax, ecx
add ecx, ecx
xor eax, esi
add esi, esi
sar eax, 0x1f
and eax, 0x4c11db7
xor esi, eax
sub edx, 1
jne 0x4038f0
mov eax, dword [esp + 8]
mov edx, 0x20
mov eax, dword [eax + 0x34]
mov dword [esp + 0x14], eax
mov ecx, eax
lea esi, [esi]
mov eax, esi
add esi, esi
xor eax, ecx
add ecx, ecx
sar eax, 0x1f
and eax, 0x4c11db7
xor esi, eax
sub edx, 1
jne 0x403920
mov edi, dword [esp + 0x14]
test edi, edi
je 0x403a54
mov eax, dword [esp + 8]
mov dword [esp + 0xc], 0
mov eax, dword [eax + 0x38]
mov dword [esp + 0x18], eax
xor eax, eax
mov edi, dword [esp + 0x18]
mov ecx, dword [edi + eax*4]
test ecx, ecx
je 0x403a75
mov eax, dword [esp + 8]
cmp dword [ecx], eax
je 0x403a7c
xor ecx, ecx
xor ebx, ebx
mov edx, 0x20
lea esi, [esi]
mov eax, esi
add esi, esi
xor eax, ebx
add ebx, ebx
sar eax, 0x1f
and eax, 0x4c11db7
xor esi, eax
sub edx, 1
jne 0x403980
test ecx, ecx
je 0x403a6e
mov ebx, dword [ecx + 8]
mov edx, 0x20
mov eax, esi
add esi, esi
xor eax, ebx
add ebx, ebx
sar eax, 0x1f
and eax, 0x4c11db7
xor esi, eax
sub edx, 1
jne 0x4039a7
test ecx, ecx
je 0x403a3d
mov eax, dword [esp + 8]
mov ebx, dword [eax + 0x10]
test ebx, ebx
je 0x403a3d
mov ebx, dword [ecx + 0x10]
mov edx, 0x20
add dword [ebp + 8], ebx
mov edi, ebx
lea esi, [esi]
mov eax, edi
add edi, edi
xor eax, esi
add esi, esi
sar eax, 0x1f
and eax, 0x4c11db7
xor esi, eax
sub edx, 1
jne 0x4039e0
test ebx, ebx
je 0x403a3d
mov ecx, dword [ecx + 0x14]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x10], esi
lea edi, [ecx + ebx*8]
mov ebx, edi
lea esi, [esi]
add eax, dword [ecx]
adc edx, dword [ecx + 4]
mov dword [ebp + 0x10], eax
mov dword [ebp + 0x14], edx
mov esi, dword [ecx + 4]
cmp dword [ebp + 0x1c], esi
mov edi, dword [ecx]
jl 0x403a2c
jg 0x403a32
cmp dword [ebp + 0x18], edi
jae 0x403a32
mov dword [ebp + 0x18], edi
mov dword [ebp + 0x1c], esi
add ecx, 8
cmp ecx, ebx
jne 0x403a10
mov esi, dword [esp + 0x10]
add dword [esp + 0xc], 1
mov edi, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
mov eax, edi
cmp edi, ecx
jne 0x403958
mov eax, dword [esp + 8]
mov eax, dword [eax + 4]
test eax, eax
mov dword [esp + 8], eax
je 0x403a87
mov eax, dword [esp + 0x48]
mov ebx, dword [eax]
jmp 0x4038cb
xor ebx, ebx
jmp 0x4039a2
xor ebx, ebx
jmp 0x403977
mov ebx, dword [ecx + 0xc]
nop
jmp 0x403977
xor esi, esi
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x403bf4
mov eax, dword [ebp + 0x18]
lea edi, [ebp + 0x28]
mov ebx, 0xfc
mov edx, dword [ebp + 0x1c]
mov ecx, edi
mov dword [esp + 0x14], edi
mov dword [ecx], 0
add ecx, 0x18
mov dword [ecx - 0x10], eax
mov dword [ecx - 0xc], edx
mov dword [ecx - 8], 0
mov dword [ecx - 4], 0
sub ebx, 1
jne 0x403aa6
mov edx, dword [esp + 0x40]
test edx, edx
je 0x403bf4
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x403bdd
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 0x34]
test eax, eax
je 0x403bdd
mov edi, dword [esp + 0x40]
mov ebp, dword [edi + 0x38]
lea eax, [ebp + eax*4]
mov dword [esp + 0x10], eax
jmp 0x403b14
add ebp, 4
cmp ebp, dword [esp + 0x10]
je 0x403bdd
mov eax, dword [ebp]
test eax, eax
je 0x403b07
mov edi, dword [eax]
cmp dword [esp + 0x40], edi
jne 0x403b07
mov edx, dword [eax + 0x10]
test edx, edx
je 0x403b07
mov esi, dword [eax + 0x14]
mov dword [esp + 0x1c], ebp
mov ebp, dword [esp + 0x14]
lea eax, [esi + edx*8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov eax, dword [esp + 8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov edi, edx
or edi, eax
je 0x403c00
test edx, edx
je 0x403c04
bsr edi, edx
xor edi, 0x1f
mov ecx, 0x3f
sub ecx, edi
cmp ecx, 1
jbe 0x403c00
mov ecx, 0x3d
mov esi, edx
sub ecx, edi
mov ebx, eax
shrd ebx, esi, cl
shr esi, cl
test cl, 0x20
je 0x403b88
mov ebx, esi
mov ecx, ebx
mov ebx, 0x4000003e
and ecx, 3
sub ebx, edi
lea ecx, [ecx + ebx*4]
lea ecx, [ecx + ecx*2]
lea ecx, [ebp + ecx*8]
add dword [ecx], 1
add dword [ecx + 0x10], eax
adc dword [ecx + 0x14], edx
cmp edx, dword [ecx + 0xc]
jg 0x403bb9
jl 0x403bb3
cmp eax, dword [ecx + 8]
jae 0x403bb9
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
add dword [esp + 8], 8
mov eax, dword [esp + 0xc]
cmp dword [esp + 8], eax
jne 0x403b40
mov ebp, dword [esp + 0x1c]
add ebp, 4
cmp ebp, dword [esp + 0x10]
jne 0x403b14
mov eax, dword [esp + 0x40]
mov eax, dword [eax + 4]
test eax, eax
mov dword [esp + 0x40], eax
jne 0x403ad8
mov esi, dword [esp + 0x18]
add esp, 0x2c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, eax
jmp 0x403b97
bsr edi, eax
xor edi, 0x1f
add edi, 0x20
jmp 0x403b61
lea edi, [ebp + 1]
mov dl, 0xc7
test edi, 2
mov byte [ebp], 0
je 0x40388a
xor eax, eax
add edi, 2
mov word [edi - 2], ax
sub edx, 2
jmp 0x40388a