Function at 0x41bc70
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns
Set socket configuration
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
sub esp, 0x1b8
mov eax, dword [0x436008]
xor eax, esp
mov dword [esp + 0x1b4], eax
cmp dword [0x448810], 0
push esi
push edi
mov dword [esp + 0xc], edx
mov esi, ecx
mov dword [esp + 8], 1
jne 0x41bce2
lea eax, [esp + 0x28]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x41bcd8
push str.WSAStartup_failed__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401090
add esp, 8
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [0x448810], 1
test esi, esi
jne 0x41bd09
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov dword [eax], 0x16
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
jne 0x41bd55
cmp dword [0x44880c], 2
jl 0x41bd3e
push esi
push 0x4450e0
push str._s:_unknown_host__s_n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401090
add esp, 0x10
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0xc]
cmp dword [eax], 0
jne 0x41bd9b
cmp dword [0x44880c], 2
jl 0x41bd84
push str.socket_connect
push str._s:_gethostbyname_returned_NULL_address__n
push 2
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
add esp, 4
push eax
call fcn.00401090
add esp, 0xc
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
test esi, esi
jns 0x41bdd2
push str.socket__
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push 4
lea eax, [esp + 0xc]
push eax
push 4
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
jne 0x41be18
push str.setsockopt__
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or eax, 0xffffffff
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
push dword [esp + 0xc]
xorps xmm0, xmm0
mov eax, 2
movaps xmmword [esp + 0x14], xmm0
mov word [esp + 0x14], ax
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [esp + 0x18], eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x12], ax
lea eax, [esp + 0x10]
push 0x10
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jns 0x41be84
push str.connect
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_perror]
add esp, 4
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xfffffffe
pop edi
pop esi
mov ecx, dword [esp + 0x1b4]
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x1bc]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.0042eb3e
mov esp, ebp
pop ebp
ret