Function at 0x406480
Capabilities:
Get socket status
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x134
mov eax, dword [0x44a008]
xor eax, esp
mov dword [esp + 0x130], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0xc], eax
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, ecx
test eax, eax
je 0x40679e
test esi, esi
jle 0x40679e
cmp dword [edi + 4], 0
jle 0x40679e
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x14]
xor ecx, ecx
or ecx, dword [esp + 0x10]
add ecx, 0x2ac18000
push 0
push 0xa
adc eax, 0xfe624e21
push eax
push ecx
call fcn.00441940
push 0
push 0x3e8
push edx
push eax
call fcn.00441940
xor ebx, ebx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x10], edx
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], ebx
mov eax, dword [edi + 4]
lea ecx, [esp + 0x20]
push ecx
push 0
lea ecx, [esp + 0x38]
mov dword [esp + 0x3c], eax
push ecx
push 0
inc eax
mov dword [esp + 0x40], 1
push eax
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x40672d
lea eax, [esp + 0x30]
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x406512
mov edx, dword [esp + 0x30]
xor eax, eax
test edx, edx
je 0x40658d
mov ecx, dword [edi + 4]
nop
cmp dword [esp + eax*4 + 0x34], ecx
je 0x40656d
inc eax
cmp eax, edx
jb 0x406560
jmp 0x40658d
lea ecx, [edx - 1]
cmp eax, ecx
jae 0x406588
mov ecx, dword [esp + eax*4 + 0x38]
mov dword [esp + eax*4 + 0x34], ecx
inc eax
mov edx, dword [esp + 0x30]
lea ecx, [edx - 1]
cmp eax, ecx
jb 0x406574
dec edx
mov dword [esp + 0x30], edx
mov eax, dword [esp + 0x18]
sub esi, ebx
push 0
push esi
add eax, ebx
push eax
push dword [edi + 4]
call dword [sym.imp.WS2_32.dll_send]
mov esi, eax
test esi, esi
jns 0x40661a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 4
je 0x4065db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0xb
je 0x4065db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x8c
je 0x4065db
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 0x77
jne 0x4066a0
push 0x19a
push str.JCSocket::Send
push str._s_:_d
call fcn.00401070
add esp, 0xc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push esi
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push str.Socket_:_Send_err__s__d_n
call fcn.00401070
mov esi, dword [ebp + 0xc]
add esp, 0xc
jmp 0x406512
add ebx, esi
cmp ebx, dword [ebp + 0xc]
jge 0x406714
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x2c]
xor ecx, ecx
or ecx, dword [esp + 0x28]
add ecx, 0x2ac18000
push 0
push 0xa
adc eax, 0xfe624e21
push eax
push ecx
call fcn.00441940
push 0
push 0x3e8
push edx
push eax
call fcn.00441940
mov ecx, eax
mov esi, edx
mov eax, 0x10624dd3
imul dword [ebp + 0x10]
sar edx, 6
mov eax, edx
shr eax, 0x1f
add eax, edx
cdq
test edx, edx
ja 0x406686
jb 0x40667f
test eax, eax
jne 0x406686
mov eax, 0xa
xor edx, edx
sub ecx, dword [esp + 0x1c]
sbb esi, dword [esp + 0x10]
cmp esi, edx
ja 0x4066e3
jb 0x406698
cmp ecx, eax
jae 0x4066e3
mov esi, dword [ebp + 0xc]
jmp 0x406512
push 0x19f
push str.JCSocket::Send
push str._s_:_d
call fcn.00401070
mov esi, dword [edi + 0xc]
add esp, 0xc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push esi
lea ecx, [edi + 0x24]
push ecx
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push str.Socket_:_Send_err__s___s___d__n
call fcn.00401070
add esp, 0x10
jmp 0x40679e
push 0x1b1
push str.JCSocket::Send
push str._s_:_d
call fcn.00401070
add esp, 0xc
lea eax, [edi + 0x24]
push dword [edi + 0xc]
push eax
push ebx
push str.socket_send_time_out.__d___s___d__n
call fcn.00401070
add esp, 0x10
jmp 0x40679e
mov eax, ebx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x130]
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 0xc
lea esi, [edi + 0x24]
test eax, eax
jne 0x40675f
push 0x1bb
push str.JCSocket::Send
push str._s_:_d
call fcn.00401070
add esp, 0xc
push dword [edi + 0xc]
push esi
push ebx
push str.socket_send_time_out.__d___s___d__n
call fcn.00401070
add esp, 0x10
jmp 0x40679e
push 0x1c0
push str.JCSocket::Send
push str._s_:_d
call fcn.00401070
mov esi, dword [edi + 0xc]
add esp, 0xc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
push esi
lea ecx, [edi + 0x24]
push ecx
push dword [eax]
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_strerror]
add esp, 4
push eax
push ebx
push str.socket_send_select_err___d___s____s___d__n
call fcn.00401070
add esp, 0x14
mov ecx, dword [esp + 0x13c]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0043ffd8
mov esp, ebp
pop ebp
ret 0xc