Function at 0x4052a0
Capabilities:
Create tcp socket
Create udp socket
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
Set socket configuration
Start tcp server

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4e87d1
mov eax, dword fs:[0]
push eax
sub esp, 0x2c0
mov eax, dword [0x529474]
xor eax, esp
mov dword [esp + 0x2b8], eax
push ebx
push esi
push edi
mov eax, dword [0x529474]
xor eax, esp
push eax
lea eax, [esp + 0x2d0]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x2c], edi
xor ebx, ebx
push ebx
push 1
xor eax, eax
xor ecx, ecx
push 2
mov word [esp + 0x70], ax
mov dword [esp + 0x72], ebx
mov dword [esp + 0x76], ebx
mov dword [esp + 0x7a], ebx
mov word [esp + 0x7e], bx
mov word [esp + 0x9c], cx
mov dword [esp + 0x9e], ebx
mov dword [esp + 0xa2], ebx
mov dword [esp + 0xa6], ebx
mov word [esp + 0xaa], bx
mov dword [esp + 0x40], 0xc8
mov dword [0x53e928], 0x3ff1
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [esp + 0x30], esi
cmp esi, 0xffffffff
jne 0x405359
call fcn.00413427
jmp 0x40571e
mov eax, dword [0x534fe0]
inc eax
mov edx, 2
push eax
mov word [esp + 0x68], dx
call dword [sym.imp.WS2_32.dll_htons]
push 0x537200
mov word [esp + 0x6a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [esp + 0x68], eax
mov eax, dword [0x5398f4]
inc eax
mov dword [0x5398f4], eax
cmp eax, 0x22dc
jbe 0x40539d
xor eax, eax
mov dword [0x5398f4], eax
push 4
lea ecx, [esp + 0x38]
push ecx
push 0x1006
and eax, 0x189
push 0xffff
or eax, 0x24
push esi
mov dword [0x53e928], eax
call dword [sym.imp.WS2_32.dll_setsockopt]
push 0x10
lea edx, [esp + 0x68]
push edx
push esi
call dword [sym.imp.WS2_32.dll_bind]
test eax, eax
js 0x40571e
push 0xa
push esi
call dword [sym.imp.WS2_32.dll_listen]
mov eax, dword [0x5398f8]
inc eax
mov dword [0x5398f8], eax
cmp eax, 0x22dc
jbe 0x4053fa
xor eax, eax
mov dword [0x5398f8], eax
and eax, 0x189
or eax, 0x24
mov dword [0x53e928], eax
mov al, byte [edi + 0xd]
test al, al
jne 0x405717
push 0xff
lea ecx, [esp + 0x1c9]
push ebx
push ecx
mov dword [esp + 0x28], ebx
mov byte [esp + 0x1d0], bl
call fcn.00416190
add esp, 0xc
lea edx, [esp + 0x18]
push edx
push 0x8004667e
mov edi, 1
push esi
mov dword [esp + 0x44], 5
mov dword [esp + 0x48], ebx
mov dword [esp + 0x24], edi
call dword [sym.imp.WS2_32.dll_ioctlsocket]
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x94]
push ecx
push esi
mov dword [esp + 0x28], 0x10
call dword [sym.imp.WS2_32.dll_accept]
mov dword [esp + 0x20], eax
cmp eax, 0xffffffff
jne 0x4054e4
lea edx, [esp + 0x38]
push edx
push ebx
lea eax, [esp + 0xc4]
push eax
push ebx
push 0xffffffffffffffff
mov dword [esp + 0xd4], esi
mov dword [esp + 0xd0], edi
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x4054ac
or edi, 0xffffffff
jmp 0x4054e4
lea ecx, [esp + 0x28]
push ecx
lea edx, [esp + 0x28]
push edx
push 0x1007
push 0xffff
push esi
mov dword [esp + 0x38], 0xffffffff
mov dword [esp + 0x3c], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
xor eax, eax
cmp dword [esp + 0x24], ebx
sete al
lea edi, [eax + eax - 1]
lea ecx, [esp + 0x18]
push ecx
push 0x8004667e
push esi
mov dword [esp + 0x24], ebx
call dword [sym.imp.WS2_32.dll_ioctlsocket]
cmp edi, 1
jne 0x4056fe
mov eax, dword [esp + 0x20]
push ebx
push 0xff
lea edx, [esp + 0x1cc]
push edx
push eax
call dword [sym.imp.WS2_32.dll_recv]
lea eax, [esp + 0x1c4]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405525
sub eax, edx
cmp eax, 0xc8
jae 0x4056f3
cmp eax, ebx
jbe 0x4056f3
cmp byte [esp + 0x1c4], 0x23
jne 0x4056a9
lea eax, [esp + 0x1c5]
mov dword [esp + 0x88], 0xf
mov dword [esp + 0x84], ebx
mov byte [esp + 0x74], bl
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405570
sub eax, edx
push eax
lea ecx, [esp + 0x1c9]
push ecx
lea ecx, [esp + 0x7c]
call fcn.00402650
lea edx, [esp + 0x14]
mov dword [esp + 0x2d8], ebx
push edx
lea edi, [esp + 0x78]
mov byte [esp + 0x18], 0x23
call fcn.00405750
cmp eax, 0xffffffff
je 0x405637
cmp dword [esp + 0x88], 0x10
mov ecx, dword [esp + 0x74]
jae 0x4055be
mov ecx, edi
lea edi, [ecx + eax + 1]
mov eax, edi
mov dword [esp + 0xb4], 0xf
mov dword [esp + 0xb0], ebx
mov byte [esp + 0xa0], bl
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4055e0
sub eax, edx
push eax
push edi
lea ecx, [esp + 0xa8]
call fcn.00402650
push 0xffffffffffffffff
push ebx
lea eax, [esp + 0xa8]
push eax
lea ecx, [esp + 0x80]
mov byte [esp + 0x2e4], 1
call fcn.004021a0
mov byte [esp + 0x2d8], bl
cmp dword [esp + 0xb4], 0x10
jb 0x405637
mov ecx, dword [esp + 0xa0]
push ecx
call fcn.0041293d
add esp, 4
push 0xffffffffffffffff
push ebx
lea edx, [esp + 0x7c]
push edx
lea ecx, [esp + 0x50]
mov dword [esp + 0x64], 0xf
mov dword [esp + 0x60], ebx
mov byte [esp + 0x50], bl
call fcn.004021a0
lea eax, [esp + 0x40]
push eax
lea edi, [esp + 0x48]
mov byte [esp + 0x2dc], 2
call fcn.0040dae0
mov edi, 0x10
cmp dword [esp + 0x58], edi
jb 0x405686
mov ecx, dword [esp + 0x44]
push ecx
call fcn.0041293d
add esp, 4
mov dword [esp + 0x2d8], 0xffffffff
cmp dword [esp + 0x88], edi
jb 0x4056f3
mov edx, dword [esp + 0x74]
push edx
call fcn.0041293d
add esp, 4
jmp 0x4056f3
sub esp, 0x1c
mov ecx, esp
lea eax, [esp + 0x1e0]
mov dword [ecx + 0x14], 0xf
mov dword [ecx + 0x10], ebx
mov esi, 1
mov dword [esp + 0x44], esp
mov byte [ecx], bl
lea edi, [eax + 1]
lea ecx, [ecx]
mov dl, byte [eax]
inc eax
cmp dl, bl
jne 0x4056d0
sub eax, edi
push eax
lea eax, [esp + 0x1e4]
push eax
call fcn.00402650
call fcn.00411270
mov esi, dword [esp + 0x4c]
add esp, 0x1c
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.WS2_32.dll_closesocket]
mov edx, dword [esp + 0x2c]
mov al, byte [edx + 0xd]
mov dword [0x53e928], 0x3ff1
test al, al
je 0x405412
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [esp + 0x2d0]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2b8]
xor ecx, esp
call fcn.004123d1
mov esp, ebp
pop ebp
ret