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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x13c
mov eax, dword [0x53273c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp + 0x14]
mov dword [ebp - 0x124], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x134], eax
mov eax, dword [ebp + 0x24]
push esi
mov esi, dword [ebp + 0xc]
mov dword [ebp - 0x138], eax
mov eax, dword [0x544a40]
mov dword [ebp - 0x10c], ebx
mov dword [ebp - 0x110], ecx
mov dword [ebp - 0x114], 2
push edi
mov edi, dword [ebp + 0x28]
mov dword [ebp - 0x13c], edi
test eax, eax
jne 0x4b3dbb
call sub.KERNEL32.dll_GetCurrentProcessId
mov ecx, dword [ebp - 0x110]
mov dword [0x544a40], eax
push dword [0x544a44]
push ecx
push ebx
push ecx
push eax
push dword [0x51ffe0]
lea eax, [ebp - 0x104]
push esi
push str.St__s__lx__lx__s_s_s__s
push 0x100
push eax
call fcn.004085b0
mov ebx, eax
add esp, 0x28
cmp ebx, 0x100
jb 0x4b3e08
push esi
push dword [ebp - 0x10c]
push str.buf_too_small:_nbname____s__nsname____s_
call fcn.004afb30
add esp, 0xc
jmp 0x4b40c3
lea ecx, [ebp - 0x104]
xor esi, esi
mov edx, ecx
mov eax, ecx
add edx, ebx
cmp eax, edx
jae 0x4b3e37
nop word [eax + eax]
movzx eax, byte [ecx]
inc ecx
xor eax, esi
shr esi, 8
movzx eax, al
xor esi, dword [eax*4 + 0x531b10]
cmp ecx, edx
jb 0x4b3e20
push 0
push ebx
lea eax, [ebp - 0x104]
push eax
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_send]
cmp ebx, eax
je 0x4b3e62
push ebx
push eax
push str.socket_write_returned__d_rather_than__d
call fcn.004afb30
add esp, 0xc
jmp 0x4b40c3
mov ebx, dword [ebp + 0x2c]
push 0
dec ebx
push ebx
push edi
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
js 0x4b3e7b
cmp eax, ebx
jbe 0x4b3e7d
xor eax, eax
push 3
push 0x508ab4
push edi
mov byte [edi + eax], 0
call fcn.004d9aa0
add esp, 0xc
test eax, eax
jne 0x4b4090
lea ecx, [ebp - 0x118]
lea eax, [edi + 3]
push ecx
push eax
mov dword [ebp - 0x11c], eax
call fcn.004b41c0
add esp, 8
test eax, eax
je 0x4b40b5
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.004b41c0
add esp, 8
test eax, eax
je 0x4b40b5
mov cl, byte [eax]
cmp cl, 0x20
jg 0x4b3ef0
nop dword [eax]
inc eax
test cl, cl
je 0x4b40b5
mov cl, byte [eax]
cmp cl, 0x20
jle 0x4b3ee0
mov dword [ebp - 0x10c], 0
cmp cl, 0x2d
jne 0x4b3f13
inc eax
mov dword [ebp - 0x10c], 1
cmp byte [eax], 0x20
jle 0x4b40b5
lea ecx, [ebp - 0x128]
push ecx
push eax
call fcn.004b41c0
add esp, 8
test eax, eax
je 0x4b40b5
lea ecx, [ebp - 0x110]
push ecx
push eax
call fcn.004b41c0
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x4b40b5
mov al, byte [ecx]
inc ecx
mov dword [ebp - 0x130], ecx
cmp al, 0x20
jne 0x4b40b5
mov eax, dword [ebp - 0x110]
mov ebx, ecx
add eax, ecx
cmp ecx, eax
jae 0x4b3f72
cmp byte [ebx], 0
je 0x4b40b5
inc ebx
cmp ebx, eax
jb 0x4b3f64
lea eax, [ebp - 0x120]
push eax
push ebx
call fcn.004b41c0
add esp, 8
test eax, eax
je 0x4b40b5
cmp byte [eax], 0
jne 0x4b40b5
push dword [ebp - 0x108]
call fcn.004b0fa0
add esp, 4
mov edi, eax
mov eax, dword [ebp - 0x11c]
sub ebx, eax
push dword [ebp - 0x118]
push ebx
push eax
push esi
call fcn.004b40f0
add esp, 0xc
push eax
call fcn.004b3050
mov esi, eax
push edi
xor esi, edi
call fcn.004b0fa0
push 1
mov edi, eax
lea eax, [ebp - 0x108]
push 0x8000
push eax
push esi
mov dword [ebp - 0x108], edi
call fcn.004b4120
push 1
push closesocket
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.004b4120
push 0x10000
push closesocket
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.004b4120
mov esi, eax
add esp, 0x3c
cmp esi, dword [ebp - 0x120]
jne 0x4b40af
push edi
mov dword [ebp - 0x114], 0
call fcn.004b0fa0
push eax
push esi
call fcn.004b3050
mov ecx, dword [0x544a60]
add esp, 0xc
mov dword [ecx*4 + 0x544a58], eax
inc ecx
mov dword [0x544a60], ecx
mov ecx, dword [ebp - 0x124]
test ecx, ecx
je 0x4b40c3
mov eax, dword [ebp - 0x10c]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x128]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x134]
mov eax, dword [ebp - 0x130]
mov dword [ecx], eax
mov ecx, dword [ebp - 0x138]
mov eax, dword [ebp - 0x110]
mov dword [ecx], eax
jmp 0x4b40c3
push 4
push str.No:
push edi
call fcn.004d9aa0
add esp, 0xc
test eax, eax
jne 0x4b40b5
lea eax, [edi + 4]
push eax
push str.ampl_lic:__s
jmp 0x4b40bb
mov edi, dword [ebp - 0x13c]
push edi
push str.Bad_reply_from_ampl_lic:___s_
call fcn.004afb30
add esp, 8
mov ebx, dword [ebp + 8]
push 2
push ebx
call dword [sym.imp.WS2_32.dll_shutdown]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x114]
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret