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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8000c
call fcn.0045f3c0
mov eax, dword [0x476018]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov ebx, ecx
push 0x505d9c
mov dword [ebp - 0x80008], ebx
mov esi, edx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebx, ebx
js 0x4172d7
xor eax, eax
cmp ebx, 0x1388
setl al
test eax, eax
je 0x4172d7
imul ebx, ebx, 0x6c
add ebx, 0x47ac80
mov eax, dword [ebx + 4]
test eax, eax
js 0x4172d7
xor ecx, ecx
cmp eax, 0x1388
setl cl
mov eax, ecx
test eax, eax
je 0x4172d7
cmp dword [ebx + 8], 0
je 0x4172d7
cmp dword [ebx + 0x1c], 0xffffffff
je 0x4172d7
push edi
lea edx, [ebp - 0x80004]
push esi
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
xor eax, eax
cmp byte [ebp - 0x80004], 0xc1
jne 0x41728a
mov cl, byte [ebp - 0x80002]
lea esi, [edi - 3]
test esi, esi
jle 0x4172b8
mov edi, edi
mov dl, byte [ebp + eax - 0x80001]
xor dl, 0xa0
sub dl, cl
mov byte [ebp + eax - 0x80001], dl
inc eax
cmp eax, esi
jl 0x417270
jmp 0x4172b8
mov cl, byte [ebp - 0x80001]
lea esi, [edi - 4]
test esi, esi
jle 0x4172b8
jmp 0x4172a0
mov dl, byte [ebp + eax - 0x80000]
xor dl, 0xa0
sub dl, cl
mov byte [ebp + eax - 0x80000], dl
inc eax
cmp eax, esi
jl 0x4172a0
cmp edi, 0x80000
jle 0x4172f4
mov eax, dword [ebp - 0x80008]
push edi
push eax
push str._SocketManager__Max_msg_size__Type:_1__Index:__d__Size:__d_
push 1
call fcn.00417be0
add esp, 0x10
push 0x505d9c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418a8f
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x24]
mov eax, dword [esi + 0x20]
test eax, eax
jle 0x41738e
mov eax, dword [esi + 0x180028]
lea ecx, [eax + edi]
cmp ecx, 0x100000
jle 0x417353
mov esi, dword [ebp - 0x80008]
push ecx
push esi
push str._SocketManager__Max_msg_size__Type:_2__Index:__d__Size:__d_
push 1
call fcn.00417be0
add esp, 0x10
mov eax, esi
mov ecx, 0x505d20
call fcn.00417420
push 0x505d9c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00418a8f
mov esp, ebp
pop ebp
ret
push edi
lea ecx, [ebp - 0x80004]
push ecx
lea edx, [eax + esi + 0x80028]
push edx
call sub.MSVCR100.dll_memcpy
add esp, 0xc
add dword [esi + 0x180028], edi
push 0x505d9c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.00418a8f
mov esp, ebp
pop ebp
ret
push edi
lea ecx, [ebp - 0x80004]
push ecx
lea edx, [eax + esi + 0x24]
push edx
call sub.MSVCR100.dll_memcpy
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 + 0x80024], ecx
mov dword [esi + 0x1c], 1
mov edx, dword [ebx + 0x1c]
mov dword [ebp - 0x8000c], ecx
lea ecx, [ebp - 0x8000c]
push ecx
push 1
push eax
push edx
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
jne 0x417371
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x3e5
je 0x417371
call esi
push eax
push str._SocketManager__WSASend___failed_with_error:__d
push 1
call fcn.00417be0
mov eax, dword [ebp - 0x80008]
add esp, 0xc
jmp 0x41732c