Function at 0x4a6520
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
push 0x38
mov esi, ecx
mov dword [ebp - 0x18], edx
xor edi, edi
mov dword [ebp - 0x1c], esi
push edi
push esi
call fcn.00495b20
mov edx, dword [ebp - 0x18]
add esp, 0xc
xor ecx, ecx
mov eax, dword [edx + 4]
mov dword [ebp - 0x20], eax
test eax, eax
jle 0x4a6a4a
lea ebx, [edx + 8]
mov esi, eax
mov dword [ebp - 8], ebx
mov ebx, dword [ebx]
nop dword [eax]
cmp byte [ebx + ecx], 0
lea eax, [edi + 1]
cmovle eax, edi
inc ecx
mov edi, eax
cmp ecx, esi
jl 0x4a6560
mov esi, dword [ebp - 0x1c]
lea ebx, [edx + 8]
mov eax, dword [ebp - 0x20]
mov dword [esi + 8], edi
mov dword [esi + 4], eax
lea eax, [esi + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [edx]
mov dword [esi], eax
test edi, edi
jle 0x4a6a51
mov edx, dword [edx + 4]
mov ecx, dword [ebx]
push edi
call fcn.004a6170
add esp, 4
mov dword [ebp - 0x10], eax
lea eax, [edi*4]
mov dword [ebp - 0x28], eax
call fcn.004a3200
mov eax, dword [ebp - 0x10]
mov ecx, esp
mov dword [ebp - 0x24], ecx
test eax, eax
jne 0x4a65d2
mov ecx, esi
call fcn.004a6ac0
or eax, 0xffffffff
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
sub ecx, eax
mov dword [ebp - 0x14], edi
mov ebx, eax
mov dword [ebp - 0x20], ecx
mov esi, ecx
nop
mov ecx, dword [ebx]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor ecx, eax
mov dword [ebx], ecx
mov dword [esi + ebx], ebx
add ebx, 4
sub edi, 1
jne 0x4a65e0
push 0x4a5c90
push 4
push dword [ebp - 0x14]
push dword [ebp - 0x24]
call fcn.0049fab0
mov ebx, dword [ebp - 0x28]
add esp, 0x10
mov eax, ebx
call fcn.004a3200
mov edi, esp
push ebx
mov dword [ebp - 0x20], edi
call fcn.00498301
mov esi, dword [ebp - 0x1c]
add esp, 4
mov edx, dword [ebp - 0x14]
xor ecx, ecx
mov ebx, dword [ebp - 8]
mov dword [esi + 0x14], eax
test edx, edx
jle 0x4a66b4
mov eax, dword [ebp - 0xc]
mov esi, dword [ebp - 0x24]
mov dword [ebp - 0x14], edx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
nop
mov eax, dword [esi + ecx*4]
sub eax, dword [ebp - 0x10]
sar eax, 2
mov dword [edi + eax*4], ecx
inc ecx
cmp ecx, edx
jl 0x4a66a0
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x10]
mov ebx, edx
sub eax, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], eax
mov edx, dword [edi]
lea edi, [edi + 4]
mov ecx, dword [esi + 0x14]
mov eax, dword [eax + edi - 4]
mov dword [ecx + edx*4], eax
mov eax, dword [ebp - 0x2c]
sub ebx, 1
jne 0x4a66c1
push dword [ebp - 0x10]
call fcn.0049904b
mov edi, dword [ebp - 0x20]
add esp, 4
mov edx, dword [ebp - 0x14]
push edi
mov edi, dword [ebp - 0x18]
mov ecx, edi
call fcn.004a5d30
add esp, 4
mov dword [esi + 0x10], eax
push dword [ebp - 0x28]
call fcn.00498301
mov ebx, dword [ebp - 8]
xor ecx, ecx
add esp, 4
mov dword [esi + 0x18], eax
xor edx, edx
mov dword [ebp - 0x28], ecx
cmp dword [edi + 4], ecx
jle 0x4a673a
mov eax, dword [ebx]
cmp byte [edx + eax], 0
jle 0x4a6732
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + ecx*4]
mov eax, dword [esi + 0x18]
mov dword [eax + ecx*4], edx
mov ecx, dword [ebp - 0x28]
inc ecx
mov dword [ebp - 0x28], ecx
inc edx
cmp edx, dword [edi + 4]
jl 0x4a6717
jmp 0x4a6743
mov eax, dword [ebp - 0xc]
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], eax
push ecx
call fcn.00498301
mov dword [esi + 0x1c], eax
xor edi, edi
mov eax, dword [ebp - 0x18]
xor edx, edx
add esp, 4
mov dword [esi + 0x28], 0
mov dword [ebp - 0x14], edi
cmp dword [eax + 4], edx
jle 0x4a67ce
mov eax, dword [ebx]
mov al, byte [edx + eax]
mov byte [ebp - 1], al
test al, al
jle 0x4a6792
mov eax, dword [ebp - 0x20]
mov bl, byte [ebp - 1]
mov ecx, dword [eax + edi*4]
inc edi
mov eax, dword [esi + 0x1c]
mov byte [ecx + eax], bl
mov ebx, dword [ebp - 8]
mov eax, dword [ebx]
movsx eax, byte [eax + edx]
cmp eax, dword [esi + 0x28]
jle 0x4a6792
mov dword [esi + 0x28], eax
mov eax, dword [ebp - 0x18]
inc edx
cmp edx, dword [eax + 4]
jl 0x4a6765
mov dword [ebp - 0x14], edi
cmp edi, 1
jne 0x4a67ce
cmp dword [esi + 0x28], edi
jne 0x4a67ce
push 4
push 2
mov dword [esi + 0x24], edi
call fcn.00499596
mov dword [esi + 0x20], eax
add esp, 8
mov dword [eax + 4], edi
mov eax, dword [esi + 0x20]
mov dword [eax], edi
xor eax, eax
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov eax, dword [eax]
test eax, eax
je 0x4a67e5
nop dword [eax]
inc ecx
shr eax, 1
jne 0x4a67e0
add ecx, 0xfffffffc
mov dword [esi + 0x24], ecx
cmp ecx, 5
jge 0x4a67fe
mov dword [esi + 0x24], 5
mov ecx, 5
jmp 0x4a680f
cmp ecx, 8
jle 0x4a680f
mov dword [esi + 0x24], 8
mov ecx, 8
mov eax, 1
shl eax, cl
push 4
push eax
mov dword [ebp - 0x18], eax
call fcn.00499596
add esp, 8
mov dword [esi + 0x20], eax
xor ebx, ebx
test edi, edi
jle 0x4a6903
mov eax, dword [esi + 0x1c]
movsx ecx, byte [eax + ebx]
mov dword [ebp - 0x24], ecx
cmp ecx, dword [esi + 0x24]
jg 0x4a68fa
mov eax, dword [esi + 0x14]
mov ecx, dword [eax + ebx*4]
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
and ecx, 0x55555555
xor edx, edx
xor ecx, eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x20], ecx
mov eax, 1
mov ecx, dword [esi + 0x24]
sub ecx, dword [ebp - 0x24]
shl eax, cl
test eax, eax
jle 0x4a68fa
mov eax, dword [esi + 0x1c]
lea edi, [ebx + 1]
mov cl, byte [eax + ebx]
mov eax, dword [esi + 0x20]
shl edx, cl
or edx, dword [ebp - 0x20]
mov dword [eax + edx*4], edi
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x24]
mov edx, dword [ebp - 0x28]
inc edx
movsx eax, byte [eax + ebx]
sub ecx, eax
mov dword [ebp - 0x28], edx
mov eax, 1
shl eax, cl
cmp edx, eax
jl 0x4a68c5
mov edi, dword [ebp - 0x14]
inc ebx
cmp ebx, edi
jl 0x4a6831
mov edx, dword [esi + 0x24]
mov ecx, 0x1f
sub ecx, edx
mov dword [ebp - 0x20], edx
mov eax, 0xfffffffe
xor ebx, ebx
shl eax, cl
xor edi, edi
mov dword [ebp - 0x2c], eax
xor eax, eax
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x18], eax
jle 0x4a6a51
nop dword [eax]
mov ecx, 0x20
sub ecx, edx
shl eax, cl
mov ecx, eax
mov dword [ebp - 0x28], eax
rol ecx, 0x10
mov edx, ecx
mov eax, ecx
shr edx, 8
shl eax, 8
xor edx, eax
shl ecx, 8
and edx, 0xff00ff
xor edx, ecx
mov ecx, edx
mov eax, edx
shr ecx, 4
shl eax, 4
xor ecx, eax
shl edx, 4
and ecx, 0xf0f0f0f
xor ecx, edx
mov edx, ecx
shr edx, 2
lea eax, [ecx*4]
xor edx, eax
lea eax, [ecx*4]
and edx, 0x33333333
xor edx, eax
mov ecx, edx
shr ecx, 1
lea eax, [edx + edx]
xor ecx, eax
lea eax, [edx + edx]
mov edx, dword [ebp - 0x20]
and ecx, 0x55555555
xor ecx, eax
mov dword [ebp - 0x20], edx
mov eax, dword [esi + 0x20]
cmp dword [eax + ecx*4], 0
lea eax, [eax + ecx*4]
mov dword [ebp - 0x10], eax
jne 0x4a6a2e
mov ecx, dword [ebp - 0x14]
lea edx, [ebx + 1]
cmp edx, ecx
jge 0x4a69e0
mov eax, dword [esi + 0x14]
mov esi, dword [ebp - 0x28]
lea eax, [eax + ebx*4]
add eax, 4
nop
cmp dword [eax], esi
ja 0x4a69dd
inc edx
inc ebx
add eax, 4
cmp edx, ecx
jl 0x4a69d0
mov esi, dword [ebp - 0x1c]
cmp edi, ecx
jge 0x4a6a02
mov eax, dword [esi + 0x14]
lea edx, [eax + edi*4]
nop word [eax + eax]
mov eax, dword [edx]
and eax, dword [ebp - 0x2c]
cmp dword [ebp - 0x28], eax
jb 0x4a6a02
inc edi
add edx, 4
cmp edi, ecx
jl 0x4a69f0
sub ecx, edi
mov edx, 0x7fff
cmp ebx, 0x7fff
mov eax, ebx
cmova eax, edx
cmp ecx, edx
cmova ecx, edx
or eax, 0xffff0000
shl eax, 0xf
or eax, ecx
mov ecx, dword [ebp - 0x10]
mov dword [ecx], eax
mov edx, dword [esi + 0x24]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x24]
inc eax
mov dword [ebp - 0x24], eax
cmp eax, dword [ebp - 0x18]
jl 0x4a6930
xor eax, eax
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi + 4], eax
mov eax, dword [edx]
mov dword [esi], eax
xor eax, eax
lea esp, [ebp - 0x38]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret