Function at 0x100315e0
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
push ebx
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0xc0]
push edi
xor edi, edi
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0xa
mov dword [ebp - 0x10], edi
mov byte [ebp - 1], 0
test ebx, ebx
je 0x10031b07
cmp dword [ebx], 0xbab1e
jne 0x10031b07
cmp byte [ebx + 0x10f], 0
je 0x10031634
lea eax, [edi + 8]
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [ebp + 0x14]
test esi, esi
jns 0x10031648
pop esi
pop edi
mov eax, 0xa
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 8]
push eax
push ebx
call fcn.100314e0
mov eax, dword [ebp - 8]
add esp, 8
test eax, eax
js 0x10031664
cmp eax, esi
cmovl esi, eax
mov dword [ebp + 0x14], esi
push 0x50
lea eax, [ebp - 0xc0]
push 0
push eax
call fcn.10051710
mov eax, dword [ebx + 4]
xorps xmm0, xmm0
add esp, 0xc
mov dword [ebp - 0x14], eax
movdqu xmmword [ebp - 0x44], xmm0
movdqu xmmword [ebp - 0x34], xmm0
test eax, eax
je 0x100317a2
lea ecx, [ebp - 0x44]
push ecx
push eax
call fcn.10030130
xor esi, esi
add esp, 8
cmp dword [ebp - 0x30], esi
jbe 0x1003178e
lea ebx, [ebx]
mov al, byte [ebp + esi - 0x2c]
xor edi, edi
xor ebx, ebx
test al, 1
je 0x100316c4
lea ebx, [edi + 0x29]
mov edi, 0x300
test al, 2
je 0x1003170b
mov eax, dword [ebp + esi*4 - 0x44]
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x20], eax
push ecx
push 0x1008
push 0xffff
push eax
or ebx, 0x32
mov dword [ebp - 8], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x10031708
cmp dword [ebp - 0x24], 1
jne 0x10031708
push eax
push eax
push eax
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_send]
or edi, 0x10
test di, di
je 0x10031764
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
test ecx, ecx
je 0x1003172b
mov eax, dword [ebp + esi*4 - 0x44]
cmp eax, dword [edx + ecx*8 - 8]
jne 0x1003172b
or word [edx + ecx*8 - 4], di
jmp 0x10031764
cmp ecx, dword [ebp - 0x18]
jb 0x10031754
lea eax, [ebp - 1]
push eax
push 0x64
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.10032150
add esp, 0x10
test eax, eax
jne 0x1003189f
mov ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp + esi*4 - 0x44]
mov dword [edx + ecx*8], eax
mov word [edx + ecx*8 + 4], di
inc ecx
mov dword [ebp - 0x10], ecx
test ebx, ebx
je 0x10031784
push ebx
mov ebx, dword [ebp + 8]
push dword [ebx + 0x100]
push dword [ebp + esi*4 - 0x44]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x100318ab
inc esi
cmp esi, dword [ebp - 0x30]
jb 0x100316b0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0x10]
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10031692
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 0
test esi, esi
je 0x100318ca
mov ebx, dword [ebp + 0xc]
add ebx, 4
movzx eax, word [ebx]
xor esi, esi
test al, 1
mov ecx, 0x29
cmovne esi, ecx
test al, 2
je 0x100317d3
or esi, 4
test al, 4
je 0x10031816
mov eax, dword [ebx - 4]
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x10], eax
push ecx
push 0x1008
push 0xffff
push eax
or esi, 0x32
mov dword [ebp - 0x20], 4
call dword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x10031816
cmp dword [ebp - 0x24], 1
jne 0x10031816
push eax
push eax
push eax
push dword [ebp - 0x10]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp + 8]
push esi
push dword [eax + 0x100]
push dword [ebx - 4]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x100318ab
cmp edi, dword [ebp - 0x18]
jb 0x1003184c
lea eax, [ebp - 1]
push eax
push 0x64
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.10032150
add esp, 0x10
test eax, eax
jne 0x1003189f
mov edx, dword [ebp - 0xc]
mov eax, dword [ebx - 4]
mov dword [edx + edi*8], eax
xor eax, eax
mov word [edx + edi*8 + 4], ax
test byte [ebx], 1
je 0x1003186b
mov eax, 0x300
mov word [edx + edi*8 + 4], ax
test byte [ebx], 2
je 0x1003187a
mov eax, 0x400
or word [edx + edi*8 + 4], ax
test byte [ebx], 4
je 0x10031885
or word [edx + edi*8 + 4], 0x10
mov ecx, dword [ebp - 0x14]
inc edi
mov esi, dword [ebp + 0x10]
inc ecx
add ebx, 8
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], ecx
cmp ecx, esi
jae 0x100318cd
jmp 0x100317bd
pop esi
pop edi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [ebp - 1], 0
je 0x100318be
mov eax, dword [ebp - 0xc]
push eax
call dword [0x1006cc54]
add esp, 4
pop esi
pop edi
mov eax, 4
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0xc]
test edi, edi
jne 0x10031ad6
mov bl, byte [ebp + 0x20]
test bl, bl
je 0x10031a58
mov dword [ebp - 0x18], edi
mov eax, dword [ebp + 8]
push 0
push dword [ebp + 0x14]
add eax, 0x100
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
test esi, esi
je 0x100319be
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp - 0x18]
add ebx, 6
lea eax, [eax + ecx*8]
add eax, 6
mov dword [ebp - 0x14], eax
jmp 0x10031920
movsx eax, word [eax]
lea ecx, [ebp - 0x70]
push ecx
xor esi, esi
mov dword [ebp - 0x24], eax
mov eax, dword [ebx - 6]
push esi
push eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x70], esi
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x1003196d
mov eax, dword [ebp - 0x70]
mov ecx, 1
test al, 0x29
cmovne esi, ecx
test al, 0x32
je 0x10031955
or esi, 4
test al, 4
je 0x1003195c
or esi, 2
cmp dword [ebp + 0x18], 0
je 0x1003196d
test edi, edi
jne 0x1003196d
test eax, eax
je 0x1003196d
inc dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
push 0
push dword [eax + 0x100]
push dword [ebp - 0x20]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test edi, edi
je 0x100319a3
mov eax, dword [ebp - 0x24]
test eax, 0x300
je 0x10031992
or esi, 1
test al, 0x10
je 0x10031999
or esi, 4
test eax, 0x400
je 0x100319a3
or esi, 2
mov eax, dword [ebp - 0x14]
mov word [ebx], si
add eax, 8
add ebx, 8
mov dword [ebp - 0x14], eax
dec dword [ebp + 0x10]
jne 0x10031920
mov edi, dword [ebp - 0x10]
cmp dword [ebp - 8], 0
mov eax, dword [ebp + 8]
je 0x10031a49
mov ebx, dword [eax + 4]
mov dword [ebp - 8], ebx
test ebx, ebx
je 0x10031a49
mov edi, dword [ebp - 0x18]
lea eax, [ebp - 0x44]
push eax
push ebx
call fcn.10030130
xor esi, esi
add esp, 8
cmp dword [ebp - 0x30], esi
jbe 0x10031a39
mov ebx, dword [ebp + 0x18]
nop
lea eax, [ebp - 0x70]
mov dword [ebp - 0x70], 0
push eax
push 0
push dword [ebp + esi*4 - 0x44]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x10031a1b
test ebx, ebx
je 0x10031a1b
test edi, edi
jne 0x10031a1b
cmp dword [ebp - 0x70], edi
je 0x10031a1b
inc dword [ebp - 0x1c]
mov eax, dword [ebp + 8]
push 0
push dword [eax + 0x100]
push dword [ebp + esi*4 - 0x44]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
inc esi
cmp esi, dword [ebp - 0x30]
jb 0x100319f0
mov ebx, dword [ebp - 8]
mov ebx, dword [ebx + 0x10]
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x100319d8
mov edi, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
push dword [eax + 0x100]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov bl, byte [ebp + 0x20]
cmp byte [ebp - 1], 0
je 0x10031a6a
push dword [ebp - 0xc]
call dword [0x1006cc54]
add esp, 4
mov eax, dword [ebp + 0x18]
test eax, eax
je 0x10031a76
mov ecx, dword [ebp - 0x1c]
mov dword [eax], ecx
cmp byte [ebp + 0x1c], 0
je 0x10031acd
test edi, edi
jne 0x10031acd
test bl, bl
jne 0x10031acd
mov eax, dword [ebp + 8]
mov dword [ebp - 8], edi
cmp dword [eax], 0xbab1e
jne 0x10031acd
cmp byte [eax + 0x10f], bl
jne 0x10031acd
lea ecx, [ebp - 8]
push ecx
push eax
call fcn.100314e0
add esp, 8
test eax, eax
jne 0x10031acd
mov eax, dword [ebp - 8]
test eax, eax
je 0x10031acd
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
jg 0x10031ac0
test eax, eax
cmovs eax, ecx
mov ecx, eax
mov eax, ecx
cdq
push edx
push eax
call fcn.10037ff0
add esp, 8
pop esi
pop edi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push edi
push edx
call fcn.10037c10
mov ebx, eax
add esp, 0x10
mov dword [ebp - 0x18], ebx
test ebx, ebx
jns 0x10031af9
pop esi
pop edi
mov eax, 0xc
pop ebx
mov esp, ebp
pop ebp
ret
jle 0x100318e3
mov dword [ebp - 0x1c], ebx
jmp 0x100318fb
pop edi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret