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, 0x1274
call fcn.00407960
mov eax, dword [0x416d64]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x1224], 0
mov dword [ebp - 0x121c], 0
mov dword [ebp - 0x1248], 0x1000
lea eax, [ebp - 0x1210]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x1214], eax
cmp dword [ebp - 0x1214], 0
je 0x4011ad
xor al, al
jmp 0x401556
push 0x20
push 0
lea ecx, [ebp - 0x1274]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x1270], 0
mov dword [ebp - 0x126c], 1
mov dword [ebp - 0x1268], 6
xor edx, edx
mov dword [ebp - 0x123c], 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 word [ebp - 0x1014], ax
lea ecx, [ebp - 0x123c]
call fcn.004030f0
mov ecx, eax
call fcn.004036f0
mov dword [ebp - 0x1240], eax
lea ecx, [ebp - 0x1024]
call fcn.004032b0
mov ecx, eax
call fcn.00403ca0
mov dword [ebp - 0x1244], eax
lea ecx, [ebp - 0x1224]
push ecx
lea edx, [ebp - 0x1274]
push edx
mov eax, dword [ebp - 0x1240]
push eax
mov ecx, dword [ebp - 0x1244]
push ecx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 0x1214], eax
cmp dword [ebp - 0x1214], 0
je 0x401275
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x401556
mov edx, dword [ebp - 0x1224]
mov dword [ebp - 0x121c], edx
mov eax, dword [ebp - 0x121c]
mov ecx, dword [eax + 0xc]
push ecx
mov edx, dword [ebp - 0x121c]
mov eax, dword [edx + 8]
push eax
mov ecx, dword [ebp - 0x121c]
mov edx, dword [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x1218], eax
cmp dword [ebp - 0x1218], 0xffffffff
jne 0x4012ce
mov eax, dword [ebp - 0x1224]
push eax
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x401556
mov ecx, dword [ebp - 0x121c]
mov edx, dword [ecx + 0x10]
push edx
mov eax, dword [ebp - 0x121c]
mov ecx, dword [eax + 0x18]
push ecx
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 0x1214], eax
cmp dword [ebp - 0x1214], 0xffffffff
jne 0x401315
mov eax, dword [ebp - 0x1218]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebp - 0x1218], 0xffffffff
mov ecx, dword [ebp - 0x1224]
push ecx
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 0x1218], 0xffffffff
jne 0x401338
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x401556
push 0x59
push 0
lea edx, [ebp - 0x1080]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea ecx, [ebp - 0x1080]
call fcn.00403490
mov ecx, eax
call fcn.004041e0
mov dword [ebp - 0x1230], eax
push 0
mov eax, dword [ebp - 0x1230]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
push eax
mov ecx, dword [ebp - 0x1230]
push ecx
mov edx, dword [ebp - 0x1218]
push edx
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 0x1214], eax
cmp dword [ebp - 0x1214], 0xffffffff
jne 0x4013b2
mov eax, dword [ebp - 0x1218]
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor al, al
jmp 0x401556
push 0
mov ecx, dword [ebp - 0x1248]
push ecx
lea edx, [ebp - 0x1004]
push edx
mov eax, dword [ebp - 0x1218]
push eax
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 0x1214], eax
cmp dword [ebp - 0x1214], 0
jle 0x4013e0
jmp 0x4013e9
cmp dword [ebp - 0x1214], 0
jg 0x4013b2
mov ecx, dword [ebp - 0x1218]
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.00403210
mov ecx, eax
call fcn.00403ae0
push eax
lea eax, [ebp - 0x1004]
push eax
call fcn.00404970
add esp, 8
mov dword [ebp - 0x1234], eax
cmp dword [ebp - 0x1234], 0
jne 0x401449
xor al, al
jmp 0x401556
push 0x54
mov ecx, dword [ebp - 0x1234]
push ecx
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1220], eax
cmp dword [ebp - 0x1220], 0
jne 0x401470
xor al, al
jmp 0x401556
mov edx, dword [ebp - 0x1220]
add edx, 1
mov dword [ebp - 0x1220], edx
push 0x2b
mov eax, dword [ebp - 0x1220]
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 8
mov dword [ebp - 0x1238], eax
cmp dword [ebp - 0x1238], 0
jne 0x4014a6
xor al, al
jmp 0x401556
mov ecx, dword [ebp - 0x1238]
sub ecx, dword [ebp - 0x1220]
mov dword [ebp - 0x122c], ecx
mov edx, dword [ebp - 0x122c]
add edx, 1
push edx
call fcn.00407723
add esp, 4
mov dword [ebp - 0x124c], eax
mov eax, dword [ebp - 0x124c]
mov dword [ebp - 0x1228], eax
mov ecx, dword [ebp - 0x122c]
push ecx
mov edx, dword [ebp - 0x1220]
push edx
mov eax, dword [ebp - 0x1228]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
add esp, 0xc
mov ecx, dword [ebp - 0x1228]
add ecx, dword [ebp - 0x122c]
mov byte [ecx], 0
mov edx, dword [ebp - 0x1228]
push edx
call section..text
add esp, 4
mov dword [ebp - 0x1250], eax
mov eax, dword [ebp - 0x1250]
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 0x401539
mov al, 1
jmp 0x401556
mov edx, dword [ebp - 0x1228]
mov dword [ebp - 0x1254], edx
mov eax, dword [ebp - 0x1254]
push eax
call fcn.0040772c
add esp, 4
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407731
mov esp, ebp
pop ebp
ret