Function at 0x10057820
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 0x1008df83
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.1003ad70
cmp byte [ebp + 0xc], 0
mov edi, dword [ebp - 0x19c]
mov dword [ebp - 0x190], edi
je 0x1005799b
push 0x825
push edi
push dword [ebp - 0x1a0]
mov dword [ebp - 0x194], 0x825
call fcn.100616c0
cmp eax, edi
jne 0x100578f5
cmp edi, dword [ebp - 0x198]
je 0x100578d6
mov eax, 0x825
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x100578ef
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.100616c0
cmp eax, edi
jne 0x1005794f
cmp edi, dword [ebp - 0x198]
je 0x10057930
mov eax, 0x824
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057949
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.100616c0
cmp eax, edi
jne 0x10057b08
cmp edi, dword [ebp - 0x198]
je 0x10057ae9
mov eax, 0x823
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
mov dword [ebp - 0x190], edi
jmp 0x10057b08
push 0x270f
push edi
push dword [ebp - 0x1a0]
mov dword [ebp - 0x194], 0x270f
call fcn.100616c0
cmp eax, edi
jne 0x100579f4
cmp edi, dword [ebp - 0x198]
je 0x100579d5
mov eax, 0x270f
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x100579ee
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.100616c0
cmp eax, edi
jne 0x10057a4e
cmp edi, dword [ebp - 0x198]
je 0x10057a2f
mov eax, 0x826
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057a48
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.100616c0
cmp eax, edi
jne 0x10057aa8
cmp edi, dword [ebp - 0x198]
je 0x10057a89
mov eax, 0x827
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
jmp 0x10057aa2
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.100616c0
cmp eax, edi
jne 0x10057b08
cmp edi, dword [ebp - 0x198]
je 0x10057ae9
mov eax, 0x828
mov word [edi], ax
add edi, 2
mov dword [ebp - 0x19c], edi
mov dword [ebp - 0x190], edi
jmp 0x10057b08
lea eax, [ebp - 0x194]
push eax
push edi
lea ecx, [ebp - 0x1a0]
call fcn.1003b0a0
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.1006dd90
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 0x10057b53
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 0x10057b65
sub ecx, edx
push ecx
push esi
lea ecx, [ebp - 0x4c]
call fcn.10003170
mov byte [ebp - 4], 1
call fcn.1007296b
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.10071e53
add esp, 0xc
cmp esi, dword [ebp - 0x194]
je 0x100580ff
cmp dword [edi], 0x22
je 0x10058109
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 0x10057bfd
mov edx, dword [ebp - 0x4c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10057bf3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058113
push ecx
push edx
call fcn.10063694
add esp, 8
push 0x100
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x22], ax
xor edx, edx
xor ecx, ecx
mov dword [ebp - 0x1b4], 0
xor eax, eax
mov dword [ebp - 0x1a8], edx
mov dword [ebp - 0x1c4], edx
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x1b8], ecx
mov dword [ebp - 0x1bc], ecx
mov byte [ebp - 4], 2
mov dword [ebp - 0x194], ecx
mov ecx, dword [ebp - 0x190]
sub ecx, dword [ebp - 0x1a0]
sar ecx, 1
mov dword [ebp - 0x190], ecx
sub eax, edx
xor edi, edi
sar eax, 2
mov dword [ebp - 0x1ac], eax
test eax, eax
je 0x10057c91
xor esi, esi
nop dword [eax + eax]
push dword [esi + edx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x1a8]
lea esi, [esi + 4]
inc edi
cmp edi, dword [ebp - 0x1ac]
jb 0x10057c70
mov ecx, dword [ebp - 0x190]
mov eax, dword [ebp - 0x1a4]
cmp edx, eax
cmovne eax, edx
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x1c0], eax
test ecx, ecx
je 0x10057d0d
mov edi, ecx
nop
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 0x10057cf6
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 0x10057e23
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 0x1a4]
sub edi, 1
jne 0x10057cb0
mov edx, dword [ebp - 0x1c4]
mov dword [ebp - 0x1a8], edx
cmp edx, eax
je 0x1005800a
sub eax, edx
xor esi, esi
sar eax, 2
mov dword [ebp - 0x1b0], eax
test eax, eax
je 0x10057e16
nop word [eax + eax]
mov eax, dword [edx + 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 0x10057d65
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 0x10057d80
sub ecx, edi
push ecx
push edx
lea ecx, [ebp - 0x64]
call fcn.10003170
lea ecx, [ebp - 0x64]
call fcn.1001a940
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x1c], eax
cmp ecx, 0xf
jbe 0x10057dd2
mov edx, dword [ebp - 0x64]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x10057dc8
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058113
push ecx
push edx
call fcn.10063694
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 eax, dword [ebp - 0x1b0]
inc esi
mov edx, dword [ebp - 0x1a8]
cmp esi, eax
jb 0x10057d30
xor esi, esi
mov dword [ebp - 0x1ac], esi
jmp 0x10057eb6
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 eax, dword [ebp - 0x1a4]
cmp eax, dword [ebp - 0x1b8]
je 0x10057e7f
mov dword [eax], esi
add eax, 4
mov dword [ebp - 0x1a4], eax
mov dword [ebp - 0x1c0], eax
jmp 0x10057cfc
lea ecx, [ebp - 0x1ac]
push ecx
push eax
lea ecx, [ebp - 0x1c4]
call fcn.1001a740
mov eax, dword [ebp - 0x1bc]
mov dword [ebp - 0x1b8], eax
mov eax, dword [ebp - 0x1c0]
mov dword [ebp - 0x1a4], eax
jmp 0x10057cfc
mov edx, dword [ebp - 0x1a8]
xor ecx, ecx
xor edi, edi
mov dword [ebp - 0x18c], ecx
test eax, eax
je 0x10057f13
xor esi, esi
mov edx, dword [esi + edx]
xor eax, eax
test ecx, ecx
je 0x10057ede
nop
cmp dword [ebp + eax*4 - 0x188], edx
je 0x10057ede
inc eax
cmp eax, ecx
jb 0x10057ed0
cmp eax, ecx
jne 0x10057efb
cmp ecx, 0x40
jae 0x10057efb
mov dword [ebp + eax*4 - 0x188], edx
mov ecx, dword [ebp - 0x18c]
inc ecx
mov dword [ebp - 0x18c], ecx
mov edx, dword [ebp - 0x1a8]
inc edi
add esi, 4
cmp edi, dword [ebp - 0x1b0]
jb 0x10057ec6
mov esi, dword [ebp - 0x1ac]
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 0x10057ff3
test eax, eax
je 0x10057fdd
xor esi, esi
cmp dword [ebp - 0x1b0], esi
jbe 0x10057fca
nop dword [eax]
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 0x10058027
inc esi
cmp esi, dword [ebp - 0x1b0]
jb 0x10057f60
mov eax, dword [ebp - 0x1b4]
xor ecx, ecx
cmp cx, ax
jne 0x10058033
mov esi, dword [ebp - 0x1ac]
mov eax, dword [ebp - 0x1b0]
inc esi
mov dword [ebp - 0x1ac], esi
cmp esi, 3
jb 0x10057eb0
xor eax, eax
cmp ax, word [ebp - 0x1b4]
jne 0x10058033
mov edx, dword [ebp - 0x1a8]
mov eax, dword [ebp - 0x1a4]
mov ecx, dword [ebp - 0x194]
inc ecx
mov dword [ebp - 0x194], ecx
cmp ecx, 3
jge 0x10058033
mov ecx, dword [ebp - 0x190]
jmp 0x10057c58
movzx eax, word [ebp - 0x72]
mov dword [ebp - 0x1b4], eax
jmp 0x10057fd0
mov eax, dword [ebp - 0x1a4]
xor edi, edi
mov ecx, dword [ebp - 0x1a8]
sub eax, ecx
sar eax, 2
mov dword [ebp - 0x1a4], eax
test eax, eax
je 0x1005806d
xor esi, esi
push dword [esi + ecx]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 0x1a8]
lea esi, [esi + 4]
inc edi
cmp edi, dword [ebp - 0x1a4]
jb 0x10058052
test ecx, ecx
je 0x100580a4
mov edx, dword [ebp - 0x1b8]
mov eax, ecx
sub edx, ecx
and edx, 0xfffffffc
cmp edx, 0x1000
jb 0x1005809a
mov ecx, dword [eax - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058118
push edx
push ecx
call fcn.10063694
add esp, 8
mov edx, dword [ebp - 0x1a0]
test edx, edx
je 0x100580dd
mov ecx, dword [ebp - 0x198]
mov eax, edx
sub ecx, edx
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x100580d3
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10058118
push ecx
push edx
call fcn.10063694
add esp, 8
mov ax, word [ebp - 0x1b4]
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.10063337
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.1006dd3f
call fcn.1006dd3f
int3