Function at 0x56f360
Capabilities:
Access peb ldr_data
Act as tcp client
Check for time delay via gettickcount
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
push 0xffffffffffffffff
push 0x5ab8b7
mov eax, dword fs:[0]
push eax
mov eax, 0x1188
call fcn.00595100
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0x1180], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0x119c]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x11ac]
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor esi, eax
push esi
call fcn.0057862e
xor ecx, ecx
mov eax, 0x80
add esp, 4
mov dword [esp + 0x5c], ecx
mov dword [esp + 0x60], ecx
mov dword [esp + 0x64], ecx
mov dword [esp + 0x68], ecx
mov dword [esp + 0x6c], eax
mov dword [esp + 0x11a4], ecx
mov dword [esp + 0x34], ecx
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], eax
mov ebx, 1
lea eax, [esp + 0x14]
mov byte [esp + 0x11a4], bl
push eax
lea esi, [esp + 0x5c]
mov byte [esp + 0x18], 2
call fcn.00408340
mov edi, dword [sym.imp.WS2_32.dll_htons]
push 0xe
call edi
movzx ecx, ax
lea edx, [esp + 0x18]
push edx
mov ebx, 2
mov dword [esp + 0x1c], ecx
call fcn.00408340
lea eax, [esp + 0x14]
mov ebx, 1
push eax
mov byte [esp + 0x18], bl
call fcn.00408340
lea ecx, [esp + 0x14]
push ecx
mov byte [esp + 0x18], bl
call fcn.00408340
push ebx
call edi
movzx edx, ax
lea eax, [esp + 0x18]
push eax
mov ebx, 2
mov dword [esp + 0x1c], edx
call fcn.00408340
push 0x21
call edi
movzx ecx, ax
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], ecx
call fcn.00408340
mov eax, dword [ebp + 4]
push eax
call dword [sym.imp.WS2_32.dll_htonl]
lea ecx, [esp + 0x18]
push ecx
mov ebx, 4
mov dword [esp + 0x1c], eax
call fcn.00408340
lea edx, [esp + 0x14]
push edx
mov ebx, 1
mov byte [esp + 0x18], 3
call fcn.00408340
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp + 0x10c], 0xfffffc1c
mov eax, dword [0x5fcd20]
mov ecx, 0x5fcd20
mov edx, dword [eax + 0xc]
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x11a4], 2
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x2c], eax
mov byte [esp + 0x11a4], 3
mov eax, dword [0x5fcd20]
mov edx, dword [eax + 0xc]
mov ecx, 0x5fcd20
call edx
add eax, 0x10
mov dword [esp + 0x28], eax
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x80]
lea edx, [esp + 0x28]
mov byte [esp + 0x11ac], 4
call fcn.0056c600
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x138]
add esp, 8
mov esi, eax
or ebp, 0xffffffff
test ecx, ecx
mov dword [esp + 0x70], esi
je 0x56f994
jmp 0x56f568
mov ecx, dword [esp + 0x18]
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x154], 0
jne 0x56f988
xor eax, eax
test ecx, ecx
setne al
test eax, eax
je 0x56f973
mov eax, ecx
mov ecx, dword [ecx]
mov dword [esp + 0x18], ecx
lea edi, [eax + 8]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp ebp, 0xffffffff
mov ebx, eax
mov dword [esp + 0x54], ebx
je 0x56f5ab
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
test esi, esi
jne 0x56f60a
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x56f5d7
mov edx, dword [esp + 0x1c]
or ebp, eax
mov dword [edx + 0x10c], 0xffffdcdb
jmp 0x56f966
push 0x10
push edi
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x56f5f0
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
cmp esi, 0xffffffff
mov ebp, esi
jne 0x56f643
mov edx, dword [esp + 0x1c]
mov dword [edx + 0x10c], 0xffffdcdb
jmp 0x56f966
mov edx, dword [esp + 0x78]
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0x30]
push ecx
push edx
lea eax, [esp + 0x2c]
push eax
push esi
mov ecx, edi
call fcn.0056db70
mov ebp, eax
add esp, 0x14
cmp ebp, 0xffffffff
jne 0x56f643
mov ecx, dword [esp + 0x1c]
mov dword [ecx + 0x10c], 0xffffdcd8
jmp 0x56f966
mov esi, dword [esp + 0x64]
mov edx, dword [esp + 0x5c]
push 0
push esi
push edx
push ebp
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jl 0x56f966
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x154], 0
jne 0x56f988
mov dword [esp + 0x50], 0
or esi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x1388
jae 0x56f966
lea ecx, [ecx]
mov ecx, dword [esp + 0x1c]
xor edi, edi
cmp dword [ecx + 0x154], edi
jne 0x56f73d
push 0x100
lea edx, [esp + 0x94]
push edi
push edx
mov dword [esp + 0x98], edi
call fcn.00580260
mov ecx, dword [esp + 0x98]
add esp, 0xc
mov edx, 1
xor eax, eax
cmp ecx, edi
mov dword [esp + 0x84], edx
mov dword [esp + 0x88], edi
jbe 0x56f6ef
nop
cmp dword [esp + eax*4 + 0x90], ebp
je 0x56f6ef
add eax, edx
cmp eax, ecx
jb 0x56f6e0
cmp eax, ecx
jne 0x56f706
cmp ecx, 0x40
jae 0x56f706
mov dword [esp + eax*4 + 0x90], ebp
add dword [esp + 0x8c], edx
lea eax, [esp + 0x84]
push eax
push edi
push edi
lea ecx, [esp + 0x98]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
cmp esi, edi
jne 0x56f73d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x1388
jb 0x56f690
jmp 0x56f966
cmp esi, 1
jne 0x56f966
xor eax, eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebx
cmp eax, 0x1388
jae 0x56f966
push edi
push 3
lea edx, [esp + 0x50]
push edx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 3
jne 0x56f988
mov eax, dword [esp + 0x49]
mov bl, byte [esp + 0x48]
push eax
call dword [sym.imp.WS2_32.dll_ntohs]
cmp bl, 2
movzx ecx, ax
mov dword [esp + 0x24], ecx
jne 0x56f988
lea edx, [esp + 0x48]
lea ebx, [esi + 2]
push edx
lea esi, [esp + 0x34]
call fcn.00408340
xor ebx, ebx
cmp word [esp + 0x24], bx
je 0x56f966
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x54]
cmp eax, 0x1388
jae 0x56f943
jmp 0x56f7d3
xor ebx, ebx
mov esi, dword [esp + 0x1c]
cmp dword [esi + 0x154], ebx
jne 0x56f943
mov ax, di
add edi, 1
cmp ax, word [esp + 0x24]
mov dword [esp + 0x74], edi
jae 0x56f943
push 0x100
lea ecx, [esp + 0x94]
push ebx
push ecx
mov dword [esp + 0x98], ebx
call fcn.00580260
mov ecx, dword [esp + 0x98]
add esp, 0xc
mov edx, 1
xor eax, eax
cmp ecx, ebx
mov dword [esp + 0x7c], edx
mov dword [esp + 0x80], ebx
jbe 0x56f841
cmp dword [esp + eax*4 + 0x90], ebp
je 0x56f841
add eax, edx
cmp eax, ecx
jb 0x56f832
cmp eax, ecx
jne 0x56f858
cmp ecx, 0x40
jae 0x56f858
mov dword [esp + eax*4 + 0x90], ebp
add dword [esp + 0x8c], edx
lea eax, [esp + 0x7c]
push eax
push ebx
push ebx
lea ecx, [esp + 0x98]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x56f943
cmp eax, 1
jne 0x56f924
cmp dword [esi + 0x154], ebx
jne 0x56f943
push ebx
push 0x1000
lea edx, [esp + 0x19c]
push edx
push ebp
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
jle 0x56f943
mov eax, dword [esp + 0x40]
lea edi, [eax + ebx]
cmp edi, dword [esp + 0x38]
jbe 0x56f8eb
mov ecx, dword [esp + 0x44]
test ecx, ecx
jne 0x56f8c4
mov esi, edi
jmp 0x56f8d1
xor edx, edx
lea eax, [ecx + edi - 1]
div ecx
mov esi, eax
imul esi, ecx
mov ecx, dword [esp + 0x34]
push esi
push ecx
call fcn.005793f3
add esp, 8
test eax, eax
je 0x56f915
mov dword [esp + 0x34], eax
mov dword [esp + 0x38], esi
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x40]
push ebx
lea edx, [esp + 0x198]
push edx
add eax, ecx
push eax
call fcn.0057e7b0
add esp, 0xc
cmp edi, dword [esp + 0x3c]
mov dword [esp + 0x40], edi
jbe 0x56f915
mov dword [esp + 0x3c], edi
movzx edx, word [esp + 0x24]
cmp dword [esp + 0x3c], edx
jae 0x56f93b
mov edi, dword [esp + 0x74]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x54]
cmp eax, 0x1388
jb 0x56f7d1
jmp 0x56f943
mov dword [esp + 0x50], 1
cmp ebp, 0xffffffff
je 0x56f952
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
or ebp, 0xffffffff
cmp dword [esp + 0x50], 0
je 0x56f966
mov eax, dword [esp + 0x1c]
cmp dword [eax + 0x154], 0
je 0x56f97d
cmp dword [esp + 0x18], 0
jne 0x56f560
jmp 0x56f988
push 0x80004005
call fcn.00404550
lea ecx, [esp + 0x30]
push ecx
push eax
call fcn.0056efe0
cmp ebp, 0xffffffff
je 0x56f994
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [esp + 0x11a4], 3
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x56f9bc
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x11a4], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x56f9e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x11a4], 1
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x56fa0c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x34]
test eax, eax
je 0x56fa1d
push eax
call fcn.0057876f
add esp, 4
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x56fa2e
push eax
call fcn.0057876f
add esp, 4
mov ecx, dword [esp + 0x119c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1180]
xor ecx, esp
call fcn.005787fd
add esp, 0x1194
ret 4