Function at 0x401150
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.00409010
mov eax, dword [0x412700]
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 0x4011f8
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.00404ea0
mov ecx, eax
call fcn.00405c80
push eax
call fcn.004066f0
add esp, 8
xor al, al
jmp 0x401792
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
lea ecx, [ebp - 0x1670]
call fcn.00404b10
mov ecx, eax
call fcn.00405190
mov dword [ebp - 0x166c], eax
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 - 0x1024]
call fcn.00404d30
mov ecx, eax
call fcn.00405820
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 0x4012f5
call dword [sym.imp.WS2_32.dll_WSACleanup]
nop
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.00404ec0
mov ecx, eax
call fcn.00405cf0
push eax
call fcn.004066f0
add esp, 8
xor al, al
jmp 0x401792
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 0x40139c
mov edx, dword [ebp - 0x1634]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
nop
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1664], eax
push 0x6f
push 0
lea eax, [ebp - 0x124c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x124c]
call fcn.00404ee0
mov ecx, eax
call fcn.00405d60
mov dword [ebp - 0x1660], eax
mov ecx, dword [ebp - 0x1664]
push ecx
mov edx, dword [ebp - 0x1660]
push edx
call fcn.004066f0
add esp, 8
xor al, al
jmp 0x401792
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 0x4013e3
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]
nop
cmp dword [ebp - 0x1628], 0xffffffff
jne 0x401455
call dword [sym.imp.WS2_32.dll_WSACleanup]
nop
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x165c], eax
push 0x6f
push 0
lea ecx, [ebp - 0x11dc]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x11dc]
call fcn.00404f00
mov ecx, eax
call fcn.00405dd0
mov dword [ebp - 0x1658], eax
mov edx, dword [ebp - 0x165c]
push edx
mov eax, dword [ebp - 0x1658]
push eax
call fcn.004066f0
add esp, 8
xor al, al
jmp 0x401792
push 0x8b
push 0
lea ecx, [ebp - 0x1490]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1490]
call fcn.00404f20
mov ecx, eax
call fcn.00405e40
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 0x401508
mov edx, dword [ebp - 0x1628]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
nop
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.00404e80
mov ecx, eax
call fcn.00405c10
push eax
call fcn.004066f0
add esp, 8
xor al, al
jmp 0x401792
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 0x401536
jmp 0x40153f
cmp dword [ebp - 0x1624], 0
jg 0x401508
mov edx, dword [ebp - 0x1628]
push edx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
nop
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.00404c30
mov ecx, eax
call fcn.00405580
push eax
lea ecx, [ebp - 0x1004]
push ecx
call fcn.004065d0
add esp, 8
mov dword [ebp - 0x1644], eax
cmp dword [ebp - 0x1644], 0
jne 0x4015d4
push 0x6a
push 0
lea edx, [ebp - 0x10fc]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x10fc]
call fcn.00404e60
mov ecx, eax
call fcn.00405ba0
push eax
call fcn.004066f0
add esp, 4
xor al, al
jmp 0x401792
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 0x401629
push 0x6a
push 0
lea ecx, [ebp - 0x1090]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1090]
call fcn.00404e60
mov ecx, eax
call fcn.00405ba0
push eax
call fcn.004066f0
add esp, 4
xor al, al
jmp 0x401792
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 0x40168d
push 0x6a
push 0
lea ecx, [ebp - 0x1404]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1404]
call fcn.00404e60
mov ecx, eax
call fcn.00405ba0
push eax
call fcn.004066f0
add esp, 4
xor al, al
jmp 0x401792
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 0x4016e2
push 0x6a
push 0
lea eax, [ebp - 0x1398]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1398]
call fcn.00404e60
mov ecx, eax
call fcn.00405ba0
push eax
call fcn.004066f0
add esp, 4
xor al, al
jmp 0x401792
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.00408dc9
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 section..text
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 0x401775
mov al, 1
jmp 0x401792
mov edx, dword [ebp - 0x1638]
mov dword [ebp - 0x1650], edx
mov eax, dword [ebp - 0x1650]
push eax
call fcn.00408dd2
add esp, 4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00408dd7
mov esp, ebp
pop ebp
ret