Function at 0x496de0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
mov eax, dword [0x68683c]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ecx + 0x48], 3
mov edx, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x9c], ebx
mov ebx, dword [ebp + 0x24]
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0xb0], edx
mov dword [ebp - 0xa0], eax
mov dword [ebp - 0xa4], esi
mov dword [ebp - 0xb8], ebx
jne 0x496e58
push ebx
mov ebx, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp - 0x9c]
push ebx
mov ebx, dword [ebp + 0x18]
push ebx
push esi
push eax
push edi
push edx
call fcn.00496be0
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005a6cf8
mov esp, ebp
pop ebp
ret 0x20
push eax
call fcn.00422120
mov ecx, eax
mov eax, dword [ebp + 0x18]
add eax, ecx
mov dword [ebp - 0xac], eax
add eax, 0x14
add esp, 4
mov dword [ebp - 0xa8], ecx
cmp eax, 0x80
ja 0x4970c7
lea eax, [edi + 1]
cdq
sub eax, edx
mov esi, eax
push ecx
mov ecx, dword [ebp - 0xa0]
sar esi, 1
sub edi, esi
add edi, dword [ebp - 0xb0]
push ecx
lea edx, [ebp - 0x84]
push edx
mov dword [ebp - 0xb4], edi
call sub.MSVCR100.dll_memcpy
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xa8]
push eax
push ecx
lea eax, [ebp + edx - 0x84]
push eax
call sub.MSVCR100.dll_memcpy
mov edx, dword [ebp - 0xac]
push ebx
lea ecx, [ebp - 0x94]
push ecx
mov ecx, dword [ebp - 0xb0]
push edx
lea eax, [ebp - 0x84]
push eax
push esi
push ecx
call fcn.004b6510
mov edi, dword [ebp + 0x20]
add esp, 0x30
test edi, edi
jle 0x496fac
mov ecx, dword [ebp - 0x9c]
mov eax, 0x10
sub eax, ecx
mov dword [ebp - 0xa8], eax
lea eax, [edi - 1]
shr eax, 4
inc eax
mov dword [ebp - 0xa4], ecx
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xac]
mov ecx, dword [ebp - 0xb0]
push ebx
lea edx, [ebp - 0x18]
push edx
add eax, 0x10
push eax
lea eax, [ebp - 0x94]
push eax
push esi
push ecx
call fcn.004b6510
mov ecx, dword [ebp - 0xb0]
push ebx
lea edx, [ebp - 0x94]
push edx
push 0x10
mov eax, edx
push eax
push esi
push ecx
call fcn.004b6510
mov edx, dword [ebp - 0xa8]
mov ecx, dword [ebp - 0xa4]
add edx, ecx
add esp, 0x30
cmp edx, edi
jle 0x49708a
mov eax, edi
and eax, reloc.WS2_32.dll_ntohs
jns 0x496f87
dec eax
or eax, 0xfffffff0
inc eax
test eax, eax
jle 0x496f99
push eax
lea eax, [ebp - 0x18]
push eax
push ecx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
add dword [ebp - 0xa4], 0x10
dec dword [ebp - 0xa0]
jne 0x496f23
mov edx, dword [ebp - 0xac]
push ebx
lea ecx, [ebp - 0x98]
push ecx
mov ecx, dword [ebp - 0xb4]
push edx
lea eax, [ebp - 0x84]
push eax
push esi
push ecx
call fcn.004b6540
add esp, 0x18
test edi, edi
jle 0x4970c7
mov ecx, dword [ebp - 0x9c]
mov edx, dword [ebp - 0xac]
mov eax, 0x14
sub eax, ecx
add edx, 0x14
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0xa8], edx
mov dword [ebp - 0x9c], ecx
lea ecx, [edi - 1]
mov eax, 0xcccccccd
mul ecx
shr edx, 4
inc edx
mov dword [ebp - 0xa0], edx
mov eax, dword [ebp - 0xa8]
push ebx
lea edx, [ebp - 0x18]
push edx
mov edx, dword [ebp - 0xb4]
push eax
lea ecx, [ebp - 0x98]
push ecx
push esi
push edx
call fcn.004b6540
mov edx, dword [ebp - 0xb4]
push ebx
lea eax, [ebp - 0x98]
push eax
push 0x14
mov ecx, eax
push ecx
push esi
push edx
call fcn.004b6540
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0x9c]
add eax, edx
add esp, 0x30
cmp eax, edi
jle 0x497094
mov eax, 0x66666667
imul edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*4]
add ecx, ecx
lea edx, [ecx + ecx]
mov ecx, edi
sub ecx, edx
mov edx, dword [ebp - 0x9c]
jmp 0x497099
mov eax, 0x10
jmp 0x496f8b
mov ecx, 0x14
xor eax, eax
test ecx, ecx
jle 0x4970b2
nop
mov bl, byte [ebp + eax - 0x18]
xor byte [edx + eax], bl
inc eax
cmp eax, ecx
jl 0x4970a0
mov ebx, dword [ebp - 0xb8]
add edx, 0x14
dec dword [ebp - 0xa0]
mov dword [ebp - 0x9c], edx
jne 0x497016
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005a6cf8
mov esp, ebp
pop ebp
ret 0x20