Function at 0x623dd828
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 0x623dd87a
cmp dword [ebp + 8], 1
je 0x623dd87a
mov eax, 1
jmp 0x623dd87f
mov eax, 0
mov dword [ebp - 0x30], eax
cmp dword [ebp + 0x10], 0
jne 0x623dd88e
cmp dword [ebp - 0x30], 0
je 0x623dd8a9
mov dword [esp], 0x273f
mov eax, dword [sym.imp.WS2_32.dll_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x623ddb54
cmp dword [ebp - 0x4c], 0
jne 0x623dd8ca
mov dword [esp], 0x2726
mov eax, dword [sym.imp.WS2_32.dll_WSASetLastError]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x623ddb54
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 0x623dd8fd
mov eax, 0xffffffff
jmp 0x623ddb54
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 0x623ddae9
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 0x623ddaec
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 0x623ddaef
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 0x623ddaf2
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x623ddad9
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 0x623ddaf5
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 0x623ddaf8
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x623ddadc
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 0x623ddafb
mov eax, dword [ebp - 0x44]
cmp eax, 0x10
jne 0x623ddadf
movzx edx, word [ebp - 0x2c]
movzx eax, word [ebp - 0x1c]
cmp dx, ax
jne 0x623ddadf
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x18]
cmp edx, eax
jne 0x623ddadf
movzx edx, word [ebp - 0x2a]
movzx eax, word [ebp - 0x1a]
cmp dx, ax
jne 0x623ddadf
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym.libevent_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 0x623ddb54
nop
jmp 0x623ddae0
nop
jmp 0x623ddae0
nop
mov dword [ebp - 0x38], 0x2745
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
jmp 0x623ddafc
nop
cmp dword [ebp - 0x38], 0
jns 0x623ddb0c
mov eax, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x34], 0xffffffff
je 0x623ddb1d
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym.libevent_2_1_6.dll_evutil_closesocket
cmp dword [ebp - 0x40], 0xffffffff
je 0x623ddb2e
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libevent_2_1_6.dll_evutil_closesocket
cmp dword [ebp - 0x3c], 0xffffffff
je 0x623ddb3f
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym.libevent_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 0x623ddb64
call sym.___stack_chk_fail
leave
ret