Function at 0x403ad0
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x14], 0
mov eax, edi
mov dword [esp + 0x10], 0x10
shl eax, 4
add eax, edi
lea esi, [eax + eax*2]
shl esi, 5
mov eax, dword [esi + 0x41dd30]
test eax, eax
je 0x4040e5
mov eax, dword [esi + 0x41dd48]
mov ebx, dword [esp + 0x3c]
mov ebp, 1
cmp eax, ebp
jne 0x403bf5
mov eax, dword [esi + 0x41dd4c]
test eax, eax
jne 0x403bf5
mov eax, dword [esi + 0x41dd40]
test eax, eax
jbe 0x403bda
mov ecx, dword [esp + 0x34]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x403bda
push 5
mov dword [ebx + 0x14], 0xd2
push edi
mov dword [esi + 0x41dd50], 0
call fcn.004044a0
mov eax, dword [esi + 0x41dd4c]
add esp, 8
cmp eax, ebp
je 0x403b81
lea eax, [esi + 0x41dd30]
push eax
call fcn.004061e0
add esp, 4
mov eax, dword [0x4f3ca8]
mov dword [esi + 0x41dd4c], ebp
test eax, eax
je 0x403bb1
xor edx, edx
lea eax, [esi + 0x41dd6a]
mov dx, word [esi + 0x41dd7a]
push edx
push eax
push edi
push str.VCOM__d_Connect_to__s:_d_OK_n
push edi
push edi
call fcn.00403860
add esp, 0x18
mov edx, dword [esi + 0x41dd40]
lea ecx, [esp + 0x2c]
push 4
push ecx
push 0x80
push 0xffff
push edx
mov word [esp + 0x40], bp
mov word [esp + 0x42], 0
call sub.WS2_32.dll_setsockopt
mov eax, dword [esi + 0x41dd4c]
test eax, eax
jne 0x403bf5
mov eax, dword [esp + 0x30]
mov ecx, dword [esi + 0x41dd40]
push eax
push ecx
call sub.WS2_32.dll___WSAFDIsSet
mov eax, dword [esi + 0x41dd40]
test eax, eax
jbe 0x403f93
mov edx, dword [esp + 0x30]
push edx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x403f93
mov eax, dword [esi + 0x41dd48]
sub eax, 0
je 0x403ea8
dec eax
je 0x403d58
dec eax
jne 0x403f93
mov eax, dword [esi + 0x41dd44]
test eax, eax
je 0x403c95
cmp eax, 0xffffffff
je 0x403c95
lea eax, [esp + 0x10]
mov dword [ebx + 0x14], 0xf2
mov edx, dword [esi + 0x41dd40]
lea ecx, [esp + 0x18]
push eax
push ecx
push edx
call sub.WS2_32.dll_accept
push eax
mov dword [ebx + 0x14], 0xf3
call sub.WS2_32.dll_closesocket
mov dword [ebx + 0x14], 0xf4
mov eax, dword [0x40d294]
test eax, eax
je 0x403f93
push edi
push str.Thead_VCOM__d_Can_NOT_accept_More_connect_in_TCP_S_n
push edi
push edi
call fcn.00403860
add esp, 0x10
jmp 0x403f93
lea eax, [esp + 0x10]
mov dword [ebx + 0x14], 0xf0
mov edx, dword [esi + 0x41dd40]
lea ecx, [esp + 0x18]
push eax
push ecx
push edx
call sub.WS2_32.dll_accept
mov ecx, dword [esp + 0x1e]
mov edx, dword [esp + 0x1d]
mov dword [esi + 0x41dd44], eax
mov eax, dword [esp + 0x1f]
and eax, 0xff
and ecx, 0xff
push eax
mov eax, dword [esp + 0x20]
and edx, 0xff
push ecx
and eax, 0xff
push edx
push eax
lea ecx, [esi + 0x41dd6a]
push str._d._d._d._d
push ecx
mov dword [ebx + 0x14], 0xf1
call dword [sym.imp.MSVCRT.dll_sprintf]
mov edx, dword [esp + 0x32]
add esp, 0x18
push edx
call sub.WS2_32.dll_ntohs
push 7
push edi
mov word [esi + 0x41dd7a], ax
call fcn.004044a0
mov eax, dword [esi + 0x41dd4c]
add esp, 8
cmp eax, ebp
je 0x403d33
lea eax, [esi + 0x41dd30]
push eax
call fcn.004061e0
add esp, 4
mov eax, dword [0x4f3ca8]
mov dword [esi + 0x41dd4c], ebp
test eax, eax
je 0x403f93
mov eax, dword [esi + 0x41dd44]
push eax
push edi
push str.Thead_VCOM__d_accept_new_connect_d_in_TCP_S_n
jmp 0x403f89
cmp dword [esi + 0x41dd4c], ebp
jne 0x403f93
lea ecx, [esp + 0x14]
mov dword [ebx + 0x14], 0xe6
mov edx, dword [esi + 0x41dd40]
push ecx
push 0x4004667f
push edx
call sub.WS2_32.dll_ioctlsocket
mov eax, dword [esp + 0x38]
mov dword [ebx + 0x14], 0xe7
mov ecx, dword [esi + 0x41dd40]
push 0
push 0x5b4
push eax
push ecx
call sub.WS2_32.dll_recv
mov ebp, eax
mov dword [ebx + 0x14], pe_nt_image_headers32
test ebp, ebp
jle 0x403e66
mov ecx, dword [esi + 0x41e38c]
add ecx, ebp
mov dword [esi + 0x41e38c], ecx
mov dword [esi + 0x41dd50], 0
mov eax, dword [esi + 0x41dd9c]
test eax, eax
je 0x403e4d
cmp dword [esi + 0x41dda0], 1
jne 0x403e4d
mov dword [ebx + 0x14], 0xe9
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403dfd
push edi
push ebp
push str.Net_Recv_len_d_TCP_C_Sending_To_VCOM__d_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov edx, dword [esp + 0x38]
mov ecx, dword [esi + 0x41dd9c]
push ebp
push edx
call fcn.004080e0
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403e28
push edi
push ebp
push str.Net_Recv_len_d_TCP_C_Sent_To_VCOM__d_OK_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov dword [ebx + 0x14], 0xea
mov eax, dword [esi + 0x41e384]
push 9
add eax, ebp
push edi
mov dword [esi + 0x41e384], eax
call fcn.004044a0
add esp, 8
jmp 0x403f93
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403f93
push edi
push ebp
push str.Net_Recv_len_d_TCP_C_But_VCOM__d_NOT_Open_n
jmp 0x403f89
mov eax, dword [0x40d294]
test eax, eax
je 0x403e8c
mov eax, dword [esi + 0x41dd40]
push eax
call sub.WS2_32.dll_WSAGetLastError
push eax
push edi
push str.Thead_VCOM__d_recv_error__d__close_main_socket___d__in_TCP_C_n
push edi
push edi
call fcn.00403860
add esp, 0x18
push edi
mov dword [ebx + 0x14], 0xeb
call fcn.00404630
add esp, 4
mov dword [ebx + 0x14], 0xec
jmp 0x403f93
mov eax, dword [esp + 0x38]
lea ecx, [esp + 0x10]
lea edx, [esp + 0x18]
push ecx
push edx
mov dword [ebx + 0x14], 0xdc
mov ecx, dword [esi + 0x41dd40]
push 0
push 0x5b4
push eax
push ecx
call sub.WS2_32.dll_recvfrom
mov ebp, eax
mov dword [ebx + 0x14], 0xdd
test ebp, ebp
jle 0x403f93
mov ecx, dword [esi + 0x41e38c]
add ecx, ebp
mov dword [esi + 0x41e38c], ecx
mov eax, dword [esi + 0x41dd4c]
test eax, eax
jne 0x403f0e
mov dword [esi + 0x41dd4c], 1
mov dword [esi + 0x41dd60], 0
mov eax, dword [esi + 0x41dd9c]
test eax, eax
je 0x403f79
cmp dword [esi + 0x41dda0], 1
jne 0x403f79
mov dword [ebx + 0x14], 0xde
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403f42
push edi
push ebp
push str.Net_Recv_len_d_UDP_Sending_To_VCOM__d_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov edx, dword [esp + 0x38]
mov ecx, dword [esi + 0x41dd9c]
push ebp
push edx
call fcn.004080e0
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403f6d
push edi
push ebp
push str.Net_Recv_len_d_UDP_Sent_To_VCOM__d_OK_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov dword [ebx + 0x14], 0xdf
jmp 0x403e2f
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x403f93
push edi
push ebp
push str.Net_Recv_len_d_UDP_But_VCOM__d_NOT_Open_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov eax, dword [esi + 0x41dd44]
test eax, eax
jbe 0x4040e5
mov ecx, dword [esp + 0x30]
push ecx
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4040e5
cmp dword [esi + 0x41dd48], 2
jne 0x4040e5
mov edx, dword [esp + 0x38]
mov dword [ebx + 0x14], 0xfa
mov eax, dword [esi + 0x41dd44]
push 0
push 0x5b4
push edx
push eax
call sub.WS2_32.dll_recv
mov ebp, eax
mov dword [ebx + 0x14], 0xfb
test ebp, ebp
jle 0x4040a8
mov ecx, dword [esi + 0x41e38c]
add ecx, ebp
mov dword [esi + 0x41e38c], ecx
mov eax, dword [esi + 0x41dd9c]
test eax, eax
je 0x404086
cmp dword [esi + 0x41dda0], 1
jne 0x404086
mov dword [ebx + 0x14], 0xfc
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x404033
push edi
push ebp
push str.Net_Recv_len_d_TCP_S_Sending_To_VCOM__d_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov ecx, dword [esp + 0x38]
push ebp
push ecx
mov ecx, dword [esi + 0x41dd9c]
call fcn.004080e0
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x40405e
push edi
push ebp
push str.Net_Recv_len_d_TCP_S_Sent_To_VCOM__d_OK_n
push edi
push edi
call fcn.00403860
add esp, 0x14
mov dword [ebx + 0x14], 0xfd
mov ebx, dword [esi + 0x41e384]
add ebx, ebp
push 9
push edi
mov dword [esi + 0x41e384], ebx
call fcn.004044a0
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [0x4f3ca8]
test eax, eax
je 0x4040e5
push edi
push ebp
push str.Net_Recv_len_d_TCP_S_But_VCOM__d_NOT_Open_n
push edi
push edi
call fcn.00403860
add esp, 0x14
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret
mov eax, dword [0x40d294]
test eax, eax
je 0x4040ce
mov edx, dword [esi + 0x41dd44]
push edx
call sub.WS2_32.dll_WSAGetLastError
push eax
push edi
push str.Thead_VCOM__d_recv_error__d__close_data_socket___d__in_TCP_S_n
push edi
push edi
call fcn.00403860
add esp, 0x18
push edi
mov dword [ebx + 0x14], 0xfe
call fcn.00404630
add esp, 4
mov dword [ebx + 0x14], 0xff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret