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, 0x1498
call fcn.00407bd0
mov eax, dword [0x417f34]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1438], 0
mov dword [ebp - 0x1430], 0
mov dword [ebp - 0x1478], 0x1000
lea eax, [ebp - 0x1424]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x1428], eax
cmp dword [ebp - 0x1428], 0
je 0x4011e2
push 0x44
push 0
lea ecx, [ebp - 0x1238]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x1428]
push edx
lea ecx, [ebp - 0x1238]
call fcn.004034e0
mov ecx, eax
call fcn.004041a0
push eax
call fcn.00404cf0
add esp, 8
xor al, al
jmp 0x401719
push 0x20
push 0
lea eax, [ebp - 0x1498]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1494], 0
mov dword [ebp - 0x1490], 1
mov dword [ebp - 0x148c], 6
xor ecx, ecx
mov dword [ebp - 0x1474], ecx
xor edx, edx
mov dword [ebp - 0x1024], edx
mov dword [ebp - 0x1020], edx
mov dword [ebp - 0x101c], edx
mov dword [ebp - 0x1018], edx
mov word [ebp - 0x1014], dx
lea ecx, [ebp - 0x1474]
call fcn.004031b0
mov ecx, eax
call fcn.00403800
mov dword [ebp - 0x1470], eax
lea ecx, [ebp - 0x1024]
call fcn.00403370
mov ecx, eax
call fcn.00403db0
mov dword [ebp - 0x146c], eax
lea eax, [ebp - 0x1438]
push eax
lea ecx, [ebp - 0x1498]
push ecx
mov edx, dword [ebp - 0x1470]
push edx
mov eax, dword [ebp - 0x146c]
push eax
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x1428], eax
cmp dword [ebp - 0x1428], 0
je 0x4012df
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x44
push 0
lea ecx, [ebp - 0x11f4]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov edx, dword [ebp - 0x1428]
push edx
lea ecx, [ebp - 0x11f4]
call fcn.00403500
mov ecx, eax
call fcn.00404210
push eax
call fcn.00404cf0
add esp, 8
xor al, al
jmp 0x401719
mov eax, dword [ebp - 0x1438]
mov dword [ebp - 0x1430], eax
mov ecx, dword [ebp - 0x1430]
mov edx, dword [ecx + 0xc]
push edx
mov eax, dword [ebp - 0x1430]
mov ecx, dword [eax + 8]
push ecx
mov edx, dword [ebp - 0x1430]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x142c], eax
cmp dword [ebp - 0x142c], 0xffffffff
jne 0x401385
mov ecx, dword [ebp - 0x1438]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x44
push 0
lea edx, [ebp - 0x11b0]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1468], eax
lea ecx, [ebp - 0x11b0]
call fcn.00403520
mov ecx, eax
call fcn.00404280
mov dword [ebp - 0x1464], eax
mov eax, dword [ebp - 0x1468]
push eax
mov ecx, dword [ebp - 0x1464]
push ecx
call fcn.00404cf0
add esp, 8
xor al, al
jmp 0x401719
mov edx, dword [ebp - 0x1430]
mov eax, dword [edx + 0x10]
push eax
mov ecx, dword [ebp - 0x1430]
mov edx, dword [ecx + 0x18]
push edx
mov eax, dword [ebp - 0x142c]
push eax
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1428], eax
cmp dword [ebp - 0x1428], 0xffffffff
jne 0x4013cc
mov ecx, dword [ebp - 0x142c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x142c], 0xffffffff
mov edx, dword [ebp - 0x1438]
push edx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0x142c], 0xffffffff
jne 0x40143c
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x44
push 0
lea eax, [ebp - 0x116c]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x1460], eax
lea ecx, [ebp - 0x116c]
call fcn.00403540
mov ecx, eax
call fcn.004042f0
mov dword [ebp - 0x145c], eax
mov ecx, dword [ebp - 0x1460]
push ecx
mov edx, dword [ebp - 0x145c]
push edx
call fcn.00404cf0
add esp, 8
xor al, al
jmp 0x401719
push 0x59
push 0
lea eax, [ebp - 0x1294]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1294]
call fcn.00403580
mov ecx, eax
call fcn.004043d0
mov dword [ebp - 0x144c], eax
push 0
mov ecx, dword [ebp - 0x144c]
push ecx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
push eax
mov edx, dword [ebp - 0x144c]
push edx
mov eax, dword [ebp - 0x142c]
push eax
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x1428], eax
cmp dword [ebp - 0x1428], 0xffffffff
jne 0x4014eb
mov ecx, dword [ebp - 0x142c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0x44
push 0
lea edx, [ebp - 0x1128]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [ebp - 0x1428]
push eax
lea ecx, [ebp - 0x1128]
call fcn.004034c0
mov ecx, eax
call fcn.00404130
push eax
call fcn.00404cf0
add esp, 8
xor al, al
jmp 0x401719
push 0
mov ecx, dword [ebp - 0x1478]
push ecx
lea edx, [ebp - 0x1004]
push edx
mov eax, dword [ebp - 0x142c]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x1428], eax
cmp dword [ebp - 0x1428], 0
jle 0x401519
jmp 0x401522
cmp dword [ebp - 0x1428], 0
jg 0x4014eb
mov ecx, dword [ebp - 0x142c]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor edx, edx
mov dword [ebp - 0x1010], edx
mov dword [ebp - 0x100c], edx
mov word [ebp - 0x1008], dx
lea ecx, [ebp - 0x1010]
call fcn.004032d0
mov ecx, eax
call fcn.00403bf0
push eax
lea eax, [ebp - 0x1004]
push eax
call fcn.00404bd0
add esp, 8
mov dword [ebp - 0x1448], eax
cmp dword [ebp - 0x1448], 0
jne 0x4015b0
push 0x3f
push 0
lea ecx, [ebp - 0x10a4]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x10a4]
call fcn.00403480
mov ecx, eax
call fcn.00404050
push eax
call fcn.00404cf0
add esp, 4
xor al, al
jmp 0x401719
push 0x54
mov edx, dword [ebp - 0x1448]
push edx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1434], eax
cmp dword [ebp - 0x1434], 0
jne 0x401605
push 0x3f
push 0
lea eax, [ebp - 0x1064]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1064]
call fcn.00403480
mov ecx, eax
call fcn.00404050
push eax
call fcn.00404cf0
add esp, 4
xor al, al
jmp 0x401719
mov ecx, dword [ebp - 0x1434]
add ecx, 1
mov dword [ebp - 0x1434], ecx
push 0x2b
mov edx, dword [ebp - 0x1434]
push edx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1444], eax
cmp dword [ebp - 0x1444], 0
jne 0x401669
push 0x3f
push 0
lea eax, [ebp - 0x10e4]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x10e4]
call fcn.00403480
mov ecx, eax
call fcn.00404050
push eax
call fcn.00404cf0
add esp, 4
xor al, al
jmp 0x401719
mov ecx, dword [ebp - 0x1444]
sub ecx, dword [ebp - 0x1434]
mov dword [ebp - 0x1440], ecx
mov edx, dword [ebp - 0x1440]
add edx, 1
push edx
call fcn.00407989
add esp, 4
mov dword [ebp - 0x1450], eax
mov eax, dword [ebp - 0x1450]
mov dword [ebp - 0x143c], eax
mov ecx, dword [ebp - 0x1440]
push ecx
mov edx, dword [ebp - 0x1434]
push edx
mov eax, dword [ebp - 0x143c]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov ecx, dword [ebp - 0x143c]
add ecx, dword [ebp - 0x1440]
mov byte [ecx], 0
mov edx, dword [ebp - 0x143c]
push edx
call section..text
add esp, 4
mov dword [ebp - 0x1454], eax
mov eax, dword [ebp - 0x1454]
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 0x4016fc
mov al, 1
jmp 0x401719
mov edx, dword [ebp - 0x143c]
mov dword [ebp - 0x1458], edx
mov eax, dword [ebp - 0x1458]
push eax
call fcn.00407992
add esp, 4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407997
mov esp, ebp
pop ebp
ret