Function at 0x41e380
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x169c
call fcn.00414360
mov eax, dword [0x43e268]
xor eax, ebp
mov dword [ebp - 0x10], eax
push 0
call fcn.0041a650
add esp, 4
mov dword [ebp - 0x1590], eax
mov dword [ebp - 0x158c], edx
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x1480]
call fcn.00401550
push 0x1370
push 0
lea eax, [ebp - 0x1480]
push eax
call fcn.00409ed0
add esp, 0xc
mov ecx, 2
mov word [ebp - 0x14c], cx
push 0x35
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x14a], ax
movzx edx, byte [0x44b43d]
cmp edx, 2
jne 0x41e409
mov eax, dword [0x4415b4]
mov dword [ebp - 0x148], eax
jmp 0x41e415
mov ecx, dword [0x4415b8]
mov dword [ebp - 0x148], ecx
push 0x11
push 2
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [ebp - 0x150], eax
lea edx, [ebp - 0x147c]
mov dword [ebp - 0x1480], edx
push 1
call dword [sym.imp.WS2_32.dll_htons]
mov ecx, dword [ebp - 0x1480]
mov word [ecx + 4], ax
push 0
push 0xffff
mov edx, dword [ebp - 0x158c]
push edx
mov eax, dword [ebp - 0x1590]
push eax
call fcn.004119d0
mov ecx, dword [ebp - 0x1480]
mov word [ecx], ax
mov edx, dword [ebp - 0x1480]
add edx, 0xc
mov dword [ebp - 0x47c], edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x47c]
push ecx
call fcn.0041d2e0
add esp, 8
movzx edx, ax
add edx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], edx
push 6
mov eax, dword [ebp - 0x47c]
push eax
call fcn.0041a0d0
add esp, 8
movzx ecx, al
add ecx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], ecx
push 1
mov edx, dword [ebp - 0x47c]
push edx
call fcn.0041a0d0
add esp, 8
movzx eax, al
add eax, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], eax
mov ecx, dword [ebp - 0x47c]
lea edx, [ebp - 0x147c]
sub ecx, edx
mov dword [ebp - 0x124], ecx
push 0x10
lea eax, [ebp - 0x14c]
push eax
push 0
mov ecx, dword [ebp - 0x124]
push ecx
lea edx, [ebp - 0x147c]
push edx
mov eax, dword [ebp - 0x150]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jg 0x41e572
mov ecx, dword [ebp - 0x150]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [ebp - 0x148]
push edx
lea eax, [ebp - 0x1690]
push eax
call fcn.004198c0
add esp, 8
push eax
push str.Failed_to_send_request_to_Primary_Server__s
lea ecx, [ebp - 0x110]
push ecx
call fcn.00407379
add esp, 0xc
push 1
lea edx, [ebp - 0x110]
push edx
call fcn.0041b050
add esp, 8
xor eax, eax
jmp 0x41e8bb
mov dword [ebp - 0x1588], 0
mov dword [ebp - 0xc], 3
mov dword [ebp - 8], 0
mov dword [ebp - 0x1694], 0
jmp 0x41e5a5
mov eax, dword [ebp - 0x1694]
add eax, 1
mov dword [ebp - 0x1694], eax
mov ecx, dword [ebp - 0x1694]
cmp ecx, dword [ebp - 0x1588]
jae 0x41e5cc
mov edx, dword [ebp - 0x1694]
mov eax, dword [ebp + edx*4 - 0x1584]
cmp eax, dword [ebp - 0x150]
jne 0x41e5ca
jmp 0x41e5cc
jmp 0x41e596
mov ecx, dword [ebp - 0x1694]
cmp ecx, dword [ebp - 0x1588]
jne 0x41e605
cmp dword [ebp - 0x1588], 0x40
jae 0x41e605
mov edx, dword [ebp - 0x1694]
mov eax, dword [ebp - 0x150]
mov dword [ebp + edx*4 - 0x1584], eax
mov ecx, dword [ebp - 0x1588]
add ecx, 1
mov dword [ebp - 0x1588], ecx
xor edx, edx
jne 0x41e58a
lea eax, [ebp - 0xc]
push eax
push 0
push 0
lea ecx, [ebp - 0x1588]
push ecx
push 0xffff
call dword [sym.imp.WS2_32.dll_select]
lea edx, [ebp - 0x1588]
push edx
mov eax, dword [ebp - 0x150]
push eax
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x41e8ab
mov dword [ebp - 0x13c], 0x10
lea ecx, [ebp - 0x13c]
push ecx
lea edx, [ebp - 0x14c]
push edx
push 0
push 0x800
lea eax, [ebp - 0x147c]
push eax
mov ecx, dword [ebp - 0x150]
push ecx
call dword [sym.imp.WS2_32.dll_recvfrom]
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jle 0x41e8ab
mov edx, dword [ebp - 0x1480]
mov al, byte [edx + 2]
shr al, 7
and al, 1
movzx ecx, al
test ecx, ecx
je 0x41e8ab
mov edx, dword [ebp - 0x1480]
mov al, byte [edx + 3]
and al, 0xf
movzx ecx, al
test ecx, ecx
jne 0x41e8ab
mov edx, dword [ebp - 0x1480]
movzx eax, word [edx + 6]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
movzx ecx, ax
test ecx, ecx
je 0x41e8ab
mov edx, dword [ebp - 0x1480]
add edx, 0xc
mov dword [ebp - 0x47c], edx
mov dword [ebp - 0x1698], 1
jmp 0x41e6f9
mov eax, dword [ebp - 0x1698]
add eax, 1
mov dword [ebp - 0x1698], eax
mov ecx, dword [ebp - 0x1480]
movzx edx, word [ecx + 4]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cmp dword [ebp - 0x1698], eax
jg 0x41e752
mov ecx, dword [ebp - 0x47c]
push ecx
mov edx, dword [ebp - 0x1480]
push edx
lea eax, [ebp - 0x1690]
push eax
call fcn.0041a140
add esp, 0xc
movzx ecx, ax
add ecx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], ecx
mov edx, dword [ebp - 0x47c]
add edx, 4
mov dword [ebp - 0x47c], edx
jmp 0x41e6ea
mov dword [ebp - 0x169c], 1
jmp 0x41e76d
mov eax, dword [ebp - 0x169c]
add eax, 1
mov dword [ebp - 0x169c], eax
mov ecx, dword [ebp - 0x1480]
movzx edx, word [ecx + 6]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
cmp dword [ebp - 0x169c], eax
jg 0x41e8ab
mov ecx, dword [ebp - 0x47c]
push ecx
mov edx, dword [ebp - 0x1480]
push edx
lea eax, [ebp - 0x1690]
push eax
call fcn.0041a140
add esp, 0xc
movzx ecx, ax
add ecx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], ecx
mov edx, dword [ebp - 0x47c]
push edx
call fcn.0041a120
add esp, 4
mov word [ebp - 0x11e], ax
mov eax, dword [ebp - 0x47c]
add eax, 2
mov dword [ebp - 0x47c], eax
mov ecx, dword [ebp - 0x47c]
push ecx
call fcn.0041a120
add esp, 4
mov word [ebp - 0x11c], ax
mov edx, dword [ebp - 0x47c]
add edx, 2
mov dword [ebp - 0x47c], edx
mov eax, dword [ebp - 0x47c]
push eax
call fcn.0041a100
add esp, 4
mov ecx, dword [ebp - 0x47c]
add ecx, 4
mov dword [ebp - 0x47c], ecx
mov edx, dword [ebp - 0x47c]
add edx, 2
mov dword [ebp - 0x47c], edx
movzx eax, word [ebp - 0x11e]
cmp eax, 6
jne 0x41e8a6
mov ecx, dword [ebp - 0x47c]
push ecx
mov edx, dword [ebp - 0x1480]
push edx
lea eax, [ebp - 0x1690]
push eax
call fcn.0041a140
add esp, 0xc
movzx ecx, ax
add ecx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], ecx
mov edx, dword [ebp - 0x47c]
push edx
mov eax, dword [ebp - 0x1480]
push eax
lea ecx, [ebp - 0x1690]
push ecx
call fcn.0041a140
add esp, 0xc
movzx edx, ax
add edx, dword [ebp - 0x47c]
mov dword [ebp - 0x47c], edx
mov eax, dword [ebp - 0x47c]
push eax
call fcn.0041a100
add esp, 4
mov dword [ebp - 4], eax
jmp 0x41e75e
mov ecx, dword [ebp - 0x150]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov eax, dword [ebp - 4]
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00406dc0
mov esp, ebp
pop ebp
ret