Function at 0x429b5b
Capabilities:
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov ebx, eax
mov dword [ebp - 0x48], ecx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x40], eax
or edi, 0xffffffff
test ebx, ebx
je 0x429ddd
mov eax, dword [ebx + 4]
mov dword [ebp - 0x3c], eax
or edi, 0xffffffff
test eax, eax
jne 0x429ddd
mov esi, edx
mov eax, 2
bt dword [ebx], 9
jae 0x429b9d
mov eax, 1
xor edx, edx
mov dword [esp + 8], edx
mov dword [esp + 4], eax
mov dword [esp], 2
call dword [sym.imp.WS2_32.dll_socket]
sub esp, 0xc
mov dword [ebx + 4], eax
bt dword [ebx], 0xb
jae 0x429bcc
mov edx, 1
mov eax, ebx
call fcn.005a39bf
and dword [ebx], 0xfffffbff
lea edx, [ebp - 0x28]
mov ecx, 4
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
test esi, esi
je 0x429bf1
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_inet_addr]
push edi
mov dword [ebp - 0x3c], eax
cmp dword [ebp + 8], 0
setne dl
cmp word [ebp - 0x40], 0
setne al
and dl, al
mov byte [ebp - 0x41], dl
je 0x429c50
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push esi
mov ecx, dword [ebp - 0x3c]
cmp eax, ecx
jne 0x429c50
mov dword [ebp - 0x2c], 1
mov dword [esp + 0x10], 4
lea eax, [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x40
mov dword [esp + 4], 0xffff
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
mov word [ebp - 0x28], 2
movzx esi, word [ebp - 0x48]
mov dword [esp], esi
call dword [sym.imp.WS2_32.dll_htons]
push ecx
mov word [ebp - 0x26], ax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x24], eax
cmp dword [ebp + 0x10], 0
je 0x429ca9
mov eax, dword [ebx + 4]
mov dword [ebp - 0x2c], 1
mov dword [esp + 0x10], 4
lea edx, [ebp - 0x2c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 4
mov dword [esp + 4], 0xffff
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
sub esp, 0x14
mov dword [esp + 8], 0x10
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebx + 4]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_bind]
sub esp, 0xc
mov edi, eax
cmp eax, 0xffffffff
jne 0x429d06
cmp dword [0x5af054], 0
je 0x429d01
mov dword [0x611418], 1
mov dword [0x611414], 3
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 4], eax
mov dword [esp], str._socket__cannot_bind_socket___socket_error__x_n
call fcn.004268ea
mov edi, 0xffffffd7
cmp byte [ebp - 0x41], 0
je 0x429d5f
movzx eax, word [ebp - 0x40]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_htons]
push ecx
mov word [ebx + 0xa], ax
mov word [ebx + 8], 2
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_inet_addr]
push edx
mov dword [ebx + 0xc], eax
inc eax
jne 0x429d59
mov eax, dword [ebp + 8]
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
push edx
test eax, eax
je 0x429d54
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebx + 0xc], eax
jmp 0x429d59
mov edi, 0xffffffd8
or dword [ebx], 0x4000
mov eax, dword [0x5af054]
mov edx, dword [ebx]
bt edx, 0xe
jae 0x429dad
cmp eax, 2
jbe 0x429ddd
mov dword [0x611418], 3
mov dword [0x611414], 3
movzx eax, word [ebp - 0x40]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], str._socket__socket_bound_to__08X___port__d___remote_peer:__s:_d_n
call fcn.004268ea
jmp 0x429ddd
cmp eax, 2
jbe 0x429ddd
mov dword [0x611418], 3
mov dword [0x611414], 3
mov dword [esp + 8], esi
mov eax, dword [ebp - 0x3c]
mov dword [esp + 4], eax
mov dword [esp], str._socket__socket_bound_to__08X___port__d_n
call fcn.004268ea
mov eax, edi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret