Function at 0x4013f2
Capabilities:
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
jmp 0x4078c0
mov eax, 0x4328
call fcn.00421bb0
push ebx
push ebp
push esi
push edi
lea edi, [esp + 0x4581]
or ecx, 0xffffffff
xor eax, eax
xor ebx, ebx
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x20], 0x10
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], ebx
je 0x40790a
lea eax, [esp + 0x4581]
push eax
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
mov dword [esp + 0x1c], eax
jmp 0x407912
mov dword [esp + 0x1c], 0x200
mov ecx, 0x1001
xor eax, eax
lea edi, [esp + 0x334]
push 0x180
rep stosd dword es:[edi], eax
mov ecx, 0x81
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x4344]
push 0x8302
push ecx
call dword [sym.imp.MSVCRT.dll__open]
add esp, 0xc
mov dword [esp + 0x10], eax
cmp eax, 0xffffffff
mov eax, dword [0x45329c]
jne 0x4079cf
cmp eax, ebx
je 0x407e17
mov esi, dword [esp + 0x858c]
push 0x43297c
push 0x433900
push 0x433900
mov edx, dword [esi + 4]
push 0x433900
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [0x4339cc]
push eax
mov eax, dword [esi + 0x218]
add ecx, 0x13e4
shl eax, 4
add eax, 0x4532a4
push eax
push 1
push 2
call fcn.00401587
mov edx, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov eax, dword [edx + 0x1404]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4328
ret
mov esi, dword [esp + 0x858c]
cmp eax, ebx
je 0x407a3a
mov edx, dword [esi + 4]
push 0x432958
lea ecx, [esp + 0x4344]
push 0x433900
push ecx
push 0x433900
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [0x4339cc]
push eax
mov eax, dword [esi + 0x218]
add ecx, 0x13e4
shl eax, 4
add eax, 0x4532a4
push eax
push 1
push 1
call fcn.00401587
mov edx, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov eax, dword [edx + 0x1404]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ebp, dword [esp + 0x8590]
mov edx, dword [esp + 0x18]
mov ecx, 0x1001
inc edx
xor eax, eax
lea edi, [esp + 0x334]
cmp edx, 0xff
rep stosd dword es:[edi], eax
mov dword [esp + 0x18], edx
mov byte [esp + 0x334], bl
mov byte [esp + 0x335], 4
jg 0x407ae3
mov byte [esp + 0x336], bl
mov byte [esp + 0x337], dl
mov eax, dword [0x453294]
lea ecx, [esp + 0x24]
push ecx
mov dword [esp + 0x28], eax
push ebx
lea edx, [esp + 0x238]
push ebx
lea eax, [ebp + 1]
push edx
push eax
mov dword [esp + 0x248], ebp
mov dword [esp + 0x244], 1
mov dword [esp + 0x3c], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x407ca9
cmp eax, ebx
jg 0x407af3
jne 0x407c9b
mov eax, dword [esp + 0x14]
mov ecx, dword [0x453298]
inc eax
cmp eax, ecx
mov dword [esp + 0x14], eax
jg 0x407d2c
jmp 0x407a7f
mov byte [esp + 0x337], dl
mov byte [esp + 0x336], dh
jmp 0x407a7f
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x2c]
lea edx, [esp + 0x2c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x20]
push ecx
push esi
push ebx
push 0x204
push edx
push ebp
call dword [sym.imp.WS2_32.dll_recvfrom]
mov edi, eax
cmp edi, 0xffffffff
jne 0x407ba6
cmp dword [0x45329c], ebx
je 0x407b8b
mov ecx, dword [esi + 4]
push 0x432930
lea eax, [esp + 0x4344]
push 0x433900
push eax
push 0x433900
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, dword [esi + 0x218]
push eax
mov eax, dword [0x4339cc]
shl edx, 4
add edx, 0x4532a4
lea ecx, [eax + 0x13e4]
push edx
push 1
push 2
call fcn.00401587
mov ecx, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov edx, dword [ecx + 0x1404]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
mov eax, dword [esp + 0x10]
push eax
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4328
ret
cmp byte [esp + 0x2c], bl
jne 0x407a7f
cmp byte [esp + 0x2d], 3
jne 0x407a7f
lea edx, [esp + 0x336]
lea ecx, [esp + 0x2e]
mov ax, word [edx]
cmp ax, word [ecx]
jne 0x407a7f
mov eax, dword [esp + 0x10]
lea ecx, [edi - 4]
lea edx, [esp + 0x30]
push ecx
push edx
push eax
call dword [sym.imp.MSVCRT.dll__write]
add esp, 0xc
mov eax, 0x10
lea ecx, [esp + 0x334]
push eax
push esi
push ebx
push 4
push ecx
push ebp
call dword [sym.imp.WS2_32.dll_sendto]
mov eax, dword [esp + 0x1c]
add edi, 0xfffffffc
cmp edi, eax
mov dword [esp + 0x14], ebx
jge 0x407a41
cmp dword [0x45329c], ebx
je 0x407c7d
mov eax, dword [esi + 4]
push 0x432910
lea edx, [esp + 0x4344]
push 0x433900
push edx
push 0x433900
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [esi + 0x218]
mov edx, dword [0x4339cc]
shl ecx, 4
add ecx, 0x4532a4
push eax
push ecx
push 1
push 1
lea ecx, [edx + 0x13e4]
call fcn.00401587
mov eax, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov ecx, dword [eax + 0x1404]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4328
ret
cmp eax, 0xffffffff
je 0x407daf
jmp 0x407a7f
cmp dword [0x45329c], ebx
je 0x407d11
mov edx, dword [esi + 4]
push 0x4327b0
lea ecx, [esp + 0x4344]
push 0x433900
push ecx
push 0x433900
push edx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [0x4339cc]
push eax
mov eax, dword [esi + 0x218]
add ecx, 0x13e4
shl eax, 4
add eax, 0x4532a4
push eax
push 1
push 2
call fcn.00401587
mov edx, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov eax, dword [edx + 0x1404]
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4328
ret
cmp dword [0x45329c], ebx
je 0x407d94
mov eax, dword [esi + 4]
push 0x4328e8
lea edx, [esp + 0x4344]
push 0x433900
push edx
push 0x433900
push eax
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ecx, dword [esi + 0x218]
mov edx, dword [0x4339cc]
shl ecx, 4
add ecx, 0x4532a4
push eax
push ecx
push 1
push 2
lea ecx, [edx + 0x13e4]
call fcn.00401587
mov eax, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov ecx, dword [eax + 0x1404]
push ecx
call dword [sym.imp.USER32.dll_SendMessageA]
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.MSVCRT.dll__close]
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4328
ret
cmp dword [0x45329c], ebx
je 0x407e17
mov ecx, dword [esi + 4]
push 0x4328c4
lea eax, [esp + 0x4344]
push 0x433900
push eax
push 0x433900
push ecx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov edx, dword [esi + 0x218]
push eax
mov eax, dword [0x4339cc]
shl edx, 4
add edx, 0x4532a4
lea ecx, [eax + 0x13e4]
push edx
push 1
push 2
call fcn.00401587
mov ecx, dword [0x4339cc]
push ebx
push ebx
push 0x80d6
mov edx, dword [ecx + 0x1404]
push edx
call dword [sym.imp.USER32.dll_SendMessageA]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x4328
ret