Function at 0x494980
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x1c
mov esi, ecx
mov eax, dword [ecx + 0xc]
shl eax, 2
push eax
call fcn.004ae930
add esp, 4
mov dword [esi], eax
mov eax, dword [esi + 8]
lea eax, [eax*4 + 4]
push eax
call fcn.004ae930
add esp, 4
mov ebx, eax
mov eax, dword [esi + 8]
lea eax, [eax*4 + 4]
push eax
call fcn.004ae930
add esp, 4
mov edi, eax
cmp dword [esi], 0
je 0x494a18
test ebx, ebx
je 0x494a18
test edi, edi
je 0x494a18
cmp dword [esi + 8], 0xffffffff
je 0x494a34
mov ecx, 0xffffffff
nop dword [eax]
mov dword [edi + ecx*4 + 4], 0
mov dword [ebx + ecx*4 + 4], 0
inc ecx
cmp ecx, dword [esi + 8]
jne 0x4949e0
cmp dword [esi + 0xc], 0
je 0x494a3f
xor eax, eax
nop
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + eax*4]
inc dword [ebx + ecx*4]
inc eax
cmp eax, dword [esi + 0xc]
jne 0x494a00
mov ecx, dword [esi + 8]
test ecx, ecx
jne 0x494a45
jmp 0x494a62
push ebx
call fcn.004ae950
add esp, 4
push edi
call fcn.004ae950
add esp, 4
mov edi, 0x53
jmp 0x494f7a
mov ecx, 0xffffffff
cmp dword [esi + 0xc], 0
jne 0x4949fc
xor eax, eax
test ecx, ecx
je 0x494a62
mov eax, dword [edi]
xor ecx, ecx
nop dword [eax]
add eax, dword [ebx + ecx*4]
add eax, eax
mov dword [edi + ecx*4 + 4], eax
inc ecx
cmp ecx, dword [esi + 8]
jb 0x494a50
mov eax, dword [esi + 0xc]
test eax, eax
je 0x494aa7
xor edx, edx
jmp 0x494a75
inc edx
cmp edx, eax
je 0x494aa7
mov ecx, dword [esi + 4]
mov ecx, dword [ecx + edx*4]
test ecx, ecx
je 0x494a70
mov eax, dword [edi + ecx*4]
lea ebp, [eax + 1]
mov dword [edi + ecx*4], ebp
mov ecx, dword [esi]
mov dword [ecx + edx*4], eax
mov eax, dword [esi]
mov ecx, dword [esi + 4]
movzx ecx, byte [ecx + edx*4]
mov ebp, 0xffffffff
shl ebp, cl
not ebp
and dword [eax + edx*4], ebp
mov eax, dword [esi + 0xc]
jmp 0x494a70
push ebx
call fcn.004ae950
add esp, 4
push edi
call fcn.004ae950
add esp, 4
push 0x800
call fcn.004ae930
add esp, 4
mov edi, 0x53
test eax, eax
je 0x494f7a
mov ebx, eax
push 0x800
push 0
push eax
call fcn.004ae9e0
add esp, 0xc
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x494b66
xor eax, eax
jmp 0x494af5
inc eax
cmp eax, ecx
jae 0x494b66
mov edx, dword [esi + 4]
mov edx, dword [edx + eax*4]
cmp edx, 0xa
jb 0x494af0
mov ecx, dword [esi]
mov ebp, dword [ecx + eax*4]
mov ecx, edx
add cl, 0xf7
shr ebp, cl
rol bp, 8
mov ecx, ebp
and ecx, 0xf0f
shl ecx, 4
shr ebp, 4
and ebp, 0xf0f
or ebp, ecx
mov ecx, ebp
and ecx, 0x3333
shr ebp, 2
and ebp, 0x3333
lea ecx, [ecx*4]
add ecx, ebp
mov ebp, ecx
and ebp, 0x5540
shr ecx, 1
and ecx, 0x5500
lea ecx, [ecx + ebp*2]
shr ecx, 5
mov ebp, dword [ebx + ecx]
cmp ebp, edx
cmova edx, ebp
mov dword [ebx + ecx], edx
mov ecx, dword [esi + 0xc]
jmp 0x494af0
pxor xmm0, xmm0
movdqa xmm1, xmmword [0x5eb490]
xor eax, eax
movdqa xmm2, xmmword [0x5eb4a0]
movdqa xmm3, xmmword [0x5eb4b0]
movdqa xmm4, xmmword [0x5eb4c0]
movdqa xmm5, xmmword [0x5eb4d0]
nop word cs:[eax + eax]
movdqu xmm7, xmmword [ebx + eax*4]
movdqa xmm6, xmm7
pxor xmm6, xmm2
pcmpgtd xmm6, xmm3
paddd xmm7, xmm4
pslld xmm7, 0x17
paddd xmm7, xmm5
cvttps2dq xmm7, xmm7
pand xmm7, xmm6
movdqu xmm6, xmmword [ebx + eax*4 + 0x10]
paddd xmm1, xmm7
movdqa xmm7, xmm6
pxor xmm7, xmm2
pcmpgtd xmm7, xmm3
paddd xmm6, xmm4
pslld xmm6, 0x17
paddd xmm6, xmm5
cvttps2dq xmm6, xmm6
pand xmm6, xmm7
paddd xmm0, xmm6
add eax, 8
cmp eax, 0x200
jne 0x494ba0
paddd xmm0, xmm1
pshufd xmm1, xmm0, 0xee
paddd xmm1, xmm0
pshufd xmm0, xmm1, 0x55
paddd xmm0, xmm1
movd ebp, xmm0
sub esp, 4
movd dword [esp], xmm0
call fcn.004ae930
add esp, 4
mov dword [esi + 0x10], eax
mov dword [esp], ebp
mov eax, ebp
add eax, ebp
push eax
call fcn.004ae930
add esp, 4
mov dword [esi + 0x14], eax
cmp dword [esi + 0x10], 0
je 0x494cec
test eax, eax
je 0x494cec
cmp dword [esp], 0
je 0x494cab
mov edx, dword [esp]
mov eax, edx
and eax, 3
xor ecx, ecx
cmp edx, 4
jb 0x494c96
mov edx, dword [esp]
and edx, 0xfffffffc
xor ecx, ecx
nop
mov edi, dword [esi + 0x10]
mov byte [edi + ecx], 0x10
mov edi, dword [esi + 0x10]
mov byte [edi + ecx + 1], 0x10
mov edi, dword [esi + 0x10]
mov byte [edi + ecx + 2], 0x10
mov edi, dword [esi + 0x10]
mov byte [edi + ecx + 3], 0x10
add ecx, 4
cmp edx, ecx
jne 0x494c70
test eax, eax
je 0x494cab
nop word [eax + eax]
mov edx, dword [esi + 0x10]
mov byte [edx + ecx], 0x10
inc ecx
dec eax
jne 0x494ca0
mov eax, 0x200
xor edx, edx
jmp 0x494cc9
inc edx
cmp edx, 0x200
je 0x494cfa
mov ecx, dword [ebx + edx*4]
cmp ecx, 0xa
jb 0x494cc0
mov edi, dword [esi + 0x10]
mov byte [edi + edx], cl
mov edi, dword [esi + 0x14]
mov word [edi + edx*2], ax
add cl, 0xf7
mov edi, 1
shl edi, cl
add eax, edi
jmp 0x494cc0
push ebx
call fcn.004ae950
add esp, 4
jmp 0x494f7a
push ebx
call fcn.004ae950
add esp, 4
cmp dword [esi + 0xc], 0
je 0x494e9d
xor edx, edx
mov dword [esp + 8], 0
jmp 0x494d2a
inc edx
cmp edx, dword [esi + 0xc]
jae 0x494e92
mov eax, dword [esi + 4]
mov ebx, dword [eax + edx*4]
test ebx, ebx
je 0x494d20
mov eax, dword [esi]
mov dword [esp + 0xc], edx
mov edi, dword [eax + edx*4]
xor ebp, ebp
mov ecx, 0
cmp ebx, 1
mov dword [esp + 0x14], ebx
je 0x494d9d
mov eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x10], eax
lea eax, [ebx - 2]
xor ebp, ebp
xor ecx, ecx
nop dword [eax]
mov dword [esp + 4], ecx
mov edx, eax
inc dl
movzx edx, dl
xor ebx, ebx
bt edi, edx
setb bl
shl ebx, cl
xor edx, edx
bt edi, eax
setb dl
mov ecx, dword [esp + 4]
inc cl
shl edx, cl
or ebp, edx
mov ecx, dword [esp + 4]
or ebp, ebx
add ecx, 2
add eax, 0xfffffffe
cmp ecx, dword [esp + 0x10]
jne 0x494d60
mov ebx, dword [esp + 0x14]
test bl, 1
je 0x494db4
mov edx, ecx
not edx
add edx, ebx
xor eax, eax
bt edi, edx
setb al
shl eax, cl
or ebp, eax
mov edx, dword [esp + 8]
inc edx
cmp ebx, 9
mov dword [esp + 8], edx
ja 0x494e1e
mov eax, 9
sub eax, ebx
mov dword [esp + 4], eax
mov eax, 1
nop word cs:[eax + eax]
lea edi, [eax - 1]
mov ecx, ebx
shl edi, cl
or edi, ebp
mov ecx, dword [esi + 0x10]
cmp byte [ecx + edi], 0x10
jne 0x494f75
mov byte [ecx + edi], bl
mov ebx, eax
mov ecx, dword [esp + 4]
shr ebx, cl
mov ecx, dword [esi + 0x14]
mov edx, dword [esp + 0xc]
mov word [ecx + edi*2], dx
inc eax
test ebx, ebx
mov ebx, dword [esp + 0x14]
je 0x494de0
mov edx, dword [esp + 0xc]
jmp 0x494d20
mov eax, ebp
and eax, 0x1ff
mov ecx, dword [esi + 0x10]
movzx ecx, byte [ecx + eax]
sub ecx, ebx
jb 0x494f75
mov dword [esp + 4], ecx
mov ecx, dword [esi + 0x14]
movzx eax, word [ecx + eax*2]
mov dword [esp + 0x10], eax
lea eax, [ebx - 9]
mov dword [esp + 0x18], eax
shr ebp, 9
mov edi, 1
mov edx, dword [esp + 0xc]
nop word cs:[eax + eax]
lea eax, [edi - 1]
mov ecx, dword [esp + 0x18]
shl eax, cl
or eax, ebp
add eax, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
mov byte [ecx + eax], bl
mov ebx, edi
mov ecx, dword [esp + 4]
shr ebx, cl
mov ecx, dword [esi + 0x14]
mov word [ecx + eax*2], dx
inc edi
test ebx, ebx
mov ebx, dword [esp + 0x14]
je 0x494e60
jmp 0x494d20
cmp dword [esp + 8], 2
jae 0x494f5a
mov eax, dword [esp]
xor edi, edi
test eax, eax
je 0x494f7a
mov ecx, eax
mov eax, 0
cmp ecx, 1
jne 0x494eec
test byte [esp], 1
je 0x494f7a
mov ecx, dword [esi + 0x10]
cmp byte [ecx + eax], 0x10
jne 0x494f7a
xor edx, edx
cmp eax, 0x200
setae dl
lea edx, [edx + edx*8 + 1]
mov byte [ecx + eax], dl
mov ecx, dword [esi + 0x14]
mov word [ecx + eax*2], 0xffff
jmp 0x494f7a
mov ecx, dword [esp]
and ecx, 0xfffffffe
xor eax, eax
jmp 0x494f07
add eax, 2
cmp ecx, eax
je 0x494eb6
mov edx, dword [esi + 0x10]
cmp byte [edx + eax], 0x10
jne 0x494f2a
xor ebx, ebx
cmp eax, 0x200
setae bl
lea ebx, [ebx + ebx*8]
inc ebx
mov byte [edx + eax], bl
mov edx, dword [esi + 0x14]
mov word [edx + eax*2], 0xffff
mov edx, dword [esi + 0x10]
cmp byte [edx + eax + 1], 0x10
jne 0x494f00
lea ebx, [eax + 1]
mov ebp, ecx
xor ecx, ecx
cmp ebx, 0x200
setae cl
lea ecx, [ecx + ecx*8 + 1]
mov byte [edx + eax + 1], cl
mov ecx, dword [esi + 0x14]
mov word [ecx + eax*2 + 2], 0xffff
mov ecx, ebp
jmp 0x494f00
cmp dword [esp], 0
je 0x494f84
mov eax, dword [esi + 0x10]
xor ecx, ecx
xor edi, edi
cmp byte [eax + ecx], 0x10
je 0x494f75
inc ecx
cmp dword [esp], ecx
jne 0x494f67
jmp 0x494f7a
mov edi, 0x37
mov eax, edi
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
xor edi, edi
jmp 0x494f7a