Function at 0x436140
Capabilities:
Create udp socket
Set socket configuration

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x30
mov edi, dword [esp + 0x48]
mov ebp, ecx
mov ecx, 0x57887c
mov ebx, edx
call fcn.00434a80
test eax, eax
mov dword [esp + 0x14], eax
je 0x436269
mov edi, dword [esp + 0x44]
mov esi, eax
movzx eax, bp
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov word [esp + 0x20], 2
mov dword [esp + 0xc], ebp
push eax
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0x22], ax
push edi
call dword [sym.imp.WS2_32.dll_htonl]
mov ecx, ebx
mov dword [esp + 0x24], eax
call fcn.00436080
push eax
push ebx
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebp, eax
cmp eax, 0xffffffff
je 0x436292
mov dword [esi + 0xc], ebp
mov dword [esp + 0x10], 1
lea eax, [esp + 0x10]
push 4
push eax
push 0xfffffffffffffffb
push 0xffff
push ebp
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x436378
lea eax, [esp + 0x20]
push 0x10
push eax
push ebp
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x436409
cmp ebx, 1
jne 0x436216
push 0x7fffffff
push ebp
call dword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x4364fd
mov eax, dword [esp + 0x14]
mov esi, 0xffffffff
test eax, eax
je 0x4364a5
mov ebp, dword [esp + 0xc]
cmp eax, 0x5c4130
jae 0x4364a9
cmp eax, 0x5ac130
jb 0x4364a9
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x4364a9
mov ecx, 0x5ac130
mov edx, eax
sub edx, ecx
sar edx, 4
imul esi, edx, 0xaaaaaaab
add esi, 0x800
jmp 0x4364a9
call dword [sym.imp.msvcrt.dll__errno]
push dword [eax]
call fcn.0043bb30
add esp, 4
mov esi, eax
push eax
call sub.msvcrt.dll_strlen
add esp, 4
mov ecx, edi
push eax
push esi
call fcn.00534200
jmp 0x4363e8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
lea ebx, [esp + 8]
push eax
push ebx
call fcn.004cfe30
add esp, 8
lea esi, [esp + 0x10]
push dword [esp + 8]
push str.cannot_create_socket:__s
push esi
call fcn.004cf170
add esp, 0xc
mov ecx, dword [esp + 0x48]
push esi
call fcn.00533c10
mov eax, dword [esp + 0x10]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x43656f
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x436590
cmp byte [0x5ac048], 0
jns 0x4363e1
call fcn.004ce330
cmp eax, 1
jg 0x4363e1
call dword [sym.imp.msvcrt.dll__errno]
mov ebp, dword [eax]
lea esi, [esp + 0x10]
mov ecx, esi
push 0xffffffffffffffff
push 0
push 1
push 0
push 0x34d
push str.system_core_adb_sysdeps_win32.cpp
call fcn.004ce350
mov ecx, esi
call fcn.004ce340
mov ecx, dword [esp + 0x48]
mov esi, eax
push dword [ecx]
push 0x5788c9
push ebx
call fcn.004cf170
add esp, 0xc
mov eax, dword [esp + 8]
push dword [eax - 0xc]
push eax
push esi
call fcn.0055d520
add esp, 0xc
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4368fa
lea ecx, [esp + 0x10]
jmp 0x43667c
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
lea ebx, [esp + 4]
push eax
push ebx
call fcn.004cfe30
add esp, 8
lea esi, [esp + 8]
push dword [esp + 4]
push str.cannot_set_socket_option_SO_EXCLUSIVEADDRUSE:__s
push esi
call fcn.004cf170
add esp, 0xc
mov ecx, dword [esp + 0x48]
push esi
call fcn.00533c10
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4365be
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x4365dd
cmp byte [0x5ac048], 0
js 0x436604
mov ecx, edi
call fcn.00435990
mov eax, dword [esp + 0x14]
mov esi, 0xffffffff
test eax, eax
je 0x4363ff
lea ecx, [esp + 0x14]
push eax
call fcn.0043b8d0
mov eax, esi
add esp, 0x30
pop esi
pop edi
pop ebx
pop ebp
ret
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
mov eax, dword [esp + 0x24]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov esi, eax
movzx eax, word [esp + 0x22]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx edi, ax
lea eax, [esp + 4]
mov dword [esp + 0x18], ebp
push ebp
push eax
call fcn.004cfe30
add esp, 8
lea ebp, [esp + 8]
push dword [esp + 4]
push edi
push esi
push str.cannot_bind_to__s:_u:__s
push ebp
call fcn.004cf170
add esp, 0x14
mov ecx, dword [esp + 0x48]
push ebp
call fcn.00533c10
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x436733
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x436752
cmp byte [0x5ac048], 0
js 0x436779
mov ecx, dword [esp + 0x18]
jmp 0x4363e3
mov ebp, dword [esp + 0xc]
add eax, 0x10
cmp edi, 0x7f000001
mov ecx, 0x579219
mov edx, 0x57921c
mov edi, 0x578927
cmove edx, ecx
cmp ebx, 1
mov ecx, str.udp:
cmovne edi, ecx
push ebp
push edi
push edx
push esi
push str._d__s_server:_s_d_
push 0x20
push eax
call fcn.00434bb0
add esp, 0x1c
cmp byte [0x5ac048], 0
js 0x43668e
mov dword [esp + 0x14], 0
jmp 0x4363ff
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
lea edi, [esp + 4]
push eax
push edi
call fcn.004cfe30
add esp, 8
lea esi, [esp + 8]
push dword [esp + 4]
push str.cannot_listen_on_socket:__s
push esi
call fcn.004cf170
add esp, 0xc
mov ebp, dword [esp + 0x48]
mov ecx, ebp
push esi
call fcn.00533c10
mov eax, dword [esp + 8]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x43681c
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x43683b
cmp byte [0x5ac048], 0
js 0x436862
mov ecx, ebx
jmp 0x4363e3
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4362db
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x4362db
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4362ee
lea eax, [esp + 4]
push eax
call fcn.00533980
cmp byte [0x5ac048], 0
jns 0x4363e1
jmp 0x4362fb
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4363c1
mov eax, esp
push eax
call fcn.00533980
jmp 0x4363c1
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4363d4
mov eax, esp
push eax
call fcn.00533980
cmp byte [0x5ac048], 0
jns 0x4363e1
call fcn.004ce330
cmp eax, 1
jg 0x4363e1
call dword [sym.imp.msvcrt.dll__errno]
mov ebp, dword [eax]
lea esi, [esp + 8]
mov ecx, esi
push 0xffffffffffffffff
push 0
push 1
push 0
push 0x35b
push str.system_core_adb_sysdeps_win32.cpp
call fcn.004ce350
mov ecx, esi
call fcn.004ce340
mov ecx, dword [esp + 0x48]
mov esi, eax
push dword [ecx]
push 0x5788c9
push ebx
call fcn.004cf170
add esp, 0xc
mov eax, dword [esp + 4]
push dword [eax - 0xc]
push eax
push esi
call fcn.0055d520
add esp, 0xc
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x43691b
lea ecx, [esp + 8]
call fcn.004ce390
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], ebp
jmp 0x4363e1
call fcn.004ce330
cmp eax, 1
jg 0x4364f0
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov edi, ebp
lea ebp, [esp + 8]
mov ecx, ebp
mov dword [esp + 0xc], eax
push 0xffffffffffffffff
push 0
push 1
push 0
push 0x379
push str.system_core_adb_sysdeps_win32.cpp
call fcn.004ce350
mov ecx, ebp
call fcn.004ce340
mov ebp, eax
cmp ebx, 1
mov eax, 0x578907
mov ecx, 0x57890b
cmovne ecx, eax
lea eax, [esp + 4]
push esi
push ecx
push edi
push str.port__d_type__s___fd__d
push eax
call fcn.004cf170
add esp, 0x14
mov eax, dword [esp + 4]
push dword [eax - 0xc]
push eax
push ebp
call fcn.0055d520
add esp, 0xc
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x43693a
lea ecx, [esp + 8]
call fcn.004ce390
call dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [esp + 0xc]
mov dword [eax], ecx
jmp 0x4364f0
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x43647c
mov eax, esp
push eax
call fcn.00533980
jmp 0x43647c
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x43648f
mov eax, esp
push eax
call fcn.00533980
cmp byte [0x5ac048], 0
jns 0x43649c
call fcn.004ce330
cmp eax, 1
jg 0x43649c
call dword [sym.imp.msvcrt.dll__errno]
mov edi, dword [eax]
lea esi, [esp + 8]
mov ecx, esi
push 0xffffffffffffffff
push 0
push 1
push 0
push 0x366
push str.system_core_adb_sysdeps_win32.cpp
call fcn.004ce350
mov ecx, esi
call fcn.004ce340
mov esi, eax
cmp ebx, 1
mov eax, 0x57890b
mov ecx, 0x578907
cmove ecx, eax
mov eax, dword [esp + 0x48]
push dword [eax]
push dword [esp + 0x10]
push ecx
push str.could_not_bind_to__s:_d:__s
lea eax, [esp + 0x14]
push eax
call fcn.004cf170
add esp, 0x14
mov eax, dword [esp + 4]
push dword [eax - 0xc]
push eax
push esi
call fcn.0055d520
add esp, 0xc
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x436959
lea ecx, [esp + 8]
call fcn.004ce390
call dword [sym.imp.msvcrt.dll__errno]
mov dword [eax], edi
jmp 0x43649c
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x436548
mov eax, esp
push eax
call fcn.00533980
jmp 0x436548
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x43655b
mov eax, esp
push eax
call fcn.00533980
cmp byte [0x5ac048], 0
jns 0x436568
call fcn.004ce330
cmp eax, 1
jg 0x436568
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
lea esi, [esp + 8]
mov ecx, esi
mov dword [esp + 0x18], eax
push 0xffffffffffffffff
push 0
push 1
push 0
push 0x370
push str.system_core_adb_sysdeps_win32.cpp
call fcn.004ce350
mov ecx, esi
call fcn.004ce340
mov esi, eax
push dword [ebp]
push dword [esp + 0x10]
push 0x57890b
push str.could_not_listen_on__s:_d:__s
push edi
call fcn.004cf170
add esp, 0x14
mov eax, dword [esp + 4]
push dword [eax - 0xc]
push eax
push esi
call fcn.0055d520
add esp, 0xc
mov eax, dword [esp + 4]
lea ecx, [eax - 0xc]
cmp ecx, 0x56dff0
jne 0x436978
lea ecx, [esp + 8]
call fcn.004ce390
call dword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [esp + 0x18]
mov dword [eax], ecx
jmp 0x436568
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x43636f
lea eax, [esp + 4]
push eax
call fcn.00533980
jmp 0x43636f
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x436678
mov eax, esp
push eax
call fcn.00533980
jmp 0x436678
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x436719
mov eax, esp
push eax
call fcn.00533980
jmp 0x436719
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x436806
mov eax, esp
push eax
call fcn.00533980
jmp 0x436806
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4368e0
mov eax, esp
push eax
call fcn.00533980
jmp 0x4368e0