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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x182d0
call fcn.00412dd0
mov eax, dword [0x42d518]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x49b4d0
mov dword [ebp - 0x182c8], esi
mov dword [ebp - 0x182cc], eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test esi, esi
js 0x40c09f
xor eax, eax
cmp esi, 0x1388
setl al
test eax, eax
je 0x40c09f
mov edi, esi
imul edi, edi, 0x54
add edi, 0x434158
mov ecx, dword [edi + 4]
test ecx, ecx
js 0x40c09f
xor eax, eax
cmp ecx, 0x1388
setl al
test eax, eax
je 0x40c09f
cmp dword [edi + 8], 0
je 0x40c09f
cmp dword [edi + 0x1c], 0xffffffff
je 0x40c09f
mov ebx, dword [ebp + 0x10]
push ebx
push dword [ebp - 0x182cc]
lea eax, [ebp - 0x182c4]
push eax
call fcn.0040ff30
add esp, 0xc
xor ecx, ecx
cmp byte [ebp - 0x182c4], 0xc1
jne 0x40bf49
mov ah, byte [ebp - 0x182c2]
lea edx, [ebx - 3]
test edx, edx
jle 0x40bf77
mov al, byte [ebp + ecx - 0x182c1]
xor al, 0xa0
sub al, ah
mov byte [ebp + ecx - 0x182c1], al
inc ecx
cmp ecx, edx
jl 0x40bf30
jmp 0x40bf77
mov ah, byte [ebp - 0x182c1]
lea edx, [ebx - 4]
test edx, edx
jle 0x40bf77
jmp 0x40bf60
mov al, byte [ebp + ecx - 0x182c0]
xor al, 0xa0
sub al, ah
mov byte [ebp + ecx - 0x182c0], al
inc ecx
cmp ecx, edx
jl 0x40bf60
cmp ebx, 0x182b8
jle 0x40bf95
push ebx
push esi
push str._SocketManager__Max_msg_size__Type:_1__Index:__d__Size:__d_
push 1
call fcn.0040c860
add esp, 0x10
jmp 0x40c09f
mov esi, dword [edi + 0x24]
mov eax, dword [esi + 0x20]
test eax, eax
jle 0x40c00a
mov ecx, dword [esi + 0x30598]
lea eax, [ecx + ebx]
cmp eax, 0x182b8
jle 0x40bfcb
mov esi, dword [ebp - 0x182c8]
push eax
push esi
push str._SocketManager__Max_msg_size__Type:_2__Index:__d__Size:__d_
push 1
call fcn.0040c860
add esp, 0x10
jmp 0x40c094
push ebx
lea eax, [ebp - 0x182c4]
push eax
lea eax, [esi + 0x182e0]
add eax, ecx
push eax
call fcn.0040ff30
add esp, 0xc
add dword [esi + 0x30598], ebx
push 0x49b4d0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040cf20
mov esp, ebp
pop ebp
ret 0xc
push ebx
lea ecx, [ebp - 0x182c4]
add eax, 0x24
push ecx
add eax, esi
push eax
call fcn.0040ff30
add dword [esi + 0x20], ebx
mov ecx, dword [esi + 0x20]
add esp, 0xc
lea eax, [esi + 0x24]
push 0
mov dword [esi + 0x18], eax
push esi
lea eax, [esi + 0x14]
push 0
mov dword [eax], ecx
lea ecx, [ebp - 0x182d0]
push ecx
push 1
mov dword [esi + 0x182dc], 0
mov dword [esi + 0x1c], 1
push eax
push dword [edi + 0x1c]
mov dword [ebp - 0x182d0], 0
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x40bfea
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x40bfea
call esi
push eax
push str._SocketManager__WSASend___failed_with_error:__d
push 1
call fcn.0040c860
mov esi, dword [ebp - 0x182c8]
add esp, 0xc
push esi
mov ecx, 0x49b458
call fcn.0040c0c0
push 0x49b4d0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.0040cf20
mov esp, ebp
pop ebp
ret 0xc