Function at 0x4ca959
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x638034]
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 0x4ca9a1
push edx
push ebx
push ecx
call fcn.004cae64
add esp, 0x10
jmp 0x4cab76
call fcn.00460b39
push dword [ebp - 0x3c]
call fcn.00460a7c
mov edx, eax
mov dword [ebp - 0x18], edx
pop ecx
pop ecx
test edx, edx
je 0x4cab6b
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.00460230
pop ecx
pop ecx
test eax, eax
je 0x4cab6b
mov edx, dword [ebp - 0x18]
mov ebx, esi
mov dword [edx + 4], edi
test edi, edi
jle 0x4caa43
cmp edi, 4
jb 0x4caa3f
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
lea ecx, [eax - 4]
lea ecx, [ecx + edi*4]
cmp eax, edx
ja 0x4caa00
cmp ecx, edx
jae 0x4caa3f
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x4caa0e
dec eax
or eax, 0xfffffffc
inc eax
sub edi, eax
add ebx, 4
cmp ebx, edi
jl 0x4caa10
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 0x4caa3f
mov eax, dword [edx]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jl 0x4caa39
mov ebx, dword [ebp - 0x38]
mov eax, esi
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jle 0x4cab4b
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 0x4caa74
mov eax, esi
mov dword [ebp - 0x28], esi
jmp 0x4caa7b
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 0x4cab34
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 0x4caaa9
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.004cb13b
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
push dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004cb13b
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.004cb13b
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 0x4cab0a
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 0x4caa94
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 0x4caa56
push edx
call fcn.00460014
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x18]
push edx
push dword [ebp - 0x4c]
call fcn.004ca1bc
xor ecx, ecx
add esp, 0x10
inc ecx
test eax, eax
cmovne esi, ecx
push dword [ebp - 0x3c]
call fcn.004609dc
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005462f1
leave
ret