Function at 0x10057840
Capabilities:
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1008de73
mov eax, dword fs:[0]
push eax
sub esp, 0x1d4
mov eax, dword [0x100a70c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x1d4], ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x1a0], 0
mov dword [ebp - 0x19c], 0
mov dword [ebp - 0x198], 0
lea ecx, [ebp - 0x1a0]
mov dword [ebp - 4], 0
call fcn.1003ada0
cmp byte [ebp + 0xc], 0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
je 0x100579bb
push 0x825
push edi
push dword [ebp - 0x1a0]
mov dword [ebp - 0x194], 0x825
call fcn.10061460
cmp eax, edi
jne 0x10057915
cmp edi, dword [ebp - 0x198]
je 0x100578f6
mov eax, 0x825
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x1005790f
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
mov eax, dword [ebp - 0x1a0]
push 0x824
push edi
push eax
mov dword [ebp - 0x194], 0x824
call fcn.10061460
cmp eax, edi
jne 0x1005796f
cmp edi, dword [ebp - 0x198]
je 0x10057950
mov eax, 0x824
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057969
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
mov eax, dword [ebp - 0x1a0]
push 0x823
push edi
push eax
mov dword [ebp - 0x194], 0x823
call fcn.10061460
cmp eax, edi
jne 0x10057b28
cmp edi, dword [ebp - 0x198]
je 0x10057b09
mov eax, 0x823
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
mov dword [ebp - 0x190], edi
jmp 0x10057b28
push 0x270f
push edi
push dword [ebp - 0x1a0]
mov dword [ebp - 0x194], 0x270f
call fcn.10061460
cmp eax, edi
jne 0x10057a14
cmp edi, dword [ebp - 0x198]
je 0x100579f5
mov eax, 0x270f
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057a0e
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
mov eax, dword [ebp - 0x1a0]
push 0x826
push edi
push eax
mov dword [ebp - 0x194], 0x826
call fcn.10061460
cmp eax, edi
jne 0x10057a6e
cmp edi, dword [ebp - 0x198]
je 0x10057a4f
mov eax, 0x826
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057a68
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
mov eax, dword [ebp - 0x1a0]
push 0x827
push edi
push eax
mov dword [ebp - 0x194], 0x827
call fcn.10061460
cmp eax, edi
jne 0x10057ac8
cmp edi, dword [ebp - 0x198]
je 0x10057aa9
mov eax, 0x827
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057ac2
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
mov eax, dword [ebp - 0x1a0]
push 0x828
push edi
push eax
mov dword [ebp - 0x194], 0x828
call fcn.10061460
cmp eax, edi
jne 0x10057b28
cmp edi, dword [ebp - 0x198]
je 0x10057b09
mov eax, 0x828
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
mov dword [ebp - 0x190], edi
jmp 0x10057b28
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0d0
mov eax, dword [ebp - 0x19c]
mov dword [ebp - 0x190], eax
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 0xa55a
call edi
mov word [ebp - 0x34], ax
xor eax, eax
push 0x14
mov word [ebp - 0x32], ax
call edi
push 0
mov word [ebp - 0x30], ax
call fcn.1006dcf0
add esp, 4
mov dword [ebp - 0x1dc], edx
push eax
call edi
mov word [ebp - 0x2e], ax
xor eax, eax
cmp dword [esi + 0x14], 0xf
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x28], ax
jbe 0x10057b73
mov esi, dword [esi]
mov ecx, esi
mov dword [ebp - 0x3c], eax
xorps xmm0, xmm0
mov dword [ebp - 0x38], eax
movups xmmword [ebp - 0x4c], xmm0
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10057b85
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x4c]
call fcn.10003170
mov byte [ebp - 4], 1
call fcn.100728cb
cmp dword [ebp - 0x38], 0xf
lea esi, [ebp - 0x4c]
mov edi, eax
lea eax, [ebp - 0x194]
cmova esi, dword [ebp - 0x4c]
push 0xa
push eax
push esi
mov dword [edi], 0
call fcn.10071db3
add esp, 0xc
cmp esi, dword [ebp - 0x194]
je 0x100580f4
cmp dword [edi], 0x22
je 0x100580fe
push eax
call dword [sym.imp.WS2_32.dll_htonl]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x26], eax
cmp ecx, 0xf
jbe 0x10057c1d
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10057c13
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058108
push ecx
push edx
call fcn.100635d4
add esp, 8
push 0x100
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
xor edx, edx
xor eax, eax
mov dword [ebp - 0x1b0], 0
xor ecx, ecx
mov dword [ebp - 0x1a8], eax
mov dword [ebp - 0x1c4], eax
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1b8], edx
mov dword [ebp - 0x1bc], edx
mov byte [ebp - 4], 2
mov dword [ebp - 0x194], edx
mov edx, dword [ebp - 0x190]
sub edx, dword [ebp - 0x1a0]
sar edx, 1
mov dword [ebp - 0x190], edx
mov edi, ecx
xor esi, esi
sub edi, eax
sar edi, 2
test edi, edi
je 0x10057ca5
push dword [eax + esi*4]
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x1a8]
inc esi
cmp esi, edi
jb 0x10057c85
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ebp - 0x190]
cmp eax, ecx
cmovne ecx, eax
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1c0], ecx
test edx, edx
je 0x10057d1d
mov edi, edx
nop dword [eax]
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x1ac], esi
cmp esi, 0xffffffff
je 0x10057d06
lea eax, [ebp - 0x1c8]
mov dword [ebp - 0x1c8], 1
push eax
push 0x8004667e
push esi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
jne 0x10057e35
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x1a4]
sub edi, 1
jne 0x10057cc0
mov eax, dword [ebp - 0x1c4]
mov dword [ebp - 0x1a8], eax
cmp eax, ecx
je 0x10058016
mov edi, ecx
xor esi, esi
sub edi, eax
sar edi, 2
mov dword [ebp - 0x1b4], edi
test edi, edi
je 0x10057e26
nop dword [eax]
mov eax, dword [eax + esi*4]
xorps xmm0, xmm0
mov dword [ebp - 0x1ac], eax
xor eax, eax
mov word [ebp - 0x1b], ax
mov byte [ebp - 0x19], al
mov eax, dword [ebp - 0x1d4]
mov edx, eax
mov dword [ebp - 0x20], 2
mov byte [ebp - 0x1c], 0
movq qword [ebp - 0x18], xmm0
cmp dword [eax + 0x14], 0xf
jbe 0x10057d75
mov edx, dword [eax]
mov ecx, edx
mov dword [ebp - 0x54], 0
movups xmmword [ebp - 0x64], xmm0
mov dword [ebp - 0x50], 0
lea edi, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10057d90
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x64]
call fcn.10003170
lea ecx, [ebp - 0x64]
call fcn.1001a9b0
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
cmp ecx, 0xf
jbe 0x10057de2
mov edx, dword [ebp - 0x64]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10057dd8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058108
push ecx
push edx
call fcn.100635d4
add esp, 8
mov eax, dword [ebp - 0x1a0]
movzx eax, word [eax + esi*2]
push eax
call dword [sym.imp.WS2_32.dll_htons]
push 0x10
mov word [ebp - 0x1e], ax
lea eax, [ebp - 0x20]
push eax
push 0
push 0x14
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 0x1ac]
call dword [sym.imp.WS2_32.dll_sendto]
mov edi, dword [ebp - 0x1b4]
inc esi
mov eax, dword [ebp - 0x1a8]
cmp esi, edi
jb 0x10057d40
mov dword [ebp - 0x1ac], 0
jmp 0x10057ec7
push 0
push 0
lea eax, [ebp - 0x1cc]
mov dword [ebp - 0x1cc], 0
push eax
push 0
push 0
push 4
lea eax, [ebp - 0x1d0]
mov dword [ebp - 0x1d0], 0
push eax
push 0x9800000c
push esi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov ecx, dword [ebp - 0x1a4]
cmp ecx, dword [ebp - 0x1b8]
je 0x10057e91
mov dword [ecx], esi
add ecx, 4
mov dword [ebp - 0x1a4], ecx
mov dword [ebp - 0x1c0], ecx
jmp 0x10057d0c
lea eax, [ebp - 0x1ac]
push eax
push ecx
lea ecx, [ebp - 0x1c4]
call fcn.1001a7b0
mov eax, dword [ebp - 0x1bc]
mov ecx, dword [ebp - 0x1c0]
mov dword [ebp - 0x1b8], eax
mov dword [ebp - 0x1a4], ecx
jmp 0x10057d0c
mov eax, dword [ebp - 0x1a8]
xor ecx, ecx
xor esi, esi
mov dword [ebp - 0x18c], ecx
test edi, edi
je 0x10057f16
mov edx, dword [eax + esi*4]
xor eax, eax
test ecx, ecx
je 0x10057eee
nop
cmp dword [ebp + eax*4 - 0x188], edx
je 0x10057eee
inc eax
cmp eax, ecx
jb 0x10057ee0
cmp eax, ecx
jne 0x10057f0b
cmp ecx, 0x40
jae 0x10057f0b
mov dword [ebp + eax*4 - 0x188], edx
mov ecx, dword [ebp - 0x18c]
inc ecx
mov dword [ebp - 0x18c], ecx
mov eax, dword [ebp - 0x1a8]
inc esi
cmp esi, edi
jb 0x10057ed5
lea eax, [ebp - 0x1e0]
mov dword [ebp - 0x1e0], 2
push eax
push 0
push 0
lea eax, [ebp - 0x18c]
mov dword [ebp - 0x1dc], 0
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x10057fff
test eax, eax
je 0x10057fe9
xor esi, esi
test edi, edi
je 0x10057fde
nop
mov eax, dword [ebp - 0x1a8]
mov edi, dword [eax + esi*4]
lea eax, [ebp - 0x18c]
push eax
push edi
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10057fc1
lea eax, [ebp - 0x1d8]
mov dword [ebp - 0x1d8], 0x10
push eax
lea eax, [ebp - 0x74]
xorps xmm0, xmm0
push eax
push 0
push 0x10
lea eax, [ebp - 0x88]
push eax
push edi
movups xmmword [ebp - 0x74], xmm0
call dword [sym.imp.WS2_32.dll_recvfrom]
cmp eax, 0x10
jne 0x10057fc1
push dword [ebp - 0x7a]
call dword [sym.imp.WS2_32.dll_ntohs]
mov ecx, 0x100
cmp cx, ax
je 0x10057fce
mov edi, dword [ebp - 0x1b4]
inc esi
cmp esi, edi
jb 0x10057f60
jmp 0x10057fde
movzx edi, word [ebp - 0x72]
mov dword [ebp - 0x1b0], edi
mov edi, dword [ebp - 0x1b4]
xor eax, eax
cmp ax, word [ebp - 0x1b0]
jne 0x10058033
mov edx, dword [ebp - 0x1ac]
inc edx
mov dword [ebp - 0x1ac], edx
cmp edx, 3
jb 0x10057ec1
xor eax, eax
cmp ax, word [ebp - 0x1b0]
jne 0x10058033
mov eax, dword [ebp - 0x1a8]
mov ecx, dword [ebp - 0x1a4]
mov edx, dword [ebp - 0x194]
inc edx
mov dword [ebp - 0x194], edx
cmp edx, 3
jge 0x10058033
mov edx, dword [ebp - 0x190]
jmp 0x10057c78
mov eax, dword [ebp - 0x1a4]
xor esi, esi
mov edi, dword [ebp - 0x1a8]
sub eax, edi
sar eax, 2
mov dword [ebp - 0x1a4], eax
test eax, eax
je 0x10058062
push dword [edi + esi*4]
call dword [sym.imp.WS2_32.dll_closesocket]
inc esi
cmp esi, dword [ebp - 0x1a4]
jb 0x10058050
test edi, edi
je 0x10058099
mov edx, dword [ebp - 0x1b8]
mov eax, edi
sub edx, edi
and edx, 0xfffffffc
cmp edx, 0x1000
jb 0x1005808f
mov edi, dword [eax - 4]
add edx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1005810d
push edx
push edi
call fcn.100635d4
add esp, 8
mov edx, dword [ebp - 0x1a0]
test edx, edx
je 0x100580d2
mov ecx, dword [ebp - 0x198]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100580c8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1005810d
push ecx
push edx
call fcn.100635d4
add esp, 8
mov ax, word [ebp - 0x1b0]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10063277
mov esp, ebp
pop ebp
ret
push str.invalid_stoul_argument
call fcn.10061170
push str.stoul_argument_out_of_range
call fcn.100611b0
call fcn.1006dc9f
call fcn.1006dc9f
int3