Function at 0x418412
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push 0x24
call fcn.004017c7
add esp, 4
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [eax], 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp + 0x18]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x14], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0x10], 0
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], 1
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x1c], 0
mov ecx, dword [ebp - 0x20]
mov dword [ecx + 0xc], 0
push 0
push 1
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call sub.WSOCK32.dll_socket
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x18]
mov dword [ecx + 4], edx
cmp dword [ebp - 0x18], 0xffffffff
jne 0x4184ac
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.00417d88
add esp, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
jmp 0x418619
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 0x14]
mov dword [edx + 0x20], eax
cmp dword [ebp + 0x14], 0
je 0x4184db
mov dword [ebp - 0x28], 1
push 4
lea ecx, [ebp - 0x28]
push ecx
push 0x100
push 0xffff
mov edx, dword [ebp - 0x18]
push edx
call sub.WSOCK32.dll_setsockopt
cmp dword [ebp + 0x10], 0
je 0x4184e9
mov word [ebp - 0x1c], 0x3ff
jmp 0x4184ef
mov word [ebp - 0x1c], 0
mov eax, 1
test eax, eax
je 0x41856c
mov word [ebp - 0x10], 2
push 0
call sub.WSOCK32.dll_htonl
mov dword [ebp - 0xc], eax
mov cx, word [ebp - 0x1c]
push ecx
call sub.WSOCK32.dll_htons
mov word [ebp - 0xe], ax
push 0x10
lea edx, [ebp - 0x10]
push edx
mov eax, dword [ebp - 0x18]
push eax
call sub.WSOCK32.dll_bind
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
je 0x418537
mov dword [ebp - 0x14], 0
jmp 0x41856c
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0x2740
je 0x41854a
jmp 0x41856c
movsx ecx, word [ebp - 0x1c]
test ecx, ecx
jne 0x418554
jmp 0x41856c
mov dx, word [ebp - 0x1c]
sub dx, 1
mov word [ebp - 0x1c], dx
movsx eax, word [ebp - 0x1c]
test eax, eax
jne 0x41856a
jmp 0x41856c
jmp 0x4184ef
cmp dword [ebp - 0x14], 0
je 0x41858b
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00417d88
add esp, 4
mov edx, dword [ebp - 0x20]
mov dword [edx], eax
mov eax, dword [ebp - 0x20]
jmp 0x418619
mov word [ebp - 0x10], 2
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
push ecx
call sub.WSOCK32.dll_htonl
mov dword [ebp - 0xc], eax
mov dx, word [ebp + 0xc]
push edx
call sub.WSOCK32.dll_htons
mov word [ebp - 0xe], ax
push 0x10
lea eax, [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call sub.WSOCK32.dll_connect
cmp eax, 0xffffffff
jne 0x4185e0
call sub.WSOCK32.dll_WSAGetLastError
mov dword [ebp - 0x14], eax
mov edx, dword [ebp - 0x14]
push edx
call fcn.00417d88
add esp, 4
mov ecx, dword [ebp - 0x20]
mov dword [ecx], eax
mov eax, dword [ebp - 0x20]
jmp 0x418619
push 1
mov edx, dword [ebp - 0x18]
push edx
call fcn.0041a47c
add esp, 8
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
je 0x418604
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
mov eax, dword [ebp - 0x20]
jmp 0x418619
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [0x435544]
push eax
call fcn.00415d6e
add esp, 8
mov eax, dword [ebp - 0x20]
mov esp, ebp
pop ebp
ret