Function at 0x1008a13
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 0x1008a70
push 0xfffffffffffffffb
pop eax
jmp 0x10090aa
test byte [0x100e2db], 0x80
je 0x1008a93
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 0x1008ad3
cmp ebx, 0x200
jg 0x1008ad3
and dword [ebp - 0x220], 0
jmp 0x1008add
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 0x1008b39
mov eax, dword [0x100e248]
cmp eax, ebx
je 0x1008b0f
push eax
call sub.WSOCK32.dll_closesocket
mov dword [0x100e248], ebx
cmp dword [ebp - 0x220], 0
jne 0x1009098
xor eax, eax
cmp dword [ebp - 0x22c], eax
setne al
lea eax, [eax*4 - 5]
jmp 0x10090aa
mov edi, dword [ebp - 0x234]
xor esi, esi
cmp dword [ebp - 0x220], esi
jne 0x1008cc1
mov eax, dword [0x100e248]
cmp eax, ebx
jne 0x1008b67
push esi
push 2
push 2
call sub.WSOCK32.dll_socket
cmp eax, ebx
mov dword [0x100e248], eax
je 0x1008f05
cmp dword [ebp - 0x224], esi
jne 0x1008b90
push 0x10
lea ecx, [ebp - 0x214]
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, ebx
je 0x1008f1e
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 0x1008f32
mov eax, dword [0x100e2d0]
cmp eax, esi
mov dword [ebp - 0x23c], eax
jg 0x1008bc4
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 0x1008f50
je 0x1008f72
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 0x1008faf
cmp edi, ebx
je 0x1008faf
mov ax, word [ebp - 0x24c]
cmp ax, word [esi]
mov dword [ebp - 0x22c], 1
je 0x1008c6e
test byte [0x100e2db], 0x80
je 0x1008bca
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 0x1008bca
mov al, byte [0x100e2d8]
test al, 0x20
jne 0x1009040
mov ecx, dword [ebp - 0x21c]
test byte [ecx + 2], 2
je 0x1009040
test al, 2
je 0x1008c9b
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 0x1008d38
push esi
push 1
push 2
call sub.WSOCK32.dll_socket
cmp eax, ebx
mov dword [0x100e248], eax
jne 0x1008d09
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008fd0
push 0x100266c
jmp 0x1008f44
push 0x10
lea ecx, [ebp - 0x214]
push ecx
push eax
call sub.WSOCK32.dll_connect
cmp eax, ebx
jne 0x1008d38
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008eef
push 0x100265c
jmp 0x1008ee8
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 0x1008ed5
push esi
push dword [ebp - 0x230]
push edi
push dword [0x100e248]
call sub.WSOCK32.dll_send
cmp eax, ebx
je 0x1008ed5
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 0x1008dbf
sub dword [ebp - 0x218], esi
add edi, esi
cmp word [ebp - 0x218], 0
jne 0x1008d91
cmp esi, ebx
jne 0x1008e15
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
mov esi, eax
je 0x1008ddf
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 0x1008fd0
cmp dword [ebp - 0x240], 0
jne 0x1008fd0
mov dword [ebp - 0x240], 1
jmp 0x1008fd0
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 0x1008e62
test byte [0x100e2d8], 2
je 0x1008e4d
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 0x1008e8e
mov dword [ebp - 0x218], edi
jmp 0x1008e8e
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 0x1008e98
add ebx, esi
sub dword [ebp - 0x218], esi
cmp word [ebp - 0x218], 0
jne 0x1008e6a
cmp esi, 0xffffffff
jne 0x1008fed
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008ebb
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 0x1008fd0
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008eef
push 0x100262c
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
push dword [0x100e248]
call sub.WSOCK32.dll_closesocket
mov dword [0x100e248], ebx
jmp 0x1008fd0
call sub.WSOCK32.dll_WSAGetLastError
test byte [0x100e2d8], 2
je 0x1008fd0
push 0x1002618
jmp 0x1008f44
test byte [0x100e2d8], 2
je 0x1008fd0
push 0x1002610
jmp 0x1008f44
test byte [0x100e2d8], 2
je 0x1008fd0
push 0x1002608
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
jmp 0x1008fd0
test byte [0x100e2d8], 2
je 0x1008f65
push 0x1002600
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
call fcn.010089f6
mov dword [ebp - 0x224], esi
jmp 0x1008fd0
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 0x1008fa7
push dword [ebp - 0x23c]
push 0x10025b4
call esi
pop ecx
pop ecx
mov dword [ebp - 0x22c], edi
jmp 0x1008fd0
test byte [0x100e2d8], 2
je 0x1008fc4
push 0x10025a8
call dword [sym.imp.msvcrt.dll_perror]
pop ecx
call fcn.010089f6
and dword [ebp - 0x224], 0
inc dword [ebp - 0x228]
mov eax, dword [ebp - 0x228]
cmp eax, dword [0x100e2d4]
jl 0x1008b33
jmp 0x1008afa
cmp dword [ebp - 0x244], 0
je 0x1009040
mov eax, dword [ebp - 0x21c]
or byte [eax + 2], 2
mov ecx, edi
sub ecx, dword [ebp + 0x18]
jmp 0x1009035
mov eax, 0x200
cmp cx, ax
ja 0x1009014
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 0x1009040
mov ecx, dword [ebp - 0x218]
sub ecx, eax
test cx, cx
mov dword [ebp - 0x218], ecx
jne 0x1009007
mov eax, dword [0x100e2d8]
test al, 2
je 0x100907a
test eax, eax
jns 0x100905c
push edi
push 0x1002580
call dword [sym.imp.msvcrt.dll_printf]
pop ecx
jmp 0x1009067
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 0x10090aa
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.01009d2e
leave
ret 0x18