Function at 0x401160
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
mov eax, 0x1694
call fcn.00407c60
mov eax, dword [0x417f54]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1634], 0
mov dword [ebp - 0x1630], 0
push 0x1000
push 0
lea eax, [ebp - 0x1004]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1654], 0x1000
lea ecx, [ebp - 0x1620]
push ecx
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x1624], eax
cmp dword [ebp - 0x1624], 0
je 0x401208
push 0x6f
push 0
lea edx, [ebp - 0x132c]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x1624]
push eax
lea ecx, [ebp - 0x132c]
call fcn.004035c0
mov ecx, eax
call fcn.00404380
push eax
call fcn.00404d80
add esp, 8
xor al, al
jmp 0x40179c
push 0x20
push 0
lea ecx, [ebp - 0x1694]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1690], 0
mov dword [ebp - 0x168c], 1
mov dword [ebp - 0x1688], 6
xor edx, edx
mov dword [ebp - 0x1670], edx
xor eax, eax
mov dword [ebp - 0x1024], eax
mov dword [ebp - 0x1020], eax
mov dword [ebp - 0x101c], eax
mov dword [ebp - 0x1018], eax
mov dword [ebp - 0x1014], eax
lea ecx, [ebp - 0x1670]
call fcn.00403230
mov ecx, eax
call fcn.00403890
mov dword [ebp - 0x166c], eax
lea ecx, [ebp - 0x1024]
call fcn.00403450
mov ecx, eax
call fcn.00403f20
mov dword [ebp - 0x1668], eax
lea ecx, [ebp - 0x1634]
push ecx
lea edx, [ebp - 0x1694]
push edx
mov eax, dword [ebp - 0x166c]
push eax
mov ecx, dword [ebp - 0x1668]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x1624], eax
cmp dword [ebp - 0x1624], 0
je 0x401304
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x6f
push 0
lea edx, [ebp - 0x12bc]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x1624]
push eax
lea ecx, [ebp - 0x12bc]
call fcn.004035e0
mov ecx, eax
call fcn.004043f0
push eax
call fcn.00404d80
add esp, 8
xor al, al
jmp 0x40179c
mov ecx, dword [ebp - 0x1634]
mov dword [ebp - 0x1630], ecx
mov edx, dword [ebp - 0x1630]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x1630]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x1630]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x1628], eax
cmp dword [ebp - 0x1628], 0xffffffff
jne 0x4013aa
mov edx, dword [ebp - 0x1634]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x6f
push 0
lea eax, [ebp - 0x124c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1664], eax
lea ecx, [ebp - 0x124c]
call fcn.00403600
mov ecx, eax
call fcn.00404460
mov dword [ebp - 0x1660], eax
mov ecx, dword [ebp - 0x1664]
push ecx
mov edx, dword [ebp - 0x1660]
push edx
call fcn.00404d80
add esp, 8
xor al, al
jmp 0x40179c
mov eax, dword [ebp - 0x1630]
mov ecx, dword [eax + 0x10]
push ecx
mov edx, dword [ebp - 0x1630]
mov eax, dword [edx + 0x18]
push eax
mov ecx, dword [ebp - 0x1628]
push ecx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1624], eax
cmp dword [ebp - 0x1624], 0xffffffff
jne 0x4013f1
mov edx, dword [ebp - 0x1628]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x1628], 0xffffffff
mov eax, dword [ebp - 0x1634]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0x1628], 0xffffffff
jne 0x401461
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x6f
push 0
lea ecx, [ebp - 0x11dc]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x165c], eax
lea ecx, [ebp - 0x11dc]
call fcn.00403620
mov ecx, eax
call fcn.004044d0
mov dword [ebp - 0x1658], eax
mov edx, dword [ebp - 0x165c]
push edx
mov eax, dword [ebp - 0x1658]
push eax
call fcn.00404d80
add esp, 8
xor al, al
jmp 0x40179c
push 0x8b
push 0
lea ecx, [ebp - 0x1490]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1490]
call fcn.00403640
mov ecx, eax
call fcn.00404540
mov dword [ebp - 0x1648], eax
push 0
mov edx, dword [ebp - 0x1648]
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
push eax
mov eax, dword [ebp - 0x1648]
push eax
mov ecx, dword [ebp - 0x1628]
push ecx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x1624], eax
cmp dword [ebp - 0x1624], 0xffffffff
jne 0x401513
mov edx, dword [ebp - 0x1628]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x6f
push 0
lea eax, [ebp - 0x116c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x1624]
push ecx
lea ecx, [ebp - 0x116c]
call fcn.004035a0
mov ecx, eax
call fcn.00404310
push eax
call fcn.00404d80
add esp, 8
xor al, al
jmp 0x40179c
push 0
mov edx, dword [ebp - 0x1654]
push edx
lea eax, [ebp - 0x1004]
push eax
mov ecx, dword [ebp - 0x1628]
push ecx
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x1624], eax
cmp dword [ebp - 0x1624], 0
jle 0x401541
jmp 0x40154a
cmp dword [ebp - 0x1624], 0
jg 0x401513
mov edx, dword [ebp - 0x1628]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
mov dword [ebp - 0x1010], eax
mov dword [ebp - 0x100c], eax
mov word [ebp - 0x1008], ax
mov byte [ebp - 0x1006], al
lea ecx, [ebp - 0x1010]
call fcn.00403350
mov ecx, eax
call fcn.00403c80
push eax
lea ecx, [ebp - 0x1004]
push ecx
call fcn.00404c60
add esp, 8
mov dword [ebp - 0x1644], eax
cmp dword [ebp - 0x1644], 0
jne 0x4015de
push 0x6a
push 0
lea edx, [ebp - 0x10fc]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x10fc]
call fcn.00403580
mov ecx, eax
call fcn.004042a0
push eax
call fcn.00404d80
add esp, 4
xor al, al
jmp 0x40179c
push 0x20
mov eax, dword [ebp - 0x1644]
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x162c], eax
cmp dword [ebp - 0x162c], 0
jne 0x401633
push 0x6a
push 0
lea ecx, [ebp - 0x1090]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1090]
call fcn.00403580
mov ecx, eax
call fcn.004042a0
push eax
call fcn.00404d80
add esp, 4
xor al, al
jmp 0x40179c
mov edx, dword [ebp - 0x162c]
add edx, 1
mov dword [ebp - 0x162c], edx
push 0x20
mov eax, dword [ebp - 0x162c]
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x162c], eax
cmp dword [ebp - 0x162c], 0
jne 0x401697
push 0x6a
push 0
lea ecx, [ebp - 0x1404]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1404]
call fcn.00403580
mov ecx, eax
call fcn.004042a0
push eax
call fcn.00404d80
add esp, 4
xor al, al
jmp 0x40179c
push 0x22
mov edx, dword [ebp - 0x162c]
push edx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1640], eax
cmp dword [ebp - 0x1640], 0
jne 0x4016ec
push 0x6a
push 0
lea eax, [ebp - 0x1398]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1398]
call fcn.00403580
mov ecx, eax
call fcn.004042a0
push eax
call fcn.00404d80
add esp, 4
xor al, al
jmp 0x40179c
mov ecx, dword [ebp - 0x1640]
sub ecx, dword [ebp - 0x162c]
mov dword [ebp - 0x163c], ecx
mov edx, dword [ebp - 0x163c]
add edx, 1
push edx
call fcn.00407a19
add esp, 4
mov dword [ebp - 0x1674], eax
mov eax, dword [ebp - 0x1674]
mov dword [ebp - 0x1638], eax
mov ecx, dword [ebp - 0x163c]
push ecx
mov edx, dword [ebp - 0x162c]
push edx
mov eax, dword [ebp - 0x1638]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov ecx, dword [ebp - 0x1638]
add ecx, dword [ebp - 0x163c]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1638]
push edx
call fcn.00401010
add esp, 4
mov dword [ebp - 0x164c], eax
mov eax, dword [ebp - 0x164c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
add esp, 8
test eax, eax
jne 0x40177f
mov al, 1
jmp 0x40179c
mov edx, dword [ebp - 0x1638]
mov dword [ebp - 0x1650], edx
mov eax, dword [ebp - 0x1650]
push eax
call fcn.00407a22
add esp, 4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407a27
mov esp, ebp
pop ebp
ret