Function at 0x4c16b0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
mov ebx, dword [ebp + 8]
push edi
push 0x38
xor edi, edi
push edi
push esi
call fcn.00495e20
mov ecx, dword [ebx + 4]
add esp, 0xc
xor eax, eax
test ecx, ecx
jle 0x4c16e1
mov edx, dword [ebx + 8]
cmp byte [edx + eax], 0
jle 0x4c16dc
inc edi
inc eax
cmp eax, ecx
jl 0x4c16d5
mov dword [esi + 4], ecx
mov dword [esi + 8], edi
mov eax, dword [ebx]
mov dword [esi], eax
test edi, edi
jle 0x4c1bda
mov ecx, dword [ebx + 4]
mov edx, dword [ebx + 8]
push edi
push ecx
push edx
call fcn.004c0eb0
mov dword [ebp - 8], eax
lea eax, [edi*4]
add esp, 0xc
mov dword [ebp - 0xc], eax
call fcn.00498aa0
mov edx, dword [ebp - 8]
mov eax, esp
mov dword [ebp - 0x10], eax
test edx, edx
jne 0x4c1782
mov eax, dword [esi + 0x10]
mov edi, dword [0x4ce370]
test eax, eax
je 0x4c1735
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4c1742
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4c174f
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x1c]
test eax, eax
je 0x4c175c
push eax
call edi
add esp, 4
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4c1769
push eax
call edi
add esp, 4
push 0x38
push 0
push esi
call fcn.00495e20
add esp, 0xc
or eax, 0xffffffff
lea esp, [ebp - 0x24]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jle 0x4c1807
sub eax, edx
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], edi
mov ecx, dword [edx]
rol ecx, 0x10
mov eax, ecx
mov ebx, ecx
shr eax, 8
shl ecx, 8
shl ebx, 8
xor eax, ebx
and eax, 0xff00ff
xor eax, ecx
mov ecx, eax
shr ecx, 4
mov ebx, eax
shl ebx, 4
xor ecx, ebx
and ecx, 0xf0f0f0f
shl eax, 4
xor ecx, eax
mov eax, ecx
lea ebx, [ecx*4]
add ecx, ecx
shr eax, 2
add ecx, ecx
xor eax, ebx
and eax, 0x33333333
xor eax, ecx
mov ecx, eax
shr ecx, 1
lea ebx, [eax + eax]
xor ecx, ebx
and ecx, 0x55555555
add eax, eax
xor ecx, eax
mov dword [edx], ecx
mov ecx, dword [ebp - 0x14]
mov dword [ecx + edx], edx
add edx, 4
sub dword [ebp - 4], 1
jne 0x4c1792
mov ebx, dword [ebp + 8]
mov eax, dword [ebp - 0x10]
push 0x4c0d00
push 4
push edi
push eax
call dword [0x4ce358]
mov eax, dword [ebp - 0xc]
add esp, 0x10
call fcn.00498aa0
mov edx, dword [ebp - 0xc]
mov dword [ebp - 4], esp
push edx
call dword [0x4ce33c]
mov dword [esi + 0x14], eax
add esp, 4
xor eax, eax
test edi, edi
jle 0x4c188a
lea ebx, [ebx]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + eax*4]
sub edx, dword [ebp - 8]
mov ecx, dword [ebp - 4]
sar edx, 2
mov dword [ecx + edx*4], eax
inc eax
cmp eax, edi
jl 0x4c1840
test edi, edi
jle 0x4c188a
mov eax, ecx
mov ecx, dword [ebp - 8]
sub ecx, eax
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x10], edi
jmp 0x4c1873
mov ecx, dword [ebp - 0x14]
mov edx, dword [eax]
mov ecx, dword [ecx + eax]
mov ebx, dword [esi + 0x14]
add eax, 4
sub dword [ebp - 0x10], 1
mov dword [ebx + edx*4], ecx
jne 0x4c1870
mov ebx, dword [ebp + 8]
mov edx, dword [ebp - 8]
push edx
call dword [0x4ce370]
mov eax, dword [ebp - 4]
add esp, 4
push eax
push edi
push ebx
call fcn.004c11c0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
push ecx
mov dword [esi + 0x10], eax
call dword [0x4ce33c]
mov dword [esi + 0x18], eax
xor eax, eax
add esp, 4
xor ecx, ecx
cmp dword [ebx + 4], eax
jle 0x4c18dd
mov edx, dword [ebx + 8]
cmp byte [eax + edx], 0
jle 0x4c18d7
mov edx, dword [ebp - 4]
mov edx, dword [edx + ecx*4]
mov edi, dword [esi + 0x18]
mov dword [edi + edx*4], eax
inc ecx
inc eax
cmp eax, dword [ebx + 4]
jl 0x4c18c1
push ecx
call dword [0x4ce33c]
xor ecx, ecx
add esp, 4
mov dword [esi + 0x1c], eax
cmp dword [ebx + 4], ecx
mov dword [ebp + 8], ecx
jle 0x4c1916
mov eax, dword [ebx + 8]
mov al, byte [ecx + eax]
test al, al
jle 0x4c1910
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 4]
mov edx, dword [edx + edi*4]
mov edi, dword [esi + 0x1c]
inc dword [ebp + 8]
mov byte [edx + edi], al
inc ecx
cmp ecx, dword [ebx + 4]
jl 0x4c18f4
mov ecx, dword [esi + 8]
xor edi, edi
xor eax, eax
cmp ecx, edi
je 0x4c1926
inc eax
shr ecx, 1
jne 0x4c1921
add eax, 0xfffffffc
cmp eax, 5
mov dword [esi + 0x24], eax
jge 0x4c1938
mov dword [esi + 0x24], 5
mov eax, 8
cmp dword [esi + 0x24], eax
jle 0x4c1945
mov dword [esi + 0x24], eax
mov ecx, dword [esi + 0x24]
mov ebx, 1
shl ebx, cl
push 4
push ebx
mov dword [ebp - 0x14], ebx
call dword [0x4ce344]
add esp, 8
cmp dword [ebp + 8], 0
mov dword [esi + 0x20], eax
mov dword [esi + 0x28], edi
jle 0x4c1a44
mov edi, edi
mov eax, dword [esi + 0x1c]
movsx ecx, byte [eax + edi]
add eax, edi
cmp dword [esi + 0x28], ecx
jge 0x4c1981
mov dword [esi + 0x28], ecx
movsx ebx, byte [eax]
cmp ebx, dword [esi + 0x24]
jg 0x4c1a37
mov ecx, dword [esi + 0x14]
mov edx, dword [ecx + edi*4]
rol edx, 0x10
mov eax, edx
mov ecx, edx
shr eax, 8
shl edx, 8
shl ecx, 8
xor eax, ecx
and eax, 0xff00ff
xor eax, edx
mov edx, eax
shr edx, 4
mov ecx, eax
shl ecx, 4
xor edx, ecx
and edx, 0xf0f0f0f
shl eax, 4
xor edx, eax
mov eax, edx
lea ecx, [edx*4]
shr eax, 2
xor eax, ecx
add edx, edx
add edx, edx
and eax, 0x33333333
xor eax, edx
mov edx, eax
shr edx, 1
lea ecx, [eax + eax]
xor edx, ecx
mov ecx, dword [esi + 0x24]
sub ecx, ebx
mov ebx, 1
add eax, eax
and edx, 0x55555555
shl ebx, cl
xor edx, eax
xor eax, eax
mov dword [ebp - 0x10], eax
test ebx, ebx
jle 0x4c1a37
mov ecx, dword [esi + 0x1c]
mov cl, byte [edi + ecx]
mov ebx, eax
shl ebx, cl
mov ecx, dword [esi + 0x20]
lea eax, [edi + 1]
or ebx, edx
mov dword [ecx + ebx*4], eax
mov ecx, dword [esi + 0x1c]
movsx ebx, byte [ecx + edi]
mov ecx, dword [esi + 0x24]
mov eax, dword [ebp - 0x10]
sub ecx, ebx
mov ebx, 1
shl ebx, cl
inc eax
mov dword [ebp - 0x10], eax
cmp eax, ebx
jl 0x4c1a04
inc edi
cmp edi, dword [ebp + 8]
jl 0x4c1970
mov ebx, dword [ebp - 0x14]
mov ecx, 0x1f
sub ecx, dword [esi + 0x24]
mov eax, 0xfffffffe
shl eax, cl
xor edi, edi
cmp ebx, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
jle 0x4c1bda
lea esp, [esp]
mov ecx, 0x20
sub ecx, dword [esi + 0x24]
shl edi, cl
mov edx, edi
rol edx, 0x10
mov eax, edx
shr eax, 8
mov ecx, edx
shl ecx, 8
xor eax, ecx
and eax, 0xff00ff
mov ecx, edx
shl ecx, 8
xor eax, ecx
mov ecx, eax
shr ecx, 4
mov ebx, eax
shl eax, 4
shl ebx, 4
xor ecx, ebx
and ecx, 0xf0f0f0f
xor ecx, eax
mov eax, ecx
lea ebx, [ecx*4]
shr eax, 2
add ecx, ecx
xor eax, ebx
add ecx, ecx
and eax, 0x33333333
xor eax, ecx
mov ecx, eax
shr ecx, 1
lea ebx, [eax + eax]
xor ecx, ebx
add eax, eax
and ecx, 0x55555555
xor ecx, eax
mov eax, dword [esi + 0x20]
cmp dword [eax + ecx*4], 0
jne 0x4c1bca
mov ecx, dword [ebp - 4]
mov ebx, dword [ebp + 8]
lea eax, [ecx + 1]
cmp eax, ebx
jge 0x4c1b17
mov ebx, dword [esi + 0x14]
lea ecx, [ebx + ecx*4 + 4]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
cmp dword [ecx], edi
ja 0x4c1b14
inc dword [ebp - 4]
add dword [ebp - 0xc], 4
inc eax
cmp eax, ebx
jl 0x4c1b01
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
cmp eax, ebx
jge 0x4c1b42
mov ecx, dword [esi + 0x14]
lea ecx, [ecx + eax*4]
mov dword [ebp - 0xc], ecx
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx]
and ecx, dword [ebp - 0x18]
cmp edi, ecx
jb 0x4c1b3c
add dword [ebp - 0xc], 4
inc eax
cmp eax, ebx
jl 0x4c1b27
mov ecx, dword [ebp - 4]
mov dword [ebp - 8], eax
sub ebx, eax
mov edi, ecx
cmp ecx, 0x7fff
jbe 0x4c1b53
mov edi, 0x7fff
cmp ebx, 0x7fff
jbe 0x4c1b60
mov ebx, 0x7fff
mov eax, edx
shr eax, 8
mov ecx, edx
shl ecx, 8
xor eax, ecx
and eax, 0xff00ff
shl edx, 8
xor eax, edx
mov ecx, eax
mov edx, eax
shr ecx, 4
shl edx, 4
xor ecx, edx
shl eax, 4
and ecx, 0xf0f0f0f
xor ecx, eax
mov eax, ecx
shr eax, 2
lea edx, [ecx*4]
xor eax, edx
add ecx, ecx
and eax, 0x33333333
add ecx, ecx
xor eax, ecx
mov edx, eax
shr edx, 1
lea ecx, [eax + eax]
or edi, 0xffff0000
xor edx, ecx
shl edi, 0xf
add eax, eax
or edi, ebx
and edx, 0x55555555
xor edx, eax
mov eax, dword [esi + 0x20]
mov dword [eax + edx*4], edi
mov edi, dword [ebp - 0x10]
inc edi
cmp edi, dword [ebp - 0x14]
mov dword [ebp - 0x10], edi
jl 0x4c1a70
xor eax, eax
lea esp, [ebp - 0x24]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret