Function at 0x47b480
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
lea esp, [esp - 0x5c]
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x20], 0
xor eax, eax
push fcn.0047b460
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x10], 0
lea ecx, [ebp - 0x14]
mov dl, byte [ebp + 0x20]
mov eax, dword [ebp - 4]
call fcn.0047aff0
mov dword [ebp - 0x18], eax
test eax, eax
jne 0x47b4d0
cmp dword [ebp - 0x14], 0
jne 0x47b52c
call fcn.0047af30
mov edx, dword [ebp + 8]
mov dword [edx], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
lea edx, [ebp - 0x38]
mov eax, dword [str.Unknown_host__s._r_nSocket_Error_Code:__d___X_]
mov ecx, 2
call fcn.0042a260
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
call fcn.00407f40
jmp 0x47b829
xor eax, eax
push fcn.0047b430
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
jne 0x47b822
nop
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0xffffffff
jne 0x47b610
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
je 0x47b574
mov eax, dword [ebp + 0xc]
mov edx, dword [str.Socket_was_aborted]
call fcn.00407f40
jmp 0x47b822
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
movsx eax, word [eax]
mov ecx, 6
mov edx, 1
call fcn.0047b140
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp + 0x14]
cmp dword [eax], 0xffffffff
jne 0x47b604
call fcn.0047af30
mov edx, dword [ebp + 8]
mov dword [edx], eax
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea edx, [ebp - 0x3c]
call fcn.004335b0
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x38], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x28], 0
lea edx, [ebp - 0x38]
mov eax, dword [str.Cannot_create_TCP_IP_socket:_r_n_s._r_nSocket_Error_Code:__d___X_]
mov ecx, 2
call fcn.0042a260
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0xc]
call fcn.00407f40
jmp 0x47b822
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dl, 1
call fcn.0047b0f0
xor eax, eax
push fcn.0047b400
push ebp
push 0x4135b0
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
jne 0x47b7ba
nop
movzx eax, word [ebp - 8]
push eax
call sub.wsock32.dll_htons
mov edx, dword [ebp - 0x14]
mov edx, dword [edx + 0x18]
mov word [edx + 2], ax
cmp byte [ebp + 0x1c], 0
jne 0x47b705
mov dword [ebp - 0x1c], 1
push 4
lea eax, [ebp - 0x1c]
push eax
push 4
push 0xffff
mov eax, dword [ebp + 0x14]
push dword [eax]
call sub.wsock32.dll_setsockopt
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
call sub.wsock32.dll_bind
test eax, eax
jge 0x47b7a4
call fcn.0047af30
mov edx, dword [ebp + 8]
mov dword [edx], eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea edx, [ebp - 0x20]
call fcn.004335b0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], 0
lea edx, [ebp - 0x5c]
mov eax, dword [str.Cannot_bind_to_address__s:_r_n_s._r_nSocket_Error_Code:__d___X_]
mov ecx, 3
call fcn.0042a260
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 0xc]
call fcn.00407f40
jmp 0x47b7ba
mov eax, dword [ebp - 0x14]
push dword [eax + 0x10]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
push eax
mov eax, dword [ebp + 0x14]
push dword [eax]
call sub.wsock32.dll_connect
test eax, eax
jge 0x47b7a4
call sub.wsock32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x47b7a4
call fcn.0047af30
mov edx, dword [ebp + 8]
mov dword [edx], eax
lea eax, [ebp - 0x3c]
push eax
mov eax, dword [ebp - 4]
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x5c], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
lea edx, [ebp - 0x20]
call fcn.004335b0
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x54], 0xb
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x44], 0
lea edx, [ebp - 0x5c]
mov eax, dword [str.Cannot_connect_to_server_on_host__s:_r_n_s._r_nSocket_Error_Code:__d___X_]
mov ecx, 3
call fcn.0042a260
mov edx, dword [ebp - 0x3c]
mov eax, dword [ebp + 0xc]
call fcn.00407f40
jmp 0x47b7ba
mov byte [ebp - 0x10], 1
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0047b400
jmp 0x47b7c1
call fcn.00403710
jmp 0x47b822
mov eax, dword [ebp + 0x18]
cmp byte [eax], 0
jne 0x47b822
lea esi, [esi]
mov eax, dword [ebp + 0x10]
cmp dword [eax], 0
je 0x47b7ec
push ebp
mov ecx, 0x1d1
mov edx, str._fScVioTcp.pas
mov eax, 0x539330
call fcn.0040e7c0
lea esi, [esi]
mov eax, dword [ebp - 0x14]
mov edx, dword [eax + 0x10]
mov eax, dword [ebp + 0x10]
call fcn.0040ea10
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x18]
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 0x10]
mov edx, dword [ebp + 0x10]
mov edx, dword [edx]
call fcn.00402d40
xor eax, eax
pop edx
add esp, 0xc
mov dword fs:[eax], edx
mov eax, ebp
call fcn.0047b430
jmp 0x47b829
call fcn.00403710
jmp 0x47b829
xor edx, edx
pop eax
add esp, 0xc
mov dword fs:[edx], eax
mov eax, ebp
call fcn.0047b460
mov al, byte [ebp - 0x10]
mov esp, ebp
pop ebp
ret 0x1c