Function at 0x49bf08
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6c
push edi
push esi
push ebx
mov eax, dword [ebp + 0xc]
mov word [ebp - 0x20], ax
mov edx, dword [ebp + 0x10]
mov word [ebp - 0x22], dx
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x34], 0
cmp dword [ebp + 0x18], 0
je 0x49c2e4
mov edx, dword [ebp + 0x18]
mov dword [ebp - 0x30], edx
cmp edx, 0x800
jbe 0x49bf50
mov dword [ebp - 0x30], 0x800
mov esi, esi
test byte [ebp - 0x20], 0x20
je 0x49c068
mov dword [0x5962f0], 0
mov ebx, dword [ebp - 0x20]
and ebx, 1
lea esi, [ebp - 8]
cmp dword [ebp - 0x34], 0
jne 0x49bfca
mov eax, 9
test bx, bx
je 0x49bf82
mov eax, 0x11
mov word [ebp - 8], ax
movzx eax, word [ebp - 8]
mov dword [ebp - 8], eax
mov word [esi + 4], 0
add esp, 0xfffffff4
mov eax, dword [ebp + 0x1c]
push eax
call fcn.0049d6a0
mov word [ebp - 0xa], ax
add esp, 0x10
mov dword [ebp - 0x34], 0x8000
test bx, bx
je 0x49bfb9
mov dword [ebp - 0x34], 0x4000
mov edx, dword [ebp - 0x20]
test dl, 0x10
je 0x49bfca
mov word [0x596300], 0
test bx, bx
je 0x49bff0
add esp, 0xfffffff4
lea eax, [ebp - 0xa]
push eax
movzx eax, word [ebp - 0x30]
push eax
push dword [0x4d6aac]
mov eax, dword [ebp + 0x1c]
push eax
push esi
call fcn.0049bcfc
jmp 0x49c00c
add esp, 0xfffffff4
lea eax, [ebp - 0xa]
push eax
movzx eax, word [ebp - 0x30]
push eax
push dword [0x4d6aac]
mov edx, dword [ebp + 0x1c]
push edx
push esi
call fcn.0049bab0
add esp, 0x20
test eax, eax
jne 0x49c020
mov eax, 1
jmp 0x49c2e6
cmp eax, dword [ebp - 0x30]
je 0x49c03c
mov dword [0x4d6acc], 0xe
mov eax, 1
jmp 0x49c2e6
mov eax, dword [ebp - 0x30]
sub dword [ebp - 0x34], eax
mov ecx, dword [ebp - 0x20]
and ecx, 0x10
mov esi, dword [ebp - 0x20]
xor si, word [ebp - 0x22]
mov edi, dword [ebp - 0x20]
and edi, 2
movzx edx, word [ebp - 0x22]
mov word [ebp - 0x46], dx
and word [ebp - 0x46], 1
jmp 0x49c16b
mov eax, dword [ebp - 0x20]
test al, 1
je 0x49c0f4
test al, 8
je 0x49c0b8
add esp, 0xfffffffc
mov edx, dword [ebp + 0x1c]
push edx
mov eax, dword [ebp - 0x30]
push eax
push dword [0x4d6aac]
call fcn.0049d7e8
add esp, 0x10
mov ecx, dword [ebp - 0x20]
and ecx, 0x10
mov esi, dword [ebp - 0x20]
xor si, word [ebp - 0x22]
mov edi, dword [ebp - 0x20]
and edi, 2
movzx edx, word [ebp - 0x22]
mov word [ebp - 0x46], dx
and word [ebp - 0x46], 1
jmp 0x49c162
add esp, 0xfffffffc
mov eax, dword [ebp + 0x1c]
push eax
mov edx, dword [ebp - 0x30]
push edx
push dword [0x4d6aac]
call fcn.0049d870
add esp, 0x10
mov ecx, dword [ebp - 0x20]
and ecx, 0x10
mov esi, dword [ebp - 0x20]
xor si, word [ebp - 0x22]
mov edi, dword [ebp - 0x20]
and edi, 2
movzx eax, word [ebp - 0x22]
mov word [ebp - 0x46], ax
and word [ebp - 0x46], 1
jmp 0x49c162
add esp, 0xfffffffc
mov edx, dword [ebp - 0x30]
push edx
push dword [0x4d6aac]
mov eax, dword [ebp + 0x1c]
push eax
call fcn.0048be7c
mov edx, dword [0x4d6aac]
mov eax, dword [ebp - 0x30]
add eax, edx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x30]
lea edx, [edx + eax*2]
add esp, 0x10
mov ecx, dword [ebp - 0x20]
and ecx, 0x10
mov esi, dword [ebp - 0x20]
xor si, word [ebp - 0x22]
mov edi, dword [ebp - 0x20]
and edi, 2
movzx eax, word [ebp - 0x22]
mov word [ebp - 0x46], ax
and word [ebp - 0x46], 1
cmp dword [ebp - 0x30], 0
jle 0x49c162
mov ebx, dword [ebp - 0x30]
mov esi, esi
dec dword [ebp - 0x38]
add edx, 0xfffffffe
mov eax, dword [ebp - 0x38]
movsx ax, byte [eax]
shl eax, 8
mov word [edx], ax
dec ebx
jne 0x49c14c
mov edx, dword [ebp - 0x30]
sub dword [0x5962f0], edx
test cx, cx
je 0x49c19d
xor ebx, ebx
cmp ebx, dword [ebp - 0x30]
jge 0x49c19d
nop
mov eax, dword [0x4d6aac]
movzx edx, word [0x596300]
add word [eax + ebx*2], dx
mov eax, dword [0x4d6aac]
movzx eax, word [eax + ebx*2]
mov word [0x596300], ax
inc ebx
cmp ebx, dword [ebp - 0x30]
jl 0x49c178
test esi, 4
je 0x49c1bd
xor ebx, ebx
cmp ebx, dword [ebp - 0x30]
jge 0x49c1bd
mov eax, dword [0x4d6aac]
xor word [eax + ebx*2], 0x8000
inc ebx
cmp ebx, dword [ebp - 0x30]
jl 0x49c1ac
test di, di
je 0x49c200
test byte [ebp - 0x22], 2
jne 0x49c200
xor esi, esi
xor ebx, ebx
jmp 0x49c1ec
mov eax, dword [0x4d6aac]
movsx edx, word [eax + ebx*2]
inc ebx
movsx ecx, word [eax + ebx*2]
add edx, ecx
inc ebx
sar edx, 1
mov word [eax + esi*2], dx
inc esi
add dword [ebp + 0x18], 0xfffffffe
cmp ebx, dword [ebp - 0x30]
jge 0x49c1f7
cmp dword [ebp + 0x18], 0
jne 0x49c1d0
mov dword [ebp - 0x30], esi
jmp 0x49c286
cmp dword [ebp + 0x14], 0
je 0x49c280
mov dword [ebp - 0x3c], 0
xor ebx, ebx
cmp ebx, dword [ebp - 0x30]
jge 0x49c277
cmp dword [ebp + 0x18], 0
je 0x49c277
mov esi, esi
xor ecx, ecx
mov edx, dword [ebp + 0x14]
mov edi, dword [0x4d6aac]
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x18]
dec eax
mov dword [ebp - 0x44], eax
test edx, edx
je 0x49c24f
cmp ebx, dword [ebp - 0x30]
jge 0x49c24f
mov esi, edi
movsx eax, word [esi + ebx*2]
add ecx, eax
inc ebx
dec edx
je 0x49c24f
cmp ebx, dword [ebp - 0x30]
jl 0x49c240
mov esi, dword [ebp + 0x14]
sub esi, edx
mov eax, ecx
cdq
idiv esi
mov ecx, eax
mov edx, dword [ebp - 0x3c]
mov word [edi + edx*2], cx
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x3c], eax
mov edx, dword [ebp - 0x44]
mov dword [ebp + 0x18], edx
cmp ebx, dword [ebp - 0x30]
jge 0x49c277
test edx, edx
jne 0x49c21c
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
jmp 0x49c286
mov edx, dword [ebp - 0x30]
sub dword [ebp + 0x18], edx
cmp word [ebp - 0x46], 0
je 0x49c2b8
xor ebx, ebx
cmp ebx, dword [ebp - 0x30]
jge 0x49bf2f
mov eax, dword [0x4d6aac]
movzx eax, word [eax + ebx*2]
mov edx, dword [ebp - 0x2c]
mov word [edx], ax
add edx, 2
mov dword [ebp - 0x2c], edx
inc ebx
cmp ebx, dword [ebp - 0x30]
jl 0x49c298
jmp 0x49bf2f
xor ebx, ebx
cmp ebx, dword [ebp - 0x30]
jge 0x49bf2f
nop
mov eax, dword [0x4d6aac]
movsx ax, byte [eax + ebx*2 + 1]
mov edx, dword [ebp - 0x28]
mov byte [edx], al
inc edx
mov dword [ebp - 0x28], edx
inc ebx
cmp ebx, dword [ebp - 0x30]
jl 0x49c2c4
jmp 0x49bf2f
xor eax, eax
lea esp, [ebp - 0x78]
pop ebx
pop esi
pop edi
leave
ret