Function at 0x4caa50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x639034]
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 0x4caa98
push edx
push ebx
push ecx
call fcn.004caf5b
add esp, 0x10
jmp 0x4cac6d
call fcn.00460c34
push dword [ebp - 0x3c]
call fcn.00460b77
mov edx, eax
mov dword [ebp - 0x18], edx
pop ecx
pop ecx
test edx, edx
je 0x4cac62
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.0046032b
pop ecx
pop ecx
test eax, eax
je 0x4cac62
mov edx, dword [ebp - 0x18]
mov ebx, esi
mov dword [edx + 4], edi
test edi, edi
jle 0x4cab3a
cmp edi, 4
jb 0x4cab36
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
lea ecx, [eax - 4]
lea ecx, [ecx + edi*4]
cmp eax, edx
ja 0x4caaf7
cmp ecx, edx
jae 0x4cab36
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x4cab05
dec eax
or eax, 0xfffffffc
inc eax
sub edi, eax
add ebx, 4
cmp ebx, edi
jl 0x4cab07
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 0x4cab36
mov eax, dword [edx]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jl 0x4cab30
mov ebx, dword [ebp - 0x38]
mov eax, esi
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jle 0x4cac42
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 0x4cab6b
mov eax, esi
mov dword [ebp - 0x28], esi
jmp 0x4cab72
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 0x4cac2b
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 0x4caba0
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.004cb232
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
push dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.004cb232
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.004cb232
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 0x4cac01
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 0x4cab8b
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 0x4cab4d
push edx
call fcn.0046010f
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x18]
push edx
push dword [ebp - 0x4c]
call fcn.004ca2b3
xor ecx, ecx
add esp, 0x10
inc ecx
test eax, eax
cmovne esi, ecx
push dword [ebp - 0x3c]
call fcn.00460ad7
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00546623
leave
ret