Function at 0x4850a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov dword [esp - 0x1c], esi
push ecx
push ebx
push esi
xchg ebx, ebx
mov esi, dword [ebp + 0x10]
push edi
lea ecx, [esi + 2]
lea ecx, [ecx]
mov dword [esp - 0x40], esi
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4850ba
xchg ebx, ebx
mov edi, dword [ebp + 0xc]
sub esi, ecx
sar esi, 1
xchg ebp, ebp
mov ecx, 0x2632e770
xor ecx, 0x7bef2a7d
sub ecx, 0x35db162
sub ecx, 0x106864f7
mov dword [esp - 0x2c], ecx
sub ecx, 0x4a17b6b2
mov eax, dword [edi + 4]
add eax, esi
xchg ebx, ebx
mov dword [ebp - 4], eax
inc eax
mul ecx
pushf
xchg esi, esi
mov ecx, 0x2028bef4
add ecx, 0x8476e51
xor ecx, 0x43074e6a
sub ecx, 0x56b2de67
mov dword [esp - 0x3c], 0x65762e3d
add ecx, 0xeb3b7b37
popf
cmovb eax, ecx
xchg esp, esp
push eax
call fcn.00490c90
mov dword [ebp + 0xc], eax
mov dword [esp - 0x28], edx
add esp, 4
mov eax, dword [edi + 4]
xor ebx, ebx
xchg ecx, ecx
test eax, eax
je 0x4851a1
nop
mov edx, edi
mov dword [esp - 0x40], edx
cmp eax, 2
jbe 0x485157
mov edx, dword [edi]
mov ecx, ebx
mov dword [esp - 0x2c], edi
mov eax, 0x39cd61b7
xor eax, 0x71c8adb9
xor eax, 0x6d4af9e7
mov ecx, ecx
xor eax, 0x2d4b0764
add eax, 0x73a61264
and ecx, 3
xchg ebp, ebp
shl ecx, 3
sar eax, cl
mov ecx, dword [ebp + 0xc]
mov dword [esp - 0x14], 0x10b7402d
cbw
xor ax, word [edx + ebx*2]
mov word [ecx + ebx*2], ax
inc ebx
xchg esp, esp
mov eax, dword [edi + 4]
cmp ebx, eax
jb 0x48514a
mov ebx, dword [ebp + 0xc]
mov dword [esp - 0x14], 0x242e61cf
xor edx, edx
test esi, esi
je 0x4851d1
mov dword [esp - 0x40], edi
mov eax, dword [ebp + 0x10]
mov ecx, dword [edi + 4]
add ecx, edx
mov ax, word [eax + edx*2]
mov esp, esp
inc edx
mov word [ebx + ecx*2], ax
cmp edx, esi
jb 0x4851b6
mov dword [esp - 0x14], ebx
mov eax, dword [ebp - 4]
xor ecx, ecx
mov edi, dword [ebp + 8]
xchg edx, edx
mov word [ebx + eax*2], cx
mov dword [edi], ecx
mov ecx, ebx
mov dword [esp - 0x14], ebp
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
mov dword [esp - 0x14], edi
test ax, ax
jne 0x4851ec
sub ecx, edx
xchg ecx, ecx
mov edx, edi
sar ecx, 1
mov dword [edi + 4], ecx
cmp ecx, 2
mov dword [esp - 0x38], ecx
jbe 0x485285
mov eax, ecx
mov ecx, 0x3578d2b6
xchg edx, edx
add ecx, 0xc4dbe94
add ecx, 0x1e9e4340
xor ecx, 0x132f069a
xor ecx, 0x630186ed
mov edx, edx
add ecx, 0x1b234700
sub ecx, 0x2b6d9bfb
mul ecx
mov ebx, ebx
pushf
mov ecx, 0x383e646b
add ecx, 0x330889eb
xor ecx, 0x235d1b32
mov dword [esp - 0x24], 0x6bc35ff8
xor ecx, 0x33955f64
add ecx, 0x847155ff
popf
cmovb eax, ecx
mov dword [esp - 0x3c], 0x574acc1d
push eax
call fcn.00490c90
mov edx, eax
add esp, 4
xchg edx, edx
mov dword [edi], edx
xor esi, esi
cmp dword [edi + 4], esi
xchg esp, esp
jbe 0x4852eb
mov eax, ebx
sub eax, edx
mov dword [ebp + 8], eax
mov esi, esi
mov ebx, eax
mov ecx, esi
lea edx, [edx + 2]
mov esp, esp
and ecx, 3
mov eax, 0x157abb59
xor eax, 0x18b344de
sub eax, 0x92e9327
mov dword [esp - 0x3c], ecx
xor eax, 0x36eaebb2
add eax, 0x4938bd1f
shl ecx, 3
mov dword [esp - 0x24], 0x7c8d5dbe
inc esi
sar eax, cl
cbw
mov edx, edx
xor ax, word [edx + ebx - 2]
mov word [edx - 2], ax
cmp esi, dword [edi + 4]
mov dword [esp - 0x38], 0x7703358c
jb 0x485299
mov ebx, dword [ebp + 0xc]
push ebx
call fcn.00490c60
mov ebp, ebp
add esp, 4
mov eax, edi
pop edi
pop esi
mov dword [esp - 0x20], edi
pop ebx
mov esp, ebp
pop ebp
mov dword [esp - 0xc], 0x1bd40469
ret