Function at 0x41a980
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52c5f4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x60
push esi
push edi
xor edi, edi
mov byte [ebp - 0x12], cl
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x24], edi
xor edx, edx
mov dword [ebp - 4], 1
mov dword [ebp - 0x1c], edx
mov eax, 0x2aaaaaab
mov edx, dword [ebx + 0xc]
sub edx, dword [ebx + 8]
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x41ac27
xor esi, esi
mov dword [ebp - 0x20], esi
nop word [eax + eax]
test cl, cl
je 0x41abc5
add esi, dword [ebx + 8]
mov eax, esi
cmp dword [esi + 0x14], 0x10
jb 0x41aa05
mov eax, dword [esi]
push dword [esi + 0x10]
cmp dword [ebx + 0x28], 0x10
lea ecx, [ebx + 0x14]
mov edx, dword [ebx + 0x24]
cmovae ecx, dword [ebx + 0x14]
push eax
push 0
call fcn.00492370
add esp, 0xc
test eax, eax
je 0x41ab28
xorps xmm0, xmm0
mov word [ebp - 0x6e], 0x9f95
mov byte [ebp - 0x6c], 0x9e
xor eax, eax
movups xmmword [ebp - 0x6b], xmm0
mov dword [ebp - 0x5b], 0
mov word [ebp - 0x57], 0
mov byte [ebp - 0x55], 0
nop dword [eax]
lea ecx, [eax - 0x51]
xor byte [ebp + eax - 0x6e], cl
inc eax
cmp eax, 3
jb 0x41aa50
xorps xmm0, xmm0
mov dword [0x565590], eax
lea ecx, [ebp - 0x6e]
mov byte [ebp - 0x6b], 0
movups xmmword [ebp - 0x3c], xmm0
mov dword [ebp - 0x2c], 0
lea edx, [ecx + 1]
mov dword [ebp - 0x28], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41aa81
sub ecx, edx
lea eax, [ebp - 0x6e]
push ecx
push eax
lea ecx, [ebp - 0x3c]
call fcn.00402c40
or edi, 4
mov byte [ebp - 4], 2
lea eax, [ebp - 0x3c]
or edi, 1
cmp dword [ebp - 0x28], 0x10
mov dword [ebp - 0x24], edi
cmovae eax, dword [ebp - 0x3c]
mov ecx, eax
mov dword [ebp - 0x18], eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x41aab7
sub ecx, edx
mov eax, closesocket
mov edx, dword [esi + 0x10]
sub eax, edx
cmp eax, ecx
jb 0x41ac79
cmp dword [esi + 0x14], 0x10
jb 0x41aada
mov esi, dword [esi]
push edx
push esi
push ecx
push dword [ebp - 0x18]
push ecx
push dword [ebp - 0x24]
lea ecx, [ebp - 0x54]
call fcn.004946d0
push dword [ebp - 0x44]
mov esi, dword [ebp - 0x54]
lea eax, [ebp - 0x54]
mov edx, dword [ebx + 0x24]
lea ecx, [ebx + 0x14]
or edi, 0xa
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x40]
cmp edi, 0x10
cmovae eax, esi
cmp dword [ebx + 0x28], 0x10
push eax
cmovae ecx, dword [ebx + 0x14]
push 0
call fcn.00492370
add esp, 0xc
cmp eax, 0xffffffff
jne 0x41ab2e
mov byte [ebp - 0x11], 0
jmp 0x41ab32
mov edi, dword [ebp - 0x40]
mov esi, dword [ebp - 0x54]
mov byte [ebp - 0x11], 1
mov eax, dword [ebp - 0x18]
test al, 2
je 0x41ab72
and eax, 0xfffffffd
mov dword [ebp - 0x18], eax
cmp edi, 0x10
jb 0x41ab72
lea ecx, [edi + 1]
mov eax, esi
cmp ecx, 0x1000
jb 0x41ab65
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41ac7e
push ecx
push esi
call fcn.00504f31
mov eax, dword [ebp - 0x18]
add esp, 8
mov dword [ebp - 4], 1
test al, 1
je 0x41abb7
mov ecx, dword [ebp - 0x28]
and eax, 0xfffffffe
mov dword [ebp - 0x18], eax
cmp ecx, 0x10
jb 0x41abb7
mov edx, dword [ebp - 0x3c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41abad
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41ac7e
push ecx
push edx
call fcn.00504f31
add esp, 8
cmp byte [ebp - 0x11], 0
jne 0x41ac21
mov edi, dword [ebp - 0x18]
mov esi, dword [ebp - 0x20]
jmp 0x41abf4
mov eax, dword [ebx + 8]
add eax, esi
cmp dword [eax + 0x14], 0x10
mov edx, dword [eax + 0x10]
jb 0x41abd5
mov eax, dword [eax]
cmp dword [ebx + 0x28], 0x10
lea ecx, [ebx + 0x14]
push edx
cmovae ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x24]
push eax
push 0
call fcn.00492370
add esp, 0xc
cmp eax, 0xffffffff
jne 0x41ac21
mov ecx, dword [ebx + 0xc]
mov eax, 0x2aaaaaab
sub ecx, dword [ebx + 8]
add esi, 0x18
inc dword [ebp - 0x1c]
imul ecx
mov dword [ebp - 0x20], esi
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [ebp - 0x1c], eax
jae 0x41ac27
mov cl, byte [ebp - 0x12]
jmp 0x41a9f0
mov byte [ebp - 0x11], 1
jmp 0x41ac2b
mov byte [ebp - 0x11], 0
lea ecx, [ebx + 8]
call fcn.0048eeb0
mov ecx, dword [ebx + 0x28]
cmp ecx, 0x10
jb 0x41ac63
mov edx, dword [ebx + 0x14]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x41ac59
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x41ac7e
push ecx
push edx
call fcn.00504f31
add esp, 8
mov ecx, dword [ebp - 0xc]
mov al, byte [ebp - 0x11]
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
call fcn.004024b0
call fcn.0050a1d0
int3