Function at 0x4850f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov ecx, dword [eax + 8]
cmp ecx, 5
jl 0x48523b
cmp ecx, 0x11
jg 0x48523b
mov ecx, dword [ebp + 0x10]
test byte [ecx + 0x11c], 2
je 0x48516a
mov ecx, dword [ebp + 0xc]
mov esi, dword [eax]
cmp ecx, 1
jne 0x485132
mov eax, dword [ebp + 0x14]
mov dl, byte [esi]
pop edi
pop esi
mov byte [eax], dl
xor eax, eax
pop ebx
pop ebp
ret
mov eax, ecx
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x4852f9
mov edi, dword [ebp + 0x14]
lea edx, [esi + ecx - 1]
sub edi, esi
mov ebx, eax
mov al, byte [esi]
mov cl, byte [edx]
xor cl, al
xor al, cl
mov byte [edi + esi], al
mov al, byte [edx]
xor al, cl
inc esi
mov byte [edi + edx], al
dec edx
dec ebx
jne 0x48514c
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret
mov ecx, dword [ebp + 0xc]
lea edx, [ecx - 1]
cmp edx, 7
ja case.0x485179.3
jmp dword [edx*4 + 0x485300]
mov ecx, dword [eax]
mov eax, dword [ebp + 0x14]
pop edi
pop esi
mov dl, byte [ecx]
pop ebx
mov byte [eax], dl
xor eax, eax
pop ebp
ret
mov ecx, dword [eax]
push ecx
call fcn.00485320
mov edx, dword [ebp + 0x14]
push eax
push edx
call fcn.00485420
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [eax]
test al, 3
jne 0x4851b6
mov eax, dword [eax]
jmp 0x4851bf
push eax
call fcn.00485370
add esp, 4
mov ecx, dword [ebp + 0x14]
test cl, 3
jne 0x4851d0
pop edi
mov dword [ecx], eax
pop esi
xor eax, eax
pop ebx
pop ebp
ret
push eax
push ecx
call fcn.00485490
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov eax, dword [eax]
test al, 3
jne 0x4851ee
mov esi, dword [eax]
mov eax, dword [eax + 4]
jmp 0x4851fb
push eax
call fcn.004853c0
mov esi, eax
add esp, 4
mov eax, edx
mov ecx, dword [ebp + 0x14]
test cl, 3
jne 0x48520f
mov dword [ecx], esi
pop edi
mov dword [ecx + 4], eax
pop esi
xor eax, eax
pop ebx
pop ebp
ret
push eax
push esi
push ecx
call fcn.004854f0
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret
mov esi, dword [eax]
mov edi, dword [ebp + 0x14]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
xor eax, eax
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
pop ebp
ret
cmp ecx, 0x19
jl 0x485245
cmp ecx, 0x1f
jle 0x485257
cmp ecx, 0x28
jl 0x4852f9
cmp ecx, 0x30
jg 0x4852f9
mov edx, dword [ecx*4 + 0x4da67c]
mov ecx, dword [ebp + 0x10]
cmp edx, 0xffffffff
movsx edi, byte [ecx + 0x110]
jne 0x485277
pop edi
pop esi
mov eax, 0x4000005f
pop ebx
pop ebp
ret
mov ecx, dword [eax]
lea eax, [edi + edi*2]
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp + 0xc]
lea edx, [edx + eax*2]
mov eax, dword [edx*4 + 0x4da7b8]
test eax, eax
je 0x4852a8
push ebx
push 0
push ecx
call eax
add esp, 0xc
cmp eax, 1
je 0x4852c2
pop edi
pop esi
mov eax, 0x4000005f
pop ebx
pop ebp
ret
cmp esi, 4
jne 0x4852b3
mov eax, dword [ecx]
mov dword [ebx], eax
jmp 0x4852c2
cmp esi, 8
jne 0x4852c2
mov edx, dword [ecx]
mov dword [ebx], edx
mov eax, dword [ecx + 4]
mov dword [ebx + 4], eax
mov ecx, dword [ebp + 0x10]
test byte [ecx + 0x11c], 2
je 0x4852f9
test edi, edi
jne 0x4852f9
mov eax, esi
cdq
sub eax, edx
sar eax, 1
test eax, eax
jle 0x4852f9
lea esi, [esi + ebx - 1]
mov cl, byte [edi + ebx]
mov dl, cl
xor dl, byte [esi]
xor cl, dl
mov byte [edi + ebx], cl
mov cl, byte [esi]
xor cl, dl
inc edi
mov byte [esi], cl
dec esi
cmp edi, eax
jl 0x4852e1
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret