Function at 0x56e790
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Check os version
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket
Resolve dns
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
push 0xffffffffffffffff
push 0x5ab927
mov eax, dword fs:[0]
push eax
sub esp, 0xb00
mov eax, dword [0x5f13cc]
xor eax, esp
mov dword [esp + 0xaf8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5f13cc]
xor eax, esp
push eax
lea eax, [esp + 0xb14]
mov dword fs:[0], eax
mov ebp, dword [esp + 0xb24]
mov dword [esp + 0x18], 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 ebx, ebx
mov eax, 0x800
add esp, 4
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
mov dword [esp + 0x94], ebx
mov dword [esp + 0x98], eax
mov dword [esp + 0xb1c], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], eax
xor eax, eax
mov byte [esp + 0xb1c], 1
mov byte [esp + 0x2fc], bl
mov dword [esp + 0x2fd], eax
mov dword [esp + 0x301], eax
mov dword [esp + 0x305], eax
mov word [esp + 0x309], ax
mov byte [esp + 0x30b], al
xor esi, esi
jmp 0x56e870
call fcn.0057863b
cdq
mov ecx, 0x1a
idiv ecx
add esi, 1
add dl, 0x61
cmp esi, 0x10
mov byte [esp + esi + 0x2fb], dl
jb 0x56e870
call fcn.0057863b
cdq
mov ecx, 0x3e8
idiv ecx
lea edi, [esp + 0x84]
mov ecx, ebp
movzx eax, dx
push eax
lea edx, [esp + 0x300]
push edx
mov dword [esp + 0x68], eax
call fcn.0056dd10
mov dword [esp + 0x1c], ebx
mov edi, edi
cmp dword [ebp + 0x154], 0
jne 0x56e961
xor edi, edi
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x154], 0
jne 0x56e94c
mov ecx, dword [ebx + 0x5b5204]
push ecx
call dword [sym.imp.WS2_32.dll_inet_addr]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x56e8f4
test ebp, ebp
jne 0x56e90c
mov edx, dword [ebx + 0x5b5204]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x56e90c
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov ebp, dword [ecx]
mov edx, dword [esp + 0x1c]
lea eax, [edx + edi]
lea esi, [eax + eax*2]
movzx eax, word [edi*2 + 0x5f2954]
add esi, esi
add esi, esi
push eax
mov dword [esp + esi + 0x1ac], ebp
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + esi + 0x1ac], ax
call fcn.0057863b
add edi, 1
cmp edi, 3
mov dword [esp + esi + 0x1a4], eax
jb 0x56e8cf
add dword [esp + 0x1c], 3
mov ebp, dword [esp + 0x18]
add ebx, 4
cmp ebx, 0x24
jb 0x56e8c0
mov ecx, dword [esp + 0x68]
mov edx, dword [esp + 0x6c]
sub esp, 0xc
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x7c]
mov dword [eax + 4], edx
push 0x1b
lea edx, [esp + 0x2f8]
mov dword [eax + 8], ecx
push edx
lea eax, [esp + 0x1b8]
push eax
call fcn.0056fc90
mov dword [ebp + 0x10c], 0xfffffc1c
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
add esp, 0x18
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x40], eax
mov byte [esp + 0xb1c], 2
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x4c], eax
mov byte [esp + 0xb1c], 3
mov edx, dword [0x5fcd20]
mov eax, dword [edx + 0xc]
mov ecx, 0x5fcd20
call eax
add eax, 0x10
mov dword [esp + 0x3c], eax
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x50]
push edx
lea ecx, [esp + 0x60]
lea edx, [esp + 0x48]
mov byte [esp + 0xb24], 4
call fcn.0056c600
add esp, 8
mov dword [esp + 0x74], eax
or edi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [esp + 0x78], eax
lea eax, [esp + 0x1ac]
mov dword [esp + 0x44], 0
mov dword [esp + 0x48], eax
lea esp, [esp]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x78]
cmp eax, 0x7530
jae 0x56ef0d
cmp dword [esp + 0x44], 0
mov ebx, dword [esp + 0x18]
jbe 0x56ea7f
xor esi, esi
cmp dword [ebx + 0x154], 0
jne 0x56ef0d
push 0x32
call dword [sym.imp.KERNEL32.dll_Sleep]
add esi, 1
cmp esi, 0xa
jb 0x56ea62
cmp dword [ebx + 0x154], 0
jne 0x56ef0d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp edi, 0xffffffff
mov ebp, eax
mov dword [esp + 0x5c], ebp
je 0x56eaa4
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
mov dword [esp + 0x2ee], eax
mov dword [esp + 0x2f2], eax
mov dword [esp + 0x2f6], eax
mov word [esp + 0x2fa], ax
mov eax, dword [esp + 0x48]
mov ecx, dword [eax - 4]
mov dx, word [eax]
mov eax, dword [esp + 0x74]
test eax, eax
mov word [esp + 0x2ec], 2
mov dword [esp + 0x2f0], ecx
mov word [esp + 0x2ee], dx
jne 0x56eb54
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
cmp esi, 0xffffffff
jne 0x56eb16
mov ecx, dword [esp + 0x18]
or edi, eax
mov dword [ecx + 0x10c], 0xffffdcdb
jmp 0x56eedb
push 0x10
lea eax, [esp + 0x2f0]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x56eb36
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
or esi, 0xffffffff
cmp esi, 0xffffffff
mov edi, esi
mov dword [esp + 0x1c], edi
jne 0x56eb96
mov ecx, dword [esp + 0x18]
mov dword [ecx + 0x10c], 0xffffdcdb
jmp 0x56eedb
lea edx, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x5c]
lea ecx, [esp + 0x50]
push ecx
push edx
lea ecx, [esp + 0x4c]
push ecx
push eax
lea ecx, [esp + 0x300]
call fcn.0056db70
mov edi, eax
add esp, 0x14
cmp edi, 0xffffffff
mov dword [esp + 0x1c], eax
jne 0x56eb96
mov edx, dword [esp + 0x18]
mov dword [edx + 0x10c], 0xffffdcd8
jmp 0x56eedb
mov esi, dword [esp + 0x90]
mov eax, dword [esp + 0x88]
push 0
push esi
push eax
push edi
call dword [sym.imp.WS2_32.dll_send]
cmp eax, esi
jl 0x56eedb
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0x154], 0
jne 0x56ef0d
mov dword [esp + 0x54], 0
or esi, 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1388
jae 0x56eedb
lea ebx, [esi + 2]
mov edx, dword [esp + 0x18]
cmp dword [edx + 0x154], 0
jne 0x56ec8d
xor esi, esi
push 0x100
lea eax, [esp + 0xa4]
push esi
push eax
mov dword [esp + 0xa8], esi
call fcn.00580260
mov ecx, dword [esp + 0xa8]
add esp, 0xc
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x7c], ebx
mov dword [esp + 0x80], esi
jbe 0x56ec40
cmp dword [esp + eax*4 + 0xa0], edi
je 0x56ec40
add eax, ebx
cmp eax, ecx
jb 0x56ec31
cmp eax, ecx
jne 0x56ec57
cmp ecx, 0x40
jae 0x56ec57
mov dword [esp + eax*4 + 0xa0], edi
add dword [esp + 0x9c], ebx
lea ecx, [esp + 0x7c]
push ecx
push 0
push 0
lea edx, [esp + 0xa8]
push edx
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jne 0x56ec8d
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1388
jb 0x56ebe9
jmp 0x56eedb
cmp esi, ebx
jne 0x56eedb
xor ebx, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1388
jae 0x56ed3a
push ebx
push 2
lea eax, [esp + 0x28]
push eax
push edi
call dword [sym.imp.WS2_32.dll_recv]
mov esi, 2
cmp eax, esi
jne 0x56eedb
mov eax, dword [esp + 0x20]
cmp ax, bx
je 0x56eedb
cmp dword [esp + 0x2c], esi
movzx ecx, ax
mov dword [esp + 0x64], ecx
jae 0x56ed12
mov edx, dword [esp + 0x28]
push 0x800
push edx
call fcn.005793f3
add esp, 8
cmp eax, ebx
je 0x56ed28
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], 0x800
mov ax, word [esp + 0x64]
mov ecx, dword [esp + 0x28]
mov ebx, esi
mov word [ecx], ax
mov dword [esp + 0x34], ebx
mov dword [esp + 0x30], esi
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.WS2_32.dll_ntohs]
movzx eax, ax
mov dword [esp + 0x20], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, ebp
cmp eax, 0x1388
jae 0x56eeb4
mov ecx, dword [esp + 0x18]
cmp dword [ecx + 0x154], 0
jne 0x56eeb0
mov eax, dword [esp + 0x50]
mov dx, ax
add eax, 1
cmp dx, word [esp + 0x20]
mov dword [esp + 0x50], eax
jae 0x56eeb0
xor esi, esi
push 0x100
lea eax, [esp + 0xa4]
push esi
push eax
mov dword [esp + 0xa8], esi
call fcn.00580260
mov ecx, dword [esp + 0xa8]
mov edx, dword [esp + 0x28]
add esp, 0xc
mov edi, 1
xor eax, eax
cmp ecx, esi
mov dword [esp + 0x68], edi
mov dword [esp + 0x6c], esi
jbe 0x56edc3
cmp dword [esp + eax*4 + 0xa0], edx
je 0x56edc3
add eax, edi
cmp eax, ecx
jb 0x56edb4
cmp eax, ecx
jne 0x56edda
cmp ecx, 0x40
jae 0x56edda
mov dword [esp + eax*4 + 0xa0], edx
add dword [esp + 0x9c], edi
lea ecx, [esp + 0x68]
push ecx
push esi
push esi
lea edx, [esp + 0xa8]
push edx
push edi
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x56eeb0
cmp eax, 1
jne 0x56ee91
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x154], 0
jne 0x56eeb0
mov edx, dword [esp + 0x1c]
push 0
push 0x800
lea ecx, [esp + 0x314]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_recv]
mov ebp, eax
test ebp, ebp
jle 0x56eeb0
lea edi, [ebx + ebp]
cmp edi, dword [esp + 0x2c]
jbe 0x56ee62
mov eax, dword [esp + 0x28]
lea esi, [edi + 0x7ff]
shr esi, 0xb
shl esi, 0xb
push esi
push eax
call fcn.005793f3
add esp, 8
test eax, eax
je 0x56ee86
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], esi
mov edx, dword [esp + 0x28]
push ebp
lea ecx, [esp + 0x310]
push ecx
add ebx, edx
push ebx
call fcn.0057e7b0
mov ebx, edi
add esp, 0xc
cmp ebx, dword [esp + 0x30]
jbe 0x56ee86
mov dword [esp + 0x30], ebx
movzx eax, word [esp + 0x20]
cmp dword [esp + 0x30], eax
jae 0x56eea8
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [esp + 0x5c]
cmp eax, 0x1388
jb 0x56ed4d
jmp 0x56eeb0
mov dword [esp + 0x54], 1
mov dword [esp + 0x34], ebx
mov edi, dword [esp + 0x1c]
cmp edi, 0xffffffff
je 0x56eec7
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
or edi, 0xffffffff
cmp dword [esp + 0x54], 0
je 0x56eedb
mov eax, dword [esp + 0x18]
cmp dword [eax + 0x154], 0
je 0x56eef6
mov eax, dword [esp + 0x44]
add dword [esp + 0x48], 0xc
add eax, 1
cmp eax, 0x1b
mov dword [esp + 0x44], eax
jb 0x56ea40
jmp 0x56ef0d
mov ecx, dword [esp + 0x60]
push ecx
lea edx, [esp + 0x300]
push edx
push eax
lea ecx, [esp + 0x30]
call fcn.0056dfd0
cmp edi, 0xffffffff
je 0x56ef19
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
mov byte [esp + 0xb1c], 3
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x56ef41
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb1c], 2
mov eax, dword [esp + 0x4c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x56ef69
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0xb1c], 1
mov eax, dword [esp + 0x40]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x56ef91
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
test eax, eax
je 0x56efa2
push eax
call fcn.0057876f
add esp, 4
mov eax, dword [esp + 0x88]
test eax, eax
je 0x56efb6
push eax
call fcn.0057876f
add esp, 4
mov ecx, dword [esp + 0xb14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0xaf8]
xor ecx, esp
call fcn.005787fd
add esp, 0xb0c
ret 4