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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x23c
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x10484]
push dword [esi + 0x10480]
push dword [esi + 0x1047c]
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x100277ab
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
mov byte [esp + 0x38], 0
mov byte [esp + 0x13], 0
lea ecx, [ecx]
cmp edi, 3
jge 0x10027a79
mov eax, dword [esi + 0x1047c]
mov dword [esp + 0x144], eax
lea eax, [esp + 0x1c]
push eax
push 0
lea eax, [esp + 0x148]
mov dword [esp + 0x148], 1
push eax
push 0
push 0
mov dword [esp + 0x30], 3
mov dword [esp + 0x34], 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jl 0x10027a0a
lea eax, [esp + 0x140]
push eax
push dword [esi + 0x1047c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10027a0a
push 0
push 0
lea eax, [esp + 0x40]
mov dword [esp + 0x38], 1
push 0
mov dword [esp + 0x40], eax
lea eax, [esp + 0x20]
push eax
push 1
lea eax, [esp + 0x44]
push eax
push dword [esi + 0x1047c]
call dword [sym.imp.WS2_32.dll_WSASend]
cmp eax, 0xffffffff
je 0x10027a16
push 0
push dword [esp + 0x18]
lea ecx, [esi + 0x378]
call fcn.10013b50
add esp, 8
cmp dword [esp + 0x14], 0xffffffff
je 0x10027a10
mov eax, dword [esi + 0x1047c]
mov dword [esp + 0x144], eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0
lea eax, [esp + 0x14c]
mov dword [esp + 0x14c], 1
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 1
jl 0x10027a39
lea eax, [esp + 0x140]
push eax
push dword [esi + 0x1047c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x10027a39
push 0
push 0
lea eax, [esp + 0x40]
mov dword [esp + 0x30], 0x106
mov dword [esp + 0x34], eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x30], 0
push eax
push 1
lea eax, [esp + 0x3c]
push eax
push dword [esi + 0x1047c]
call dword [sym.imp.WS2_32.dll_WSARecv]
cmp eax, 0xffffffff
je 0x100279f3
push 0
push dword [esp + 0x1c]
lea ecx, [esi + 0x378]
call fcn.10013b50
mov eax, dword [esp + 0x20]
add esp, 8
cmp eax, 0xffffffff
je 0x100279f3
cmp eax, 2
jl 0x10027a39
cmp byte [esp + 0x38], 0x80
jne 0x10027a39
cmp byte [esp + 0x39], 0
jne 0x10027a6d
cmp eax, 0x24
jne 0x10027a2d
xor eax, eax
movzx ecx, word [esp + 0x5a]
mov dword [esi + 0x103dc], eax
mov edi, 4
mov dword [esi + 0x103e0], eax
movzx eax, word [esp + 0x43]
mov word [esi + 0x103dc], ax
movzx eax, word [esp + 0x45]
mov word [esi + 0x103de], ax
movzx eax, word [esp + 0x47]
mov word [esi + 0x103e0], ax
mov al, byte [esp + 0x49]
and al, 1
mov dword [esi + 0x10510], ecx
mov byte [esi + 0x10544], al
mov eax, dword [esp + 0x4a]
mov dword [esi + 0x10548], eax
mov eax, dword [esp + 0x4e]
mov dword [esi + 0x1054c], eax
mov eax, dword [esp + 0x52]
mov dword [esi + 0x10550], eax
mov eax, dword [esp + 0x56]
mov dword [esi + 0x10554], eax
cmp ecx, 0x44
jae 0x100279eb
mov dword [esi + 0x10510], 0x44
mov al, 1
mov byte [esp + 0x13], al
jmp 0x10027a3d
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x10027a7e
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x32
call ebx
mov al, byte [esp + 0x13]
jmp 0x10027a43
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2746
jne 0x10027a7e
push 0x32
call ebx
mov al, byte [esp + 0x13]
jmp 0x10027a43
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov al, byte [esp + 0x13]
jmp 0x10027a43
mov al, byte [esp + 0x13]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
test al, al
je 0x100277c0
push 0
push 1
push 0
push dword [esi + 0x1047c]
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 0x105b0], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0xaa
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 0x274c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret