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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x350
mov eax, dword [0x100e65c]
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x248], eax
xor eax, eax
cmp esi, eax
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x234], edi
mov dword [ebp - 0x230], ebx
mov dword [ebp - 0x22c], eax
mov dword [ebp - 0x224], eax
mov dword [ebp - 0x240], eax
jne 0x1008a84
push 0xfffffffffffffffb
pop eax
jmp 0x10090be
test byte [0x100e2db], 0x80
je 0x1008aa7
push ebx
push 0x10026b0
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
pop ecx
push 1
lea eax, [ebx + edi]
push eax
push edi
call fcn.01005f63
xor eax, eax
mov ax, word [0x100e24c]
mov word [ebp - 0x214], 2
push eax
call sub.WSOCK32.dll_htons
test byte [0x100e2d8], 8
mov word [ebp - 0x212], ax
mov eax, dword [esi]
mov dword [ebp - 0x210], eax
jne 0x1008ae7
cmp ebx, 0x200
jg 0x1008ae7
and dword [ebp - 0x220], 0
jmp 0x1008af1
mov dword [ebp - 0x220], 1
mov ax, word [edi]
and dword [ebp - 0x228], 0
or ebx, 0xffffffff
cmp dword [0x100e2d4], 0
mov word [ebp - 0x24c], ax
jg 0x1008b4d
mov eax, dword [0x100e248]
cmp eax, ebx
je 0x1008b23
push eax
call sub.WSOCK32.dll_closesocket
mov dword [0x100e248], ebx
cmp dword [ebp - 0x220], 0
jne 0x10090ac
xor eax, eax
cmp dword [ebp - 0x22c], eax
setne al
lea eax, [eax*4 - 5]
jmp 0x10090be
mov edi, dword [ebp - 0x234]
xor esi, esi
cmp dword [ebp - 0x220], esi
jne 0x1008cd5
mov eax, dword [0x100e248]
cmp eax, ebx
jne 0x1008b7b
push esi
push 2
push 2
call sub.WSOCK32.dll_socket
cmp eax, ebx
mov dword [0x100e248], eax
je 0x1008f19
cmp dword [ebp - 0x224], esi
jne 0x1008ba4
push 0x10
lea ecx, [ebp - 0x214]
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, ebx
je 0x1008f32
mov dword [ebp - 0x224], 1
push esi
push dword [ebp - 0x230]
push edi
push dword [0x100e248]
call sub.WSOCK32.dll_send
cmp eax, ebx
je 0x1008f46
mov eax, dword [0x100e2d0]
cmp eax, esi
mov dword [ebp - 0x23c], eax
jg 0x1008bd8
mov dword [ebp - 0x23c], 1
mov dword [ebp - 0x238], esi
mov eax, dword [0x100e248]
lea ecx, [ebp - 0x23c]
push ecx
xor esi, esi
push esi
push esi
lea ecx, [ebp - 0x350]
xor edi, edi
push ecx
inc edi
push eax
mov dword [ebp - 0x34c], eax
mov dword [ebp - 0x350], edi
call sub.WSOCK32.dll_select
cmp eax, esi
jl 0x1008f64
je 0x1008f86
push esi
push dword [ebp + 0x18]
mov esi, dword [ebp - 0x21c]
push esi
push dword [0x100e248]
call sub.WSOCK32.dll_recv
mov edi, eax
test edi, edi
je 0x1008fc3
cmp edi, ebx
je 0x1008fc3
mov ax, word [ebp - 0x24c]
cmp ax, word [esi]
mov dword [ebp - 0x22c], 1
je 0x1008c82
test byte [0x100e2db], 0x80
je 0x1008bde
push 0x1002694
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
mov eax, esi
push 1
lea ecx, [eax + edi]
push ecx
push eax
call fcn.01005f63
jmp 0x1008bde
mov al, byte [0x100e2d8]
test al, 0x20
jne 0x1009054
mov ecx, dword [ebp - 0x21c]
test byte [ecx + 2], 2
je 0x1009054
test al, 2
je 0x1008caf
push 0x1002680
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
mov edi, dword [ebp - 0x234]
or ebx, 0xffffffff
mov dword [0x100e248], ebx
mov dword [ebp - 0x220], 1
xor esi, esi
cmp dword [0x100e248], ebx
mov eax, dword [0x100e2d4]
mov dword [ebp - 0x244], esi
mov dword [ebp - 0x228], eax
jne 0x1008d4c
push esi
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, ebx
mov dword [0x100e248], eax
jne 0x1008d1d
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008fe4
push 0x100266c
jmp 0x1008f58
push 0x10
lea ecx, [ebp - 0x214]
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, ebx
jne 0x1008d4c
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008f03
push 0x100265c
jmp 0x1008efc
push dword [ebp - 0x230]
call sub.WSOCK32.dll_htons
push esi
push 2
mov dword [ebp - 0x218], eax
lea eax, [ebp - 0x218]
push eax
push dword [0x100e248]
call sub.WSOCK32.dll_send
cmp eax, ebx
je 0x1008ee9
push esi
push dword [ebp - 0x230]
push edi
push dword [0x100e248]
call sub.WSOCK32.dll_send
cmp eax, ebx
je 0x1008ee9
mov edi, dword [ebp - 0x21c]
mov dword [ebp - 0x218], 2
movzx eax, word [ebp - 0x218]
push 0
push eax
push edi
push dword [0x100e248]
call sub.WSOCK32.dll_recv
mov esi, eax
test esi, esi
jle 0x1008dd3
sub dword [ebp - 0x218], esi
add edi, esi
cmp word [ebp - 0x218], 0
jne 0x1008da5
cmp esi, ebx
jne 0x1008e29
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
mov esi, eax
je 0x1008df3
push 0x1002650
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
cmp esi, 0x6f
mov dword [0x100e248], ebx
jne 0x1008fe4
cmp dword [ebp - 0x240], 0
jne 0x1008fe4
mov dword [ebp - 0x240], 1
jmp 0x1008fe4
mov ebx, dword [ebp - 0x21c]
xor eax, eax
mov ax, word [ebx]
push eax
call sub.WSOCK32.dll_ntohs
movzx edi, ax
cmp edi, dword [ebp + 0x18]
jbe 0x1008e76
test byte [0x100e2d8], 2
je 0x1008e61
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x100263c
push eax
call dword [sym.imp.msvcrt.dll_fprintf]
pop ecx
pop ecx
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x218], eax
mov dword [ebp - 0x244], 1
jmp 0x1008ea2
mov dword [ebp - 0x218], edi
jmp 0x1008ea2
movzx eax, word [ebp - 0x218]
push 0
push eax
push ebx
push dword [0x100e248]
call sub.WSOCK32.dll_recv
mov esi, eax
test esi, esi
jle 0x1008eac
add ebx, esi
sub dword [ebp - 0x218], esi
cmp word [ebp - 0x218], 0
jne 0x1008e7e
cmp esi, 0xffffffff
jne 0x1009001
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008ecf
push 0x1002650
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
or dword [0x100e248], 0xffffffff
or ebx, 0xffffffff
jmp 0x1008fe4
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008f03
push 0x100262c
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
mov dword [0x100e248], ebx
jmp 0x1008fe4
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008fe4
push 0x1002618
jmp 0x1008f58
test byte [0x100e2d8], 2
je 0x1008fe4
push 0x1002610
jmp 0x1008f58
test byte [0x100e2d8], 2
je 0x1008fe4
push 0x1002608
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
jmp 0x1008fe4
test byte [0x100e2d8], 2
je 0x1008f79
push 0x1002600
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
call fcn.01008a0a
mov dword [ebp - 0x224], esi
jmp 0x1008fe4
mov esi, dword [sym.imp.msvcrt.dll_printf]
push 0x10025e8
call esi
push dword [ebp - 0x23c]
push 0x10025c8
call esi
add esp, 0xc
test byte [0x100e2d8], 2
je 0x1008fbb
push dword [ebp - 0x23c]
push 0x10025b4
call esi
pop ecx
pop ecx
mov dword [ebp - 0x22c], edi
jmp 0x1008fe4
test byte [0x100e2d8], 2
je 0x1008fd8
push 0x10025a8
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
call fcn.01008a0a
and dword [ebp - 0x224], 0
inc dword [ebp - 0x228]
mov eax, dword [ebp - 0x228]
cmp eax, dword [0x100e2d4]
jl 0x1008b47
jmp 0x1008b0e
cmp dword [ebp - 0x244], 0
je 0x1009054
mov eax, dword [ebp - 0x21c]
or byte [eax + 2], 2
mov ecx, edi
sub ecx, dword [ebp + 0x18]
jmp 0x1009049
mov eax, 0x200
cmp cx, ax
ja 0x1009028
movzx eax, cx
push 0
push eax
lea eax, [ebp - 0x204]
push eax
push dword [0x100e248]
call sub.WSOCK32.dll_recv
test eax, eax
jle 0x1009054
mov ecx, dword [ebp - 0x218]
sub ecx, eax
test cx, cx
mov dword [ebp - 0x218], ecx
jne 0x100901b
mov eax, dword [0x100e2d8]
test al, 2
je 0x100908e
test eax, eax
jns 0x1009070
push edi
push 0x1002580
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
jmp 0x100907b
push 0x1002564
call dword [sym.imp.msvcrt.dll_printf]
mov eax, dword [ebp - 0x21c]
pop ecx
push 1
lea ecx, [eax + edi]
push ecx
push eax
call fcn.01005f63
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
mov eax, dword [ebp - 0x248]
or dword [0x100e248], 0xffffffff
mov dword [eax], edi
xor eax, eax
jmp 0x10090be
call sub.WSOCK32.dll_WSAGetLastError
sub eax, 0x72
neg eax
sbb eax, eax
and eax, 2
add eax, 0xfffffffb
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.01009d42
leave
ret 0x18