Function at 0x6e91d828
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x4c], eax
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [ebp - 0xc], eax
xor eax, eax
mov dword [ebp - 0x34], 0xffffffff
mov dword [ebp - 0x40], 0xffffffff
mov dword [ebp - 0x3c], 0xffffffff
mov dword [ebp - 0x38], 0xffffffff
cmp dword [ebp + 8], 2
setne al
movzx eax, al
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x6e91d87a
cmp dword [ebp + 8], 1
je 0x6e91d87a
mov eax, 1
jmp 0x6e91d87f
mov eax, 0
mov dword [ebp - 0x30], eax
cmp dword [ebp + 0x10], 0
jne 0x6e91d88e
cmp dword [ebp - 0x30], 0
je 0x6e91d8a9
mov dword [esp], 0x273f
mov eax, dword [sym.imp.WS2_32.dll_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x6e91db54
cmp dword [ebp - 0x4c], 0
jne 0x6e91d8ca
mov dword [esp], 0x2726
mov eax, dword [sym.imp.WS2_32.dll_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x6e91db54
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
jns 0x6e91d8fd
mov eax, 0xffffffff
jmp 0x6e91db54
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call sym._memset
mov word [ebp - 0x2c], 2
mov dword [esp], 0x7f000001
mov eax, dword [sym.imp.WS2_32.dll_htonl]
call eax
sub esp, 4
mov dword [ebp - 0x28], eax
mov word [ebp - 0x2a], 0
mov eax, dword [ebp - 0x34]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_bind]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6e91dae9
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], 1
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_listen]
call eax
sub esp, 8
cmp eax, 0xffffffff
je 0x6e91daec
mov dword [esp + 8], 0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov dword [esp], 2
mov eax, dword [sym.imp.WS2_32.dll_socket]
call eax
sub esp, 0xc
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
js 0x6e91daef
mov dword [esp + 8], 0x10
mov dword [esp + 4], 0
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call sym._memset
mov dword [ebp - 0x44], 0x10
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x44]
mov dword [esp + 8], edx
lea edx, [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_getsockname]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6e91daf2
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x6e91dad9
mov eax, dword [ebp - 0x40]
mov dword [esp + 8], 0x10
lea edx, [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_connect]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6e91daf5
mov dword [ebp - 0x44], 0x10
mov eax, dword [ebp - 0x34]
lea edx, [ebp - 0x44]
mov dword [esp + 8], edx
lea edx, [ebp - 0x2c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_accept]
call eax
sub esp, 0xc
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
js 0x6e91daf8
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x6e91dadc
mov eax, dword [ebp - 0x40]
lea edx, [ebp - 0x44]
mov dword [esp + 8], edx
lea edx, [ebp - 0x1c]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_getsockname]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
je 0x6e91dafb
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x6e91dadf
movzx edx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x1c]
cmp dx, ax
jne 0x6e91dadf
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmp edx, eax
jne 0x6e91dadf
movzx edx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x1a]
cmp dx, ax
jne 0x6e91dadf
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym.libevent_core_2_1_6.dll_evutil_closesocket
mov eax, dword [ebp - 0x4c]
mov edx, dword [ebp - 0x40]
mov dword [eax], edx
mov eax, dword [ebp - 0x4c]
lea edx, [eax + 4]
mov eax, dword [ebp - 0x3c]
mov dword [edx], eax
mov eax, 0
jmp 0x6e91db54
nop
jmp 0x6e91dae0
nop
jmp 0x6e91dae0
nop
mov dword [ebp - 0x38], 0x2745
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
jmp 0x6e91dafc
nop
cmp dword [ebp - 0x38], 0
jns 0x6e91db0c
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x6e91db1d
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym.libevent_core_2_1_6.dll_evutil_closesocket
cmp dword [ebp - 0x40], 0xffffffff
je 0x6e91db2e
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libevent_core_2_1_6.dll_evutil_closesocket
cmp dword [ebp - 0x3c], 0xffffffff
je 0x6e91db3f
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym.libevent_core_2_1_6.dll_evutil_closesocket
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
xor ecx, dword [sym.imp.libssp_0.dll___stack_chk_guard]
je 0x6e91db64
call sym.___stack_chk_fail
leave
ret