Function at 0x40a9c0
Capabilities:
Encode data using xor
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x200c
call fcn.004210a0
mov eax, dword [0x42c670]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
push 0x448f7c
mov dword [ebp - 0x2008], ebx
mov esi, edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
js 0x40aad7
xor eax, eax
cmp ebx, 0x3e8
setl al
test eax, eax
je 0x40aad7
imul ebx, ebx, 0x64
add ebx, 0x430818
mov eax, dword [ebx + 4]
test eax, eax
js 0x40aad7
xor ecx, ecx
cmp eax, 0x3e8
setl cl
mov eax, ecx
test eax, eax
je 0x40aad7
cmp dword [ebx + 8], 0
je 0x40aad7
cmp dword [ebx + 0x4c], 0xffffffff
je 0x40aad7
push edi
lea edx, [ebp - 0x2004]
push esi
push edx
call fcn.0040f350
add esp, 0xc
xor eax, eax
cmp byte [ebp - 0x2004], 0xc1
jne 0x40aa8a
mov cl, byte [ebp - 0x2002]
lea esi, [edi - 3]
test esi, esi
jle 0x40aab8
mov edi, edi
mov dl, byte [ebp + eax - 0x2001]
xor dl, 0xb7
sub dl, cl
mov byte [ebp + eax - 0x2001], dl
inc eax
cmp eax, esi
jl 0x40aa70
jmp 0x40aab8
mov cl, byte [ebp - 0x2001]
lea esi, [edi - 4]
test esi, esi
jle 0x40aab8
jmp 0x40aaa0
mov dl, byte [ebp + eax - 0x2000]
xor dl, 0xb7
sub dl, cl
mov byte [ebp + eax - 0x2000], dl
inc eax
cmp eax, esi
jl 0x40aaa0
cmp edi, 0x2000
jle 0x40aaf4
mov eax, dword [ebp - 0x2008]
push edi
push eax
push str._SocketTCP__Max_msg_size__Type:_1_Index:__d_Size:__d_
push 1
call fcn.0040b3f0
add esp, 0x10
push 0x448f7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d6a3
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x54]
mov eax, dword [esi + 0x20]
test eax, eax
jle 0x40ab8e
mov eax, dword [esi + 0x12028]
lea ecx, [eax + edi]
cmp ecx, 0x10000
jle 0x40ab53
mov esi, dword [ebp - 0x2008]
push ecx
push esi
push str._SocketTCP__Max_msg_size__Type:_2_Index:__d_Size:__d_
push 1
call fcn.0040b3f0
add esp, 0x10
mov eax, esi
mov ecx, 0x448f00
call fcn.0040ac20
push 0x448f7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d6a3
mov esp, ebp
pop ebp
ret
push edi
lea ecx, [ebp - 0x2004]
push ecx
lea edx, [eax + esi + 0x2028]
push edx
call fcn.0040f350
add esp, 0xc
add dword [esi + 0x12028], edi
push 0x448f7c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0040d6a3
mov esp, ebp
pop ebp
ret
push edi
lea ecx, [ebp - 0x2004]
push ecx
lea edx, [eax + esi + 0x24]
push edx
call fcn.0040f350
add dword [esi + 0x20], edi
mov ecx, dword [esi + 0x20]
add esp, 0xc
lea eax, [esi + 0x24]
mov dword [esi + 0x18], eax
lea eax, [esi + 0x14]
mov dword [eax], ecx
xor ecx, ecx
push ecx
push esi
push ecx
mov dword [esi + 0x2024], ecx
mov dword [esi + 0x1c], 1
mov edx, dword [ebx + 0x4c]
mov dword [ebp - 0x200c], ecx
lea ecx, [ebp - 0x200c]
push ecx
push 1
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x40ab71
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x40ab71
call esi
push eax
push str._SocketTCP__WSASend___failed_with_error:__d
push 1
call fcn.0040b3f0
mov eax, dword [ebp - 0x2008]
add esp, 0xc
jmp 0x40ab2c