Function at 0x445538
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
sub esp, 0x170
mov eax, dword [0x5c9040]
xor eax, esp
mov dword [esp + 0x16c], eax
push ebx
mov ebx, dword [esp + 0x178]
mov eax, edx
push ebp
and dword [esp + 0x180], 0x40
or ebp, 0xffffffff
and dword [esp + 0x184], 0x40
push esi
push edi
push 0x81
xor esi, esi
mov dword [esp + 0x1c], eax
push esi
push esi
push eax
push ecx
push 2
pop eax
push eax
mov dword [esp + 0x34], ecx
or edi, 0xffffffff
mov dword [esp + 0x3c], ebx
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [esp + 0x14], eax
cmp eax, 0xffffffff
je 0x445784
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
push 1
push eax
call esi
test eax, eax
je 0x44577c
push 2
pop eax
push 0x7f000001
mov word [esp + 0x4c], ax
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x4c], eax
xor eax, eax
mov word [esp + 0x4a], ax
lea eax, [esp + 0x48]
push 0x10
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
jne 0x445784
push 1
push dword [esp + 0x18]
call dword [sym.imp.WS2_32.dll_listen]
test eax, eax
jne 0x445784
lea eax, [esp + 0x28]
mov dword [esp + 0x28], 0x10
push eax
lea eax, [esp + 0x4c]
push eax
push dword [esp + 0x1c]
call dword [sym.imp.WS2_32.dll_getsockname]
test eax, eax
jne 0x445784
cmp dword [esp + 0x188], eax
setne al
sub eax, 0xffffff80
push eax
push 0
push 0
push dword [esp + 0x24]
push dword [esp + 0x2c]
push 2
pop eax
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x445784
push 0
push 1
push ebp
call esi
test eax, eax
je 0x44577c
push 0x10
lea eax, [esp + 0x4c]
push eax
push ebp
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x445784
cmp dword [esp + 0x18c], eax
setne al
sub eax, 0xffffff80
push eax
push 0
push 0
push dword [esp + 0x24]
push dword [esp + 0x2c]
push 2
pop eax
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov edi, eax
cmp edi, 0xffffffff
je 0x445784
push 0
push 1
push edi
call esi
test eax, eax
je 0x44577c
mov ecx, dword [esp + 0x14]
lea edx, [esp + 0x2c]
call fcn.0044a878
test eax, eax
jne 0x4456cd
mov esi, 0x273f
jmp 0x44578c
push 0x14
lea eax, [esp + 0x38]
push 0
push eax
call fcn.0051c010
add esp, 0xc
lea eax, [esp + 0x34]
push eax
lea eax, [esp + 0x24]
push eax
mov eax, 0x80
push eax
push eax
push 0
lea eax, [esp + 0x6c]
push eax
push edi
push dword [esp + 0x30]
call dword [esp + 0x4c]
test eax, eax
jne 0x44574d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x3e5
jne 0x44578c
mov ebx, dword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
lea eax, [esp + 0x30]
push eax
push 0
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x40]
push eax
push edi
call ebx
test eax, eax
jne 0x445749
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x3e4
jne 0x44578c
call dword [sym.imp.KERNEL32.dll_SwitchToThread]
jmp 0x445719
mov ebx, dword [esp + 0x24]
push 4
lea eax, [esp + 0x18]
push eax
push 0x700b
push 0xffff
push edi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x445784
push dword [esp + 0x14]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], ebp
xor eax, eax
mov dword [ebx + 4], edi
jmp 0x4457b6
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x44578a
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp dword [esp + 0x14], 0xffffffff
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
je 0x44579f
push dword [esp + 0x14]
call ebx
cmp ebp, 0xffffffff
je 0x4457a7
push ebp
call ebx
cmp edi, 0xffffffff
je 0x4457af
push edi
call ebx
mov ecx, esi
call fcn.00449d08
mov ecx, dword [esp + 0x17c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.0051b034
add esp, 0x170
ret