Function at 0x41c446
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x34
mov eax, dword [0x5c9550]
xor eax, esp
mov dword [esp + 0x30], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [esp + 0x10], esi
test esi, esi
jne 0x41c47a
push 0x5bb8ff
call sym.TDPlayer.exe_sdk_log_msg
pop ecx
xor eax, eax
jmp 0x41c754
cmp dword [esi + 0x28], 0
jne 0x41c473
mov eax, dword [ebp + 0xc]
or ebx, 0xffffffff
cmp eax, ebx
jne 0x41c65d
push 0
xor edi, edi
inc edi
push edi
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x50], eax
cmp eax, ebx
jne 0x41c4cf
call sym.TDPlayer.exe__sdk_log_buf_lock_0
call sym.TDPlayer.exe__sdk_log_buf_date_0
push 0x3e7
push str..windowsos_win32.c
push str.file:__s_line:__d
call sym.TDPlayer.exe_sdk_log_buf_msg
add esp, 0xc
push 0x5bb8ff
call sym.TDPlayer.exe_sdk_err_buf_msg_unlock
pop ecx
mov eax, dword [esi + 0x50]
lea ecx, [esp + 0x18]
push ecx
push 0x8004667e
push eax
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp eax, ebx
jne 0x41c4f0
call fcn.0041b29d
and dword [esp + 0x14], 0
push 4
lea eax, [esp + 0x18]
push eax
push 0xffffff7f
push 0xffff
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, ebx
jne 0x41c51e
push str.setsockopt_client__connectfd__SOL_SOCKET__SO_DONTLINGER___char_no_linger__sizeof_BOOL____SOCKET_ERROR
call sym.TDPlayer.exe_sdk_log_msg
pop ecx
cmp word [esi + 0x24], 0
mov ebx, dword [sym.imp.WS2_32.dll_htons]
jne 0x41c535
cmp byte [esi + 0x14], 0
je 0x41c5b5
push 2
pop eax
mov word [esp + 0x1c], ax
movzx eax, word [esi + 0x24]
push eax
call ebx
mov word [esp + 0x1e], ax
lea eax, [esi + 0x14]
test eax, eax
je 0x41c559
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
jmp 0x41c561
push 0
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [esp + 0x20], eax
xor eax, eax
lea edi, [esp + 0x24]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
lea eax, [esp + 0x20]
push eax
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x41c5b2
call sym.TDPlayer.exe__sdk_log_buf_lock_0
call sym.TDPlayer.exe__sdk_log_buf_date_0
push 0x3fa
push str..windowsos_win32.c
push str.file:__s_line:__d
call sym.TDPlayer.exe_sdk_log_buf_msg
add esp, 0xc
push 0x5bb8ff
call sym.TDPlayer.exe_sdk_err_buf_msg_unlock
jmp 0x41c472
xor edi, edi
inc edi
push 0x33
push 0x2b11
push dword [0x5ec0d4]
mov dword [esi + 0x28], edi
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_WSAAsyncSelect]
push dword [0x5ec0cc]
call sym.TDPlayer.exe__adt_dlist_lock_4
lea eax, [esp + 0x10]
push eax
push 0
push dword [0x5ec0cc]
call sym.TDPlayer.exe__adt_dlist_insert_12
mov esi, dword [esp + 0x10]
push dword [0x5ec0cc]
mov dword [esi + 0x54], eax
call sym.TDPlayer.exe__adt_dlist_unlock_4
push 2
pop eax
mov word [esp + 0x2c], ax
lea eax, [esi + 2]
push eax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x30], eax
movzx eax, word [esi + 0x12]
push eax
call ebx
mov word [esp + 0x2e], ax
xor eax, eax
lea edi, [esp + 0x34]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
lea eax, [esp + 0x30]
push eax
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x41c751
mov dword [esi + 0x28], 2
cmp dword [esi + 0x30], 0
je 0x41c751
push dword [esi + 0x34]
push esi
call dword [esi + 0x30]
jmp 0x41c751
cmp dword [esi + 0x50], ebx
jne 0x41c468
mov dword [esi + 0x50], eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
mov dword [esi + 0x28], 2
push eax
mov dword [esp + 0x18], 0x10
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_getpeername]
mov edi, dword [sym.imp.WS2_32.dll_ntohs]
cmp eax, ebx
mov ebx, dword [sym.imp.WS2_32.dll_inet_ntoa]
je 0x41c6ba
push dword [esp + 0x1e]
call edi
mov word [esi + 0x12], ax
push dword [esp + 0x20]
call ebx
lea ecx, [esi + 2]
mov dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
test dl, dl
jne 0x41c6ae
jmp 0x41c6e6
call sym.TDPlayer.exe__sdk_log_buf_lock_0
call sym.TDPlayer.exe__sdk_log_buf_date_0
push 0x427
push str..windowsos_win32.c
push str.file:__s_line:__d
call sym.TDPlayer.exe_sdk_log_buf_msg
add esp, 0xc
push 0x5bb8ff
call sym.TDPlayer.exe_sdk_err_buf_msg_unlock
pop ecx
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
mov dword [esp + 0x18], 0x10
push dword [esi + 0x50]
call dword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x41c725
push dword [esp + 0x1e]
call edi
mov word [esi + 0x24], ax
push dword [esp + 0x20]
call ebx
lea ecx, [esi + 0x14]
mov dl, byte [eax]
inc eax
mov byte [ecx], dl
inc ecx
test dl, dl
jne 0x41c719
jmp 0x41c751
call sym.TDPlayer.exe__sdk_log_buf_lock_0
call sym.TDPlayer.exe__sdk_log_buf_date_0
push 0x42f
push str..windowsos_win32.c
push str.file:__s_line:__d
call sym.TDPlayer.exe_sdk_log_buf_msg
add esp, 0xc
push 0x5bb8ff
call sym.TDPlayer.exe_sdk_err_buf_msg_unlock
pop ecx
xor eax, eax
inc eax
mov ecx, dword [esp + 0x3c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00452910
mov esp, ebp
pop ebp
ret 8