Function at 0x4390f0
Capabilities:
Connect socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, edx
push ebx
sub esp, 0x1dc
mov dword [ebp - 0x1bc], eax
mov eax, dword [eax]
mov dword [ebp - 0x1c0], eax
mov eax, dword [edx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edx + 8]
mov dword [esp + 4], eax
mov eax, dword [edx + 4]
mov dword [esp], eax
call sub.WSOCK32.DLL_socket
mov dword [ebp - 0x1c4], eax
sub esp, 0xc
mov eax, 0xffffffff
cmp dword [ebp - 0x1c4], 0xffffffff
je 0x4391cd
mov edx, dword [ebp + 0xc]
mov eax, pe_nt_image_headers32
mov byte [edx], 0
mov dword [esp + 8], eax
lea eax, [ebp - 0x98]
mov dword [esp + 4], eax
mov dword [esp], esi
call fcn.00429100
lea edx, [ebp - 0x98]
mov eax, str.__Trying__s...
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c0]
mov dword [esp], eax
call fcn.0042c910
mov edx, dword [ebp - 0x1c0]
cmp byte [edx + 0x1ae], 0
jne 0x439320
mov edx, dword [ebp - 0x1bc]
mov edi, dword [edx]
mov eax, dword [edi + 0x74]
test eax, eax
je 0x439280
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp eax, 0xfe
jbe 0x4391d5
mov edx, dword [ebp - 0x1c4]
mov dword [esp], edx
call sub.WSOCK32.DLL_closesocket
sub esp, 4
mov eax, 0xffffffff
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [0x50bea0]
xor ecx, ecx
mov edx, 0xff
mov dword [ebp - 0x1b0], ecx
xor ebx, ebx
mov byte [ebp - 0x198], al
lea eax, [ebp - 0x197]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memset
mov eax, dword [edi + 0x74]
mov dword [esp], eax
call sub.WS2_32.DLL_inet_addr
sub esp, 4
inc eax
je 0x4394cb
xor eax, eax
lea ebx, [ebp - 0x1b0]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov eax, dword [edi + 0x74]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.004292e0
dec eax
je 0x439567
mov eax, dword [ebp - 0x1b0]
test eax, eax
jne 0x43949f
cmp byte [ebp - 0x198], 0
jne 0x439390
mov eax, dword [edi + 0x74]
mov dword [esp + 8], eax
mov eax, str.Couldnt_bind_to__s
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.0042c530
jmp 0x4391b7
mov edx, 1
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x1c4]
mov dword [esp], eax
call fcn.00438f70
mov eax, dword [esi + 0x10]
mov dword [esp + 8], eax
mov eax, dword [esi + 0x14]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c4]
mov dword [esp], edx
call sub.WSOCK32.DLL_connect
sub esp, 0xc
cmp eax, 0xffffffff
mov ebx, eax
je 0x439533
cmp ebx, 1
je 0x439450
mov eax, dword [ebp - 0x1c4]
lea edx, [ebp - 0x1b8]
call fcn.00438ff0
test ebx, ebx
sete dl
test al, al
setne al
movzx eax, al
test edx, eax
je 0x4395cc
mov eax, dword [ebp + 0xc]
mov byte [eax], 1
mov eax, str.connected_n
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c0]
mov dword [esp], edx
call fcn.0042c910
mov eax, dword [ebp - 0x1c4]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [ebp - 0x1bc]
mov ebx, dword [eax]
movzx eax, byte [ebx + 0x1ae]
mov dword [ebp - 0x1ac], eax
mov eax, 4
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x1ac]
mov dword [esp + 0xc], eax
mov eax, 1
mov dword [esp + 8], eax
mov eax, 6
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c4]
mov dword [esp], edx
call sub.WS2_32.DLL_setsockopt
sub esp, 0x14
test eax, eax
js 0x43946e
mov dword [esp], ebx
mov edi, str.TCP_NODELAY_set_n
mov dword [esp + 4], edi
call fcn.0042c910
jmp 0x439195
mov dword [esp], edi
mov eax, str.We_bind_local_end_to__s_n
lea ebx, [ebp - 0x198]
mov dword [esp + 8], ebx
mov dword [esp + 4], eax
call fcn.0042c910
mov dword [esp], ebx
call sub.WS2_32.DLL_inet_addr
sub esp, 4
inc eax
je 0x4394b9
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x4394b9
mov ebx, dword [eax]
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.00429530
mov eax, dword [ebx + 0x10]
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c4]
mov dword [esp], eax
call sub.WSOCK32.DLL_bind
sub esp, 0xc
test eax, eax
js 0x43961c
mov eax, 0x10
mov dword [ebp - 0x1b4], eax
lea eax, [ebp - 0x1b4]
mov dword [esp + 8], eax
lea eax, [ebp - 0x1a8]
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c4]
mov dword [esp], edx
call sub.WS2_32.DLL_getsockname
sub esp, 0xc
test eax, eax
jns 0x439280
mov dword [esp], edi
mov esi, str.getsockname___failed
mov dword [esp + 4], esi
call fcn.0042c530
jmp 0x4391b7
mov edx, dword [ebp - 0x1c0]
mov eax, dword [ebp - 0x1c4]
cmp dword [edx + 0x2c8], 2
jne 0x4392ca
jmp 0x4391cd
call fcn.00438f60
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0043fea0
mov dword [esp + 8], eax
mov eax, str.Could_not_set_TCP_NODELAY:__s_n
mov dword [esp + 4], eax
mov dword [esp], ebx
call fcn.0042c910
jmp 0x439195
mov eax, dword [edi + 0x74]
mov dword [esp + 4], eax
lea eax, [ebp - 0x198]
mov dword [esp], eax
call sub.msvcrt.dll_strcpy
jmp 0x439256
mov dword [esp + 8], ebx
mov ecx, str.couldt_find_my_own_IP_address___s_
mov dword [esp + 4], ecx
jmp 0x439273
mov ecx, 0x100
lea eax, [ebp - 0x198]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov eax, dword [edi + 0x74]
mov dword [esp], eax
call fcn.00440420
test eax, eax
je 0x43921c
xor edx, edx
lea ebx, [ebp - 0x1b0]
mov dword [esp + 8], edx
lea edx, [ebp - 0x198]
mov dword [esp + 0xc], ebx
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.004292e0
dec eax
je 0x439664
mov eax, dword [ebp - 0x1b0]
test eax, eax
jne 0x439256
jmp 0x43921c
call fcn.00438f60
mov dword [ebp - 0x1b8], eax
cmp eax, 0xb
mov edx, eax
je 0x439552
jl 0x43957e
lea eax, [eax - 0x2733]
cmp eax, 1
ja 0x43957e
mov edx, dword [ebp + 8]
mov eax, dword [ebp - 0x1c4]
call fcn.00438fa0
mov ebx, eax
jmp 0x4392c1
mov dword [esp + 4], ebx
mov edx, dword [ebp - 0x1bc]
mov dword [esp], edx
call fcn.00439cd0
jmp 0x439248
mov dword [esp + 4], edx
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0043fea0
mov dword [esp + 0xc], eax
lea edx, [ebp - 0x98]
mov eax, str.Failed_to_connect_to__s:__s
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c0]
mov dword [esp], eax
call fcn.0042c530
mov eax, dword [ebp - 0x1b8]
mov edx, dword [ebp - 0x1c0]
mov dword [edx + 0x8308], eax
jmp 0x4392ca
dec ebx
je 0x43964b
mov eax, dword [ebp - 0x1b8]
mov edx, dword [ebp - 0x1c0]
mov dword [edx + 0x8308], eax
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0043fea0
mov dword [esp + 8], eax
mov eax, 0x50c060
mov dword [esp + 4], eax
mov edx, dword [ebp - 0x1c0]
mov dword [esp], edx
call fcn.0042c910
mov eax, dword [ebp - 0x1c4]
mov dword [esp], eax
jmp 0x4391c0
call fcn.00438f60
mov dword [edi + 0x8308], eax
mov ebx, str.bind_failure:__s
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1bc]
mov dword [esp], eax
call fcn.0043fea0
mov dword [esp + 8], eax
mov dword [esp + 4], ebx
jmp 0x439273
mov eax, str.Timeout_n
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c0]
mov dword [esp], eax
call fcn.0042c910
jmp 0x43960e
mov dword [esp + 4], ebx
mov edx, dword [ebp - 0x1bc]
mov dword [esp], edx
call fcn.00439cd0
jmp 0x439520