Function at 0x401000
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, 0x13a4
call fcn.00401420
and dword [ebp - 0x24], 0
push dword [ebp + 8]
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
pop ecx
inc eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], 0x64
and dword [ebp - 0x1c], 0
push 0xffffffffffffffff
push dword [ebp + 8]
push dword [ebp - 0x18]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll_mbstowcs_s]
add esp, 0x14
or dword [ebp - 8], 0xffffffff
and dword [ebp - 0x14], 0
and dword [ebp - 0xc], 0
mov al, byte [0x403150]
mov byte [ebp - 0x14c], al
push 0x103
push 0
lea eax, [ebp - 0x14b]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push str.GET__
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push dword [ebp + 0x10]
lea eax, [ebp - 0x14c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0x1000
push 0
lea eax, [ebp - 0x13a4]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x20], 0x1000
lea eax, [ebp - 0x3a4]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x4010d3
xor eax, eax
jmp 0x401325
push 0x20
push 0
lea eax, [ebp - 0x48]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x44], 2
mov dword [ebp - 0x40], 1
mov dword [ebp - 0x3c], 6
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
je 0x401122
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x401325
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
jmp 0x401133
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x4011ae
mov eax, dword [ebp - 0xc]
push dword [eax + 0xc]
mov eax, dword [ebp - 0xc]
push dword [eax + 8]
mov eax, dword [ebp - 0xc]
push dword [eax + 4]
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xffffffff
jne 0x401167
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x401325
push dword [ebp + 0xc]
push dword [ebp + 8]
push str.___Connect_to__s:_s
call fcn.004013e4
add esp, 0xc
mov eax, dword [ebp - 0xc]
push dword [eax + 0x10]
mov eax, dword [ebp - 0xc]
push dword [eax + 0x18]
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_connect]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x4011a7
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
or dword [ebp - 8], 0xffffffff
jmp 0x40112a
jmp 0x4011ae
push dword [ebp - 0x14]
call dword [sym.imp.WS2_32.dll_freeaddrinfo]
cmp dword [ebp - 8], 0xffffffff
jne 0x4011ca
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x401325
push 0
lea eax, [ebp - 0x14c]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
pop ecx
push eax
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_send]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40121c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.send_failed_with_error:__d_n
call fcn.004013e4
pop ecx
pop ecx
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x401325
push dword [ebp - 4]
push str._n___Sent__ld_Bytes_n
call fcn.004013e4
pop ecx
pop ecx
push 1
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_shutdown]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x401268
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.shutdown_failed_with_error:__d_n
call fcn.004013e4
pop ecx
pop ecx
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x401325
push 0x61a80
push 0
push dword [ebp + 0x14]
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
and dword [ebp - 0x10], 0
push 0
push dword [ebp - 0x20]
lea eax, [ebp - 0x13a4]
push eax
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_recv]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jle 0x4012e3
push dword [ebp - 4]
push str.___Received__d_Bytes_n
call fcn.004013e4
pop ecx
pop ecx
push dword [ebp - 4]
lea eax, [ebp - 0x13a4]
push eax
push dword [ebp + 0x14]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [ebp + 0x14]
add eax, dword [ebp - 4]
mov dword [ebp + 0x14], eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 4]
mov dword [ebp - 0x10], eax
push dword [ebp - 0x10]
push str.___Received_total__d_Bytes_n
call fcn.004013e4
pop ecx
pop ecx
jmp 0x401309
cmp dword [ebp - 4], 0
jne 0x4012f6
push str.___Connection_closed_n
call fcn.004013e4
pop ecx
jmp 0x401309
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.recv_failed_with_error:__d_n
call fcn.004013e4
pop ecx
pop ecx
cmp dword [ebp - 4], 0
jg 0x40127e
push dword [ebp - 8]
call dword [sym.imp.WS2_32.dll_closesocket]
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov eax, dword [ebp - 0x10]
leave
ret