Function at 0x1800402c0
Capabilities:
Create udp socket

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x12a8]
mov eax, 0x13a8
call fcn.18004b9a0
sub rsp, rax
mov qword [rbp - 0x48], 0xfffffffffffffffe
mov rax, qword [0x180074808]
xor rax, rsp
mov qword [rbp + 0x1290], rax
mov r15, r9
mov ebx, r8d
mov dword [rsp + 0x58], ebx
mov r12, rdx
mov r14, rcx
mov rax, qword [rbp + 0x1318]
mov qword [rsp + 0x60], rax
mov rax, qword [rbp + 0x1320]
mov qword [rsp + 0x50], rax
cmp qword [0x1800a4348], 0
je 0x180040521
xor r13d, r13d
call fcn.18002f8b0
mov rsi, rax
test rax, rax
je 0x180040521
test r12, r12
je 0x180040369
mov eax, dword [r12]
mov dword [rsi + 0x28], eax
mov eax, dword [r12 + 4]
mov dword [rsi + 0x2c], eax
mov eax, dword [r12 + 8]
mov dword [rsi + 0x30], eax
mov eax, dword [r12 + 0xc]
mov dword [rsi + 0x34], eax
movzx eax, byte [r12 + 4]
cmp eax, dword [reloc.WS2_32.dll_ioctlsocket]
jne 0x180040586
mov byte [rbp + 0x60], r13b
xor edx, edx
mov r8d, 0x1ff
lea rcx, [rbp + 0x61]
call fcn.18004a690
mov edi, dword [r12 + 4]
lea rdx, [rbp + 0x60]
mov ecx, edi
call fcn.180006310
test eax, eax
jne 0x1800403b7
lea rdx, [rbp + 0x60]
mov ecx, edi
call fcn.1800337a0
test eax, eax
je 0x180040586
mov ecx, dword [r12 + 4]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov qword [rbp + 0x48], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x40], r13
mov byte [rbp + 0x30], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x60]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x30]
call fcn.180002b40
nop
lea rcx, [rsi + 0x38]
lea rdx, [rbp + 0x30]
call fcn.180002730
nop
cmp qword [rbp + 0x48], 0x10
jb 0x180040411
mov rcx, qword [rbp + 0x30]
call fcn.180042a64
mov qword [rbp + 0x48], reloc.WS2_32.dll_ntohs
xor edi, edi
mov qword [rbp + 0x40], rdi
mov byte [rbp + 0x30], dil
mov byte [rsp + 0x41], dil
mov dword [rsp + 0x44], 0xffffffff
lea rax, [rbp - 0x18]
mov qword [rsp + 0x48], rax
lea rcx, [0x1800a4190]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
lea rcx, [rbp - 0x18]
call fcn.180001ef0
mov rbx, rax
mov qword [rbp - 0x28], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x30], rdi
mov byte [rbp - 0x40], dil
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x60]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x60]
lea rcx, [rbp - 0x40]
call fcn.180002b40
movzx ecx, word [r12 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r9d, ax
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x41]
mov qword [rsp + 0x20], rax
mov r8, rbx
lea rdx, [rbp - 0x40]
lea rcx, [0x1800a4998]
call fcn.18001a0d0
movzx edx, byte [rsp + 0x41]
cmp dl, 1
jne 0x18004050c
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x1800404d6
mov dword [rsi + 0x24], 0
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x1310]
mov dword [rsp + 0x20], eax
mov r9, r15
mov r8d, dword [rsp + 0x58]
mov rdx, r12
mov rcx, r14
call fcn.180040b90
jmp 0x180040b66
cmp dl, 2
jne 0x180040531
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x180040521
mov dword [rsi + 0x24], 0
mov ecx, 0x274d
call qword [sym.imp.WS2_32.dll_WSASetLastError]
jmp 0x180040b64
test dl, dl
jne 0x180040551
mov eax, dword [rsp + 0x44]
cmp eax, 0xffffffff
jne 0x180040547
call fcn.18000cb90
mov dword [rsp + 0x44], eax
mov ecx, eax
call fcn.18000cbf0
mov r13, rax
movzx ecx, word [r12 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx r9d, ax
xor r12d, r12d
mov dword [rsp + 0x30], r12d
mov dword [rsp + 0x28], r12d
mov byte [rsp + 0x20], 1
lea r8, [rbp + 0x60]
xor edx, edx
mov rcx, r14
call fcn.180039410
jmp 0x18004079a
mov eax, dword [r12]
mov dword [rsi + 0x60], eax
mov eax, dword [r12 + 4]
mov dword [rsi + 0x64], eax
mov eax, dword [r12 + 8]
mov dword [rsi + 0x68], eax
mov eax, dword [r12 + 0xc]
mov dword [rsi + 0x6c], eax
movzx ecx, word [r12 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
mov byte [rsp + 0x40], r13b
mov dword [rsp + 0x48], 0xffffffff
mov byte [rbp + 0x260], r13b
xor edx, edx
mov r8d, 0x1f3
lea rcx, [rbp + 0x261]
call fcn.18004a690
cmp qword [0x1800a42c8], r13
je 0x1800405fc
cmp qword [0x1800a4318], r13
je 0x1800405fc
lea rdx, [rbp + 0x260]
mov ecx, dword [r12 + 4]
call fcn.180006c80
cmp byte [rbp + 0x260], r13b
jne 0x18004062d
mov ecx, dword [r12 + 4]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
lea rdx, [rbp + 0x260]
sub rdx, rax
nop word [rax + rax]
movzx ecx, byte [rax]
mov byte [rdx + rax], cl
inc rax
test cl, cl
jne 0x180040620
lea rax, [rsp + 0x68]
mov qword [rsp + 0x58], rax
lea rcx, [0x1800a4190]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rdx, rax
mov qword [rbp - 0x80], reloc.WS2_32.dll_ntohs
mov qword [rsp + 0x78], r13
mov byte [rsp + 0x68], r13b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x68]
call fcn.180002b40
nop
mov qword [rbp - 0x58], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x60], 0
mov byte [rbp - 0x70], 0
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x260]
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rbp + 0x260]
lea rcx, [rbp - 0x70]
call fcn.180002b40
movzx ecx, word [r12 + 2]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
mov ecx, dword [r12 + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
mov r9d, eax
lea rax, [rsp + 0x48]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov word [rsp + 0x20], di
lea r8, [rsp + 0x68]
lea rdx, [rbp - 0x70]
lea rcx, [0x1800a4998]
call fcn.18001a370
movzx edx, byte [rsp + 0x40]
cmp dl, 1
jne 0x180040749
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x180040715
mov dword [rsi + 0x24], 0
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x28], rax
mov eax, dword [rbp + 0x1310]
mov dword [rsp + 0x20], eax
mov r9, r15
mov r8d, ebx
mov rdx, r12
mov rcx, r14
call fcn.180040b90
jmp 0x180040b66
cmp dl, 2
je 0x180040511
test dl, dl
jne 0x180040772
mov eax, dword [rsp + 0x48]
cmp eax, 0xffffffff
jne 0x180040768
call fcn.18000cb90
mov dword [rsp + 0x48], eax
mov ecx, eax
call fcn.18000cbf0
mov r13, rax
xor eax, eax
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], eax
mov r9b, 1
mov r8, r12
xor edx, edx
mov rcx, r14
call fcn.180039340
mov ecx, dword [r12 + 4]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
xor r12d, r12d
test r13, r13
je 0x180040521
lea r9, [r13 + 0x14c]
lea r8, [r13 + 0x10c]
mov eax, dword [0x1800a4188]
mov dword [rsp + 0x28], eax
movzx eax, word [0x1800a1e3e]
mov word [rsp + 0x20], ax
movzx edx, word [r13 + 0x10a]
lea rcx, [r13 + 5]
call fcn.180033970
call fcn.18001dcd0
mov ebx, eax
mov eax, 1
test ebx, ebx
jle 0x1800407f5
movzx ecx, byte [rsi + 0x7c]
cmp byte [rsi + 0x7c], al
cmovbe ecx, eax
mov byte [rsi + 0x7c], cl
mov rdx, qword [rsi + 0x10]
test rdx, rdx
je 0x180040847
cmp dword [rsi + 0x1c], 0
je 0x180040847
mov rax, qword [0x1800a42d8]
test rax, rax
je 0x180040847
xor r9d, r9d
xor r8d, r8d
mov rcx, r14
call rax
cmp eax, 0xffffffff
jne 0x180040847
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lock dec dword [rsi + 0x24]
mov ecx, dword [rsi + 0x24]
jns 0x180040833
mov dword [rsi + 0x24], r12d
test eax, eax
mov ecx, 0x274d
je 0x180040b56
mov ecx, eax
jmp 0x180040b56
cmp qword [rsi + 8], 0
je 0x18004086f
cmp dword [rsi + 0x20], 0
je 0x18004086f
mov rax, qword [0x1800a42e0]
test rax, rax
je 0x18004086f
xor r8d, r8d
xor edx, edx
mov rcx, r14
call rax
cmp eax, 0xffffffff
je 0x180040820
mov eax, 2
mov word [rbp + 0x20], ax
movzx ecx, word [r13 + 0x10a]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x22], ax
lea rcx, [r13 + 5]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 0x24], eax
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r12
mov dword [rsp + 0x20], r12d
xor r9d, r9d
lea r8d, [r9 + 0x10]
lea rdx, [rbp + 0x20]
mov rcx, r14
call qword [0x1800a4348]
mov edi, eax
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
mov dword [rsi + 0x78], 1
cmp edi, 1
jne 0x180040ac8
mov byte [rbp + 0x460], 0
xor edx, edx
mov r8d, 0x257
lea rcx, [rbp + 0x461]
call fcn.18004a690
cmp qword [rsi + 0x48], 0
je 0x18004090b
lea r9, [rsi + 0x38]
cmp qword [r9 + 0x18], 0x10
jb 0x180040917
mov r9, qword [r9]
jmp 0x180040917
mov ecx, dword [rsi + 0x64]
call qword [sym.imp.WS2_32.dll_inet_ntoa]
mov r9, rax
lea r8, [0x18006669c]
mov edx, 0x258
lea rcx, [rbp + 0x460]
call fcn.180043d9c
lea rcx, [0x1800a4190]
call qword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
mov rbx, rax
movzx ecx, word [rsi + 0x2a]
call qword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
mov byte [rbp + 0x6c0], 0
xor edx, edx
mov r8d, 0x3ff
lea rcx, [rbp + 0x6c1]
call fcn.18004a690
mov dword [rsp + 0x30], edi
lea rax, [rbp + 0x460]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
lea r9, str.__s__Connected_to__s:_d
mov edx, 0x400
lea r8d, [rdx - 1]
lea rcx, [rbp + 0x6c0]
call fcn.180043dc0
cmp byte [rbp + 0x6c0], 0
je 0x180040a98
cmp qword [0x1800a42c8], 0
je 0x180040a98
cmp qword [0x1800a4318], 0
je 0x180040a98
xor edx, edx
mov r8d, 0x7cf
lea rcx, [rbp + 0xac1]
call fcn.18004a690
mov byte [rbp + 0xac0], send
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rbp + 0x6c0]
repne scasb al, byte [rdi]
not rcx
dec rcx
movzx ebx, cx
inc ebx
mov dword [rbp + 0xac1], ebx
mov byte [rbp + 0xac5], 2
mov r8d, ebx
lea rdx, [rbp + 0x6c0]
lea rcx, [rbp + 0xac6]
call fcn.180042380
mov edx, 1
lea r8d, [rdx + 5]
mov r12d, 2
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180040a98
mov word [rbp + 0x10], r12w
lea rcx, [0x180067e70]
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rbp + 0x14], eax
movzx ecx, word [0x1800a1e3e]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp + 0x12], ax
lea r8d, [r12 + 0xe]
lea rdx, [rbp + 0x10]
mov rcx, rdi
call qword [0x1800a42c8]
mov rcx, rdi
cmp eax, 0xffffffff
je 0x180040a92
lea r8d, [rbx + 6]
lea r9d, [r12 + 1]
lea rdx, [rbp + 0xac0]
call fcn.180033110
mov rcx, rdi
call qword [0x1800a4318]
mov rcx, rsi
call fcn.180035720
test eax, eax
jne 0x180040abe
xor ecx, ecx
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, r13
call fcn.180042a64
mov eax, 1
jmp 0x180040b66
mov ecx, 0x274c
jmp 0x180040b56
cmp eax, 0x3e5
je 0x180040ade
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x180040b56
mov dword [rsi + 0x24], r12d
jmp 0x180040b56
mov rcx, rsi
call fcn.18001e7d0
test ebx, ebx
jle 0x180040b44
or edx, 0xffffffff
mov rcx, qword [rsi + 0x70]
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov rcx, qword [rsi + 0x70]
test rcx, rcx
je 0x180040b44
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rsi + 0x70], r12
test r15, r15
je 0x180040b2d
mov rax, qword [0x1800a4330]
test rax, rax
je 0x180040b2d
xor r9d, r9d
mov r8d, dword [rbp + 0x1310]
mov rdx, r15
mov rcx, r14
call rax
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x180040b3a
mov dword [rsi + 0x24], r12d
mov ecx, 0x3e5
jmp 0x180040526
lock dec dword [rsi + 0x24]
mov eax, dword [rsi + 0x24]
jns 0x180040b51
mov dword [rsi + 0x24], r12d
mov ecx, 0x3e5
call qword [sym.imp.WS2_32.dll_WSASetLastError]
mov rcx, r13
call fcn.180042a64
xor eax, eax
mov rcx, qword [rbp + 0x1290]
xor rcx, rsp
call fcn.180041e80
add rsp, 0x13a8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret