Function at 0x5faf17
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
mov eax, dword [0x8d5f40]
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 0x5faf5f
push edx
push ebx
push ecx
call fcn.005fb422
add esp, 0x10
jmp 0x5fb134
call fcn.00551347
push dword [ebp - 0x3c]
call fcn.0055128a
mov edx, eax
mov dword [ebp - 0x18], edx
pop ecx
pop ecx
test edx, edx
je 0x5fb129
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.00539fa7
pop ecx
pop ecx
test eax, eax
je 0x5fb129
mov edx, dword [ebp - 0x18]
mov ebx, esi
mov dword [edx + 4], edi
test edi, edi
jle 0x5fb001
cmp edi, 4
jb 0x5faffd
mov eax, dword [edx]
mov dword [ebp - 0x20], eax
lea ecx, [eax - 4]
lea ecx, [ecx + edi*4]
cmp eax, edx
ja 0x5fafbe
cmp ecx, edx
jae 0x5faffd
mov eax, edi
and eax, reloc.WS2_32.dll_closesocket
jns 0x5fafcc
dec eax
or eax, 0xfffffffc
inc eax
sub edi, eax
add ebx, 4
cmp ebx, edi
jl 0x5fafce
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 0x5faffd
mov eax, dword [edx]
mov dword [eax + ebx*4], esi
inc ebx
cmp ebx, edi
jl 0x5faff7
mov ebx, dword [ebp - 0x38]
mov eax, esi
mov dword [ebp - 0x20], esi
mov ecx, dword [ebx + 4]
test ecx, ecx
jle 0x5fb109
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 0x5fb032
mov eax, esi
mov dword [ebp - 0x28], esi
jmp 0x5fb039
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 0x5fb0f2
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 0x5fb067
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.005fb6f9
push dword [ebp - 0x2c]
lea eax, [ebp - 0x14]
push dword [ebp - 0x30]
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.005fb6f9
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.005fb6f9
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 0x5fb0c8
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 0x5fb052
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 0x5fb014
push edx
call fcn.00539d8b
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x18]
push edx
push dword [ebp - 0x4c]
call fcn.005fa77a
xor ecx, ecx
add esp, 0x10
inc ecx
test eax, eax
cmovne esi, ecx
push dword [ebp - 0x3c]
call fcn.005511ea
pop ecx
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.006fedff
leave
ret