Function at 0x48550c
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov esi, 0x4d9c78
mov ebp, 0x4d9c74
xor eax, eax
mov dword [esp + 4], eax
mov ebx, 2
cmp dword [0x4a2c54], 3
jg 0x48576e
call fcn.00484fc9
jmp 0x4857bf
mov edx, dword [0x4a2b98]
mov eax, dword [esi]
xor ecx, ecx
mov cl, byte [edx + eax + 2]
mov edx, dword [0x4d9c70]
shl edx, 5
xor ecx, edx
and ecx, 0x7fff
mov dword [0x4d9c70], ecx
mov ecx, dword [0x4d9c60]
mov edx, dword [0x4d9c70]
movzx edi, word [ecx + edx*2]
and eax, 0x7fff
mov edx, dword [0x4a2b9c]
mov word [edx + eax*2], di
mov eax, dword [0x4d9c60]
mov ecx, dword [0x4d9c70]
mov dx, word [esi]
mov word [eax + ecx*2], dx
mov dword [ebp], ebx
mov eax, dword [0x4d9c7c]
mov dword [esp], eax
mov ebx, 2
test edi, edi
je 0x4855ed
mov eax, dword [ebp]
cmp eax, dword [0x4d9c8c]
jae 0x4855ed
mov edx, dword [esi]
sub edx, edi
cmp edx, 0x7efa
ja 0x4855ed
mov eax, edi
call fcn.004853bc
mov ebx, eax
mov eax, dword [0x4d9c84]
cmp ebx, eax
jbe 0x4855d4
mov ebx, eax
cmp ebx, 3
jne 0x4855ed
mov eax, dword [esi]
sub eax, dword [0x4d9c7c]
cmp eax, 0x1000
jbe 0x4855ed
mov ebx, 2
cmp dword [ebp], 3
jb 0x4856f6
cmp ebx, dword [ebp]
jbe 0x485633
mov eax, ebx
sub eax, dword [ebp]
cmp eax, 1
jne 0x4856f6
mov edx, dword [esi]
sub edx, dword [0x4d9c7c]
cmp edx, 0x4000
jbe 0x4856f6
mov ecx, dword [0x4d9c7c]
add ecx, 0x5dc
cmp ecx, dword [esp]
jae 0x4856f6
mov edx, dword [ebp]
mov eax, dword [esi]
sub edx, 3
dec eax
sub eax, dword [esp]
call fcn.00486fdc
mov ecx, dword [ebp]
dec ecx
sub dword [0x4d9c84], ecx
sub dword [ebp], 2
inc dword [esi]
mov ecx, dword [0x4a2b98]
mov edx, dword [esi]
movzx ecx, byte [ecx + edx + 2]
mov ebx, dword [0x4d9c70]
shl ebx, 5
xor ecx, ebx
and ecx, 0x7fff
mov dword [0x4d9c70], ecx
mov ecx, dword [0x4d9c60]
mov ebx, dword [0x4d9c70]
movzx edi, word [ecx + ebx*2]
and edx, 0x7fff
mov ecx, dword [0x4a2b9c]
mov word [ecx + edx*2], di
mov edx, dword [0x4d9c60]
mov ecx, dword [0x4d9c70]
mov bx, word [esi]
mov word [edx + ecx*2], bx
dec dword [ebp]
jne 0x485652
xor edx, edx
mov dword [esp + 4], edx
mov ebx, 2
inc dword [esi]
test eax, eax
je 0x48575d
mov edx, dword [esi]
sub edx, dword [0x4d9c68]
cmp dword [0x4d9c68], 0
jl 0x4856e3
mov eax, dword [0x4a2b98]
add eax, dword [0x4d9c68]
jmp 0x4856e5
xor eax, eax
xor ecx, ecx
call fcn.00486e00
mov edx, dword [esi]
mov dword [0x4d9c68], edx
jmp 0x48575d
cmp dword [esp + 4], 0
je 0x48574d
mov eax, dword [0x4a2b98]
mov edx, dword [esi]
movzx edx, byte [eax + edx - 1]
xor eax, eax
call fcn.00486fdc
test eax, eax
je 0x485743
mov edx, dword [esi]
sub edx, dword [0x4d9c68]
cmp dword [0x4d9c68], 0
jl 0x485732
mov eax, dword [0x4a2b98]
add eax, dword [0x4d9c68]
jmp 0x485734
xor eax, eax
xor ecx, ecx
call fcn.00486e00
mov edx, dword [esi]
mov dword [0x4d9c68], edx
inc dword [esi]
dec dword [0x4d9c84]
jmp 0x48575d
mov dword [esp + 4], 1
inc dword [esi]
dec dword [0x4d9c84]
cmp dword [0x4d9c84], 0x106
jae 0x48576e
call fcn.00484e98
cmp dword [0x4d9c84], 0
jne 0x48553f
cmp dword [esp + 4], 0
je 0x485795
mov eax, dword [0x4a2b98]
mov edx, dword [esi]
movzx edx, byte [eax + edx - 1]
xor eax, eax
call fcn.00486fdc
mov edx, dword [esi]
sub edx, dword [0x4d9c68]
cmp dword [0x4d9c68], 0
jl 0x4857b3
mov eax, dword [0x4a2b98]
add eax, dword [0x4d9c68]
jmp 0x4857b5
xor eax, eax
mov ecx, 1
call fcn.00486e00
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret