Function at 0x4c5118
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x62fff4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x48], edx
mov dword [ebp - 0x3c], eax
push eax
cmp ebx, edi
jne 0x4c5160
push edx
push ebx
push ecx
call fcn.004c5623
add esp, 0x10
jmp 0x4c5335
call fcn.0045b2fe
push dword [ebp - 0x3c]
call fcn.0045b241
mov edx, eax
mov dword [ebp - 0x18], edx
pop ecx
pop ecx
test edx, edx
je 0x4c532a
mov ecx, dword [ebx + 4]
mov edi, dword [edi + 4]
add ecx, 4
add edi, ecx
push edi
push edx
mov dword [ebp - 0x1c], edi
call fcn.0045a9f5
pop ecx
pop ecx
test eax, eax
je 0x4c532a
mov edx, dword [ebp - 0x18]
mov ebx, esi
mov dword [edx + 4], edi
test edi, edi
jle 0x4c5202
cmp edi, 4
jb 0x4c51fe
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
lea ecx, [eax - 4]
lea ecx, [ecx + edi*4]
cmp eax, edx
ja 0x4c51bf
cmp ecx, edx
jae 0x4c51fe
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x4c51cd
dec eax
or eax, 0xfffffffc
inc eax
sub edi, eax
add ebx, 4
cmp ebx, edi
jl 0x4c51cf
lea eax, [edi + 3]
mov edi, dword [ebp - 0x20]
cdq
and edx, 3
lea ecx, [edx + eax]
mov edx, dword [ebp - 0x18]
sar ecx, 2
shl ecx, 4
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov edi, dword [ebp - 0x1c]
jmp 0x4c51fe
mov eax, dword [edx]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jl 0x4c51f8
mov ebx, dword [ebp - 0x38]
mov eax, esi
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jle 0x4c530a
mov edx, eax
shl edx, 2
mov dword [ebp - 0x24], edx
mov edx, dword [ebx]
mov ebx, eax
inc eax
mov edi, dword [edx + ebx*4]
mov dword [ebp - 0x2c], edi
cmp eax, ecx
jne 0x4c5233
mov eax, esi
mov dword [ebp - 0x28], esi
jmp 0x4c523a
mov eax, dword [edx + ebx*4 + 4]
mov dword [ebp - 0x28], eax
mov edi, dword [ebp - 0x34]
mov ebx, esi
mov edx, dword [ebp - 0x18]
mov ecx, dword [edi + 4]
test ecx, ecx
jle 0x4c52f3
xor eax, dword [ebp - 0x2c]
mov dword [ebp - 0x40], eax
mov edx, dword [edi]
mov edi, esi
mov eax, dword [edx + ebx*4]
mov dword [ebp - 0x30], eax
lea eax, [ebx + 1]
cmp eax, ecx
je 0x4c5268
mov edi, dword [edx + ebx*4 + 4]
push dword [ebp - 0x28]
lea eax, [ebp - 0xc]
push edi
push eax
lea eax, [ebp - 8]
push eax
call fcn.004c58fa
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
push dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004c58fa
push dword [ebp - 0x40]
xor edi, dword [ebp - 0x30]
lea eax, [ebp - 0x44]
push edi
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.004c58fa
mov eax, dword [ebp - 0x10]
add esp, 0x30
xor eax, dword [ebp - 8]
mov edi, esi
xor eax, dword [ebp - 0xc]
xor eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
xor eax, dword [ebp - 0x14]
xor eax, dword [ebp - 8]
xor eax, dword [ebp - 0x1c]
xor eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
mov ecx, dword [edx]
mov eax, dword [ebp + edi*4 - 0x14]
xor dword [esi + ecx], eax
inc edi
lea esi, [esi + 4]
cmp edi, 4
jl 0x4c52c9
mov edi, dword [ebp - 0x34]
add ebx, 2
add dword [ebp - 0x24], 8
push 0
pop esi
mov ecx, dword [edi + 4]
cmp ebx, ecx
jl 0x4c5253
mov ebx, dword [ebp - 0x38]
mov eax, dword [ebp - 0x20]
add eax, 2
mov dword [ebp - 0x20], eax
mov ecx, dword [ebx + 4]
cmp eax, ecx
jl 0x4c5215
push edx
call fcn.0045a7d9
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x18]
push edx
push dword [ebp - 0x4c]
call fcn.004c497b
xor ecx, ecx
add esp, 0x10
inc ecx
test eax, eax
cmovne esi, ecx
push dword [ebp - 0x3c]
call fcn.0045b1a1
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00540aaa
leave
ret