Function at 0x49694c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
xor eax, eax
cmp dword [0x4b7454], 3
push ebx
push esi
push edi
mov dword [ebp - 8], eax
mov esi, 0x4f59f8
mov ebx, 2
jg 0x496bc7
call fcn.004963df
jmp 0x496c17
mov edx, dword [esi]
mov eax, dword [0x4b7390]
xor ecx, ecx
mov cl, byte [eax + edx + 2]
mov eax, dword [0x4f59f0]
shl eax, 5
xor ecx, eax
and ecx, 0x7fff
mov dword [0x4f59f0], ecx
mov ecx, dword [0x4f59f0]
mov edx, dword [0x4f59e0]
mov eax, dword [esi]
movzx edi, word [edx + ecx*2]
mov edx, dword [0x4b7394]
and eax, 0x7fff
test edi, edi
mov word [edx + eax*2], di
mov dx, word [esi]
mov eax, dword [0x4f59f0]
mov ecx, dword [0x4f59e0]
mov word [ecx + eax*2], dx
mov dword [0x4f59f4], ebx
mov ecx, dword [0x4f59fc]
mov ebx, 2
mov dword [ebp - 4], ecx
je 0x496a32
mov eax, dword [0x4f59f4]
cmp eax, dword [0x4f5a0c]
jae 0x496a32
mov edx, dword [esi]
sub edx, edi
cmp edx, 0x7efa
ja 0x496a32
mov eax, edi
call fcn.004967fc
mov ebx, eax
cmp ebx, dword [0x4f5a04]
jbe 0x496a19
mov ebx, dword [0x4f5a04]
cmp ebx, 3
jne 0x496a32
mov eax, dword [esi]
sub eax, dword [0x4f59fc]
cmp eax, 0x1000
jbe 0x496a32
mov ebx, 2
cmp dword [0x4f59f4], 3
jb 0x496b51
cmp ebx, dword [0x4f59f4]
jbe 0x496a81
mov eax, ebx
sub eax, dword [0x4f59f4]
cmp eax, 1
jne 0x496b51
mov edx, dword [esi]
sub edx, dword [0x4f59fc]
cmp edx, 0x4000
jbe 0x496b51
mov ecx, dword [0x4f59fc]
add ecx, 0x5dc
cmp ecx, dword [ebp - 4]
jae 0x496b51
mov edx, dword [0x4f59f4]
mov eax, dword [esi]
sub edx, 3
dec eax
sub eax, dword [ebp - 4]
call fcn.00498584
mov ecx, dword [0x4f59f4]
dec ecx
sub dword [0x4f5a04], ecx
sub dword [0x4f59f4], 2
inc dword [esi]
mov edx, dword [0x4b7390]
mov ecx, dword [esi]
movzx edx, byte [edx + ecx + 2]
mov ecx, dword [0x4f59f0]
shl ecx, 5
xor edx, ecx
and edx, 0x7fff
mov dword [0x4f59f0], edx
mov edx, dword [0x4f59e0]
mov ecx, dword [0x4f59f0]
movzx edi, word [edx + ecx*2]
mov edx, dword [esi]
and edx, 0x7fff
mov ecx, dword [0x4b7394]
mov word [ecx + edx*2], di
mov edx, dword [0x4f59e0]
mov ecx, dword [0x4f59f0]
mov bx, word [esi]
mov word [edx + ecx*2], bx
dec dword [0x4f59f4]
jne 0x496aa9
xor edx, edx
mov dword [ebp - 8], edx
mov ebx, 2
inc dword [esi]
test eax, eax
je 0x496bb6
mov edx, dword [esi]
sub edx, dword [0x4f59e8]
cmp dword [0x4f59e8], 0
jl 0x496b3e
mov eax, dword [0x4b7390]
add eax, dword [0x4f59e8]
jmp 0x496b40
xor eax, eax
xor ecx, ecx
call fcn.004983a0
mov edx, dword [esi]
mov dword [0x4f59e8], edx
jmp 0x496bb6
cmp dword [ebp - 8], 0
je 0x496ba7
mov eax, dword [0x4b7390]
mov edx, dword [esi]
movzx edx, byte [eax + edx - 1]
xor eax, eax
call fcn.00498584
test eax, eax
je 0x496b9d
mov edx, dword [esi]
sub edx, dword [0x4f59e8]
cmp dword [0x4f59e8], 0
jl 0x496b8c
mov eax, dword [0x4b7390]
add eax, dword [0x4f59e8]
jmp 0x496b8e
xor eax, eax
xor ecx, ecx
call fcn.004983a0
mov edx, dword [esi]
mov dword [0x4f59e8], edx
inc dword [esi]
dec dword [0x4f5a04]
jmp 0x496bb6
mov dword [ebp - 8], 1
inc dword [esi]
dec dword [0x4f5a04]
cmp dword [0x4f5a04], 0x106
jae 0x496bc7
call fcn.004962ac
cmp dword [0x4f5a04], 0
jne 0x49697b
cmp dword [ebp - 8], 0
je 0x496bed
mov eax, dword [0x4b7390]
mov edx, dword [esi]
movzx edx, byte [eax + edx - 1]
xor eax, eax
call fcn.00498584
mov edx, dword [esi]
sub edx, dword [0x4f59e8]
cmp dword [0x4f59e8], 0
jl 0x496c0b
mov eax, dword [0x4b7390]
add eax, dword [0x4f59e8]
jmp 0x496c0d
xor eax, eax
mov ecx, 1
call fcn.004983a0
pop edi
pop esi
pop ebx
pop ecx
pop ecx
pop ebp
ret