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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0
mov eax, dword [0x59e080]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
xor ecx, ecx
push ebx
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc0], eax
lea eax, [ebp - 0x68]
mov dword [ebp - 0xa8], esi
mov dword [ebp - 0xb4], ecx
mov dword [ebp - 0xb8], ecx
mov dword [ebp - 0xb0], eax
mov byte [ebp - 0x99], cl
push edi
test esi, esi
je 0x522ec9
cmp dword [esi], 0xbab1e
jne 0x522ec9
cmp byte [esi + 0xe2], cl
je 0x522860
push 8
pop eax
jmp 0x522ecc
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jns 0x52286b
push 0xa
jmp 0x52285a
mov edi, dword [esi + 4]
test edi, edi
je 0x5228e9
mov esi, ecx
lea eax, [ebp - 0x18]
push eax
push edi
call fcn.00521819
pop ecx
pop ecx
mov dword [ebp - 0x98], eax
xor edx, edx
mov ebx, eax
or dword [ebp - 0xac], 0xffffffff
xor eax, eax
inc eax
mov ecx, edx
shl eax, cl
test ebx, eax
je 0x5228ae
cmp dword [ebp + edx*4 - 0x18], 0xffffffff
jae 0x5228ae
mov eax, dword [ebp + edx*4 - 0x18]
inc esi
mov dword [ebp - 0xac], eax
xor eax, eax
lea ecx, [edx + 0x10]
inc eax
shl eax, cl
test ebx, eax
je 0x5228c4
cmp dword [ebp + edx*4 - 0x18], 0xffffffff
jae 0x5228c4
inc esi
jmp 0x5228cd
cmp dword [ebp - 0xac], 0xffffffff
je 0x5228d3
inc edx
cmp edx, 5
jb 0x52288a
mov edi, dword [edi + 4]
mov dword [ebp - 0xb4], esi
test edi, edi
jne 0x522874
mov esi, dword [ebp - 0xa8]
mov ebx, dword [ebp + 0x14]
lea eax, [ebp - 0x98]
push eax
push esi
call fcn.00522739
mov eax, dword [ebp - 0x98]
pop ecx
pop ecx
test eax, eax
js 0x52290a
cmp eax, ebx
cmovl ebx, eax
mov dword [ebp + 0x14], ebx
mov eax, dword [ebp + 0x10]
add eax, dword [ebp - 0xb4]
cmp byte [ebp + 0x20], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x522949
mov eax, ecx
shl eax, 3
push eax
call dword [0x59e138]
mov ebx, eax
mov dword [ebp - 0xb0], ebx
pop ecx
test ebx, ebx
jne 0x522942
push 3
jmp 0x52285a
mov byte [ebp - 0x99], 1
xor edi, edi
mov dword [ebp - 0xa0], edi
cmp dword [ebp - 0xb4], edi
je 0x522a78
mov eax, dword [esi + 4]
mov dword [ebp - 0x98], eax
test eax, eax
je 0x522a78
lea ecx, [ebp - 0x18]
push ecx
push eax
call fcn.00521819
pop ecx
pop ecx
mov dword [ebp - 0xac], eax
xor edi, edi
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0xa4], ecx
inc edx
mov ecx, edi
or ebx, 0xffffffff
shl edx, cl
test eax, edx
je 0x5229d4
cmp dword [ebp + edi*4 - 0x18], 0xffffffff
jae 0x5229d4
mov ecx, dword [ebp - 0xa0]
mov esi, 0x300
mov eax, dword [ebp - 0xb0]
mov ebx, dword [ebp + edi*4 - 0x18]
push 0x29
pop edx
mov word [eax + ecx*8 + 4], si
mov esi, dword [ebp - 0xa8]
mov dword [eax + ecx*8], ebx
inc ecx
mov dword [ebp - 0xa4], edx
mov dword [ebp - 0xa0], ecx
jmp 0x5229da
mov edx, dword [ebp - 0xa4]
xor eax, eax
lea ecx, [edi + 0x10]
inc eax
shl eax, cl
test dword [ebp - 0xac], eax
je 0x522a2a
cmp dword [ebp + edi*4 - 0x18], 0xffffffff
jae 0x522a2a
mov ebx, dword [ebp + edi*4 - 0x18]
xor eax, eax
push eax
push eax
push eax
or edx, 0x32
push ebx
mov dword [ebp - 0xa4], edx
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [ebp - 0xa0]
mov eax, dword [ebp - 0xb0]
push 0x10
pop edx
mov dword [eax + ecx*8], ebx
mov word [eax + ecx*8 + 4], dx
inc ecx
mov dword [ebp - 0xa0], ecx
jmp 0x522a2f
cmp ebx, 0xffffffff
je 0x522a5b
mov ecx, dword [ebp - 0xa4]
push ecx
push dword [esi + 0xdc]
push ebx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x522b0a
mov eax, dword [ebp - 0xac]
inc edi
cmp edi, 5
jb 0x522982
mov eax, dword [ebp - 0x98]
mov eax, dword [eax + 4]
mov dword [ebp - 0x98], eax
test eax, eax
jne 0x52296e
mov edi, dword [ebp - 0xa0]
and dword [ebp - 0xac], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp - 0xb0]
jbe 0x522bcf
mov edx, dword [ebp - 0xbc]
lea eax, [ebx + 4]
lea eax, [eax + edi*8]
add edx, 4
mov dword [ebp - 0x98], eax
mov dword [ebp - 0xa8], edx
movzx edx, word [edx]
mov al, dl
and al, 1
movzx ecx, al
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov dword [ebp - 0xa0], ecx
or dword [ebp - 0xa0], 4
test dl, 2
mov eax, dword [ebp - 0xa0]
cmove eax, ecx
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0xa8]
add eax, 0xfffffffc
mov dword [ebp - 0xa4], eax
test dl, 4
je 0x522b23
or dword [ebp - 0xa0], 0x32
xor ecx, ecx
push ecx
push ecx
push ecx
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [ebp - 0xa4]
jmp 0x522b29
cmp byte [ebp - 0x99], 0
je 0x522bf6
mov eax, dword [ebp - 0xb0]
push eax
jmp 0x522bef
mov dword [ebp - 0xa4], eax
push dword [ebp - 0xa0]
push dword [esi + 0xdc]
push dword [eax]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x522be5
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x98]
mov edx, dword [ebp - 0xa8]
mov eax, dword [eax]
mov dword [ecx - 4], eax
xor eax, eax
mov word [ecx], ax
test byte [edx], 1
je 0x522b6e
mov eax, 0x300
mov word [ecx], ax
test byte [edx], 2
movzx ebx, ax
mov dword [ebp - 0x98], ebx
mov ebx, dword [ebp - 0xb0]
je 0x522b8f
or eax, 0x400
mov word [ecx], ax
movzx eax, ax
jmp 0x522b95
mov eax, dword [ebp - 0x98]
test byte [edx], 4
je 0x522ba0
or eax, 0x10
mov word [ecx], ax
mov eax, dword [ebp - 0xac]
inc edi
add ecx, 8
mov dword [ebp - 0xa0], edi
inc eax
mov dword [ebp - 0x98], ecx
add edx, 8
mov dword [ebp - 0xac], eax
mov dword [ebp - 0xa8], edx
cmp eax, dword [ebp + 0x10]
jb 0x522aaa
test edi, edi
jne 0x522bfd
cmp byte [ebp + 0x20], 0
je 0x522e52
mov dword [ebp - 0xac], edi
jmp 0x522c17
cmp byte [ebp - 0x99], 0
je 0x522bf6
push ebx
call dword [0x59e13c]
pop ecx
push 4
jmp 0x52285a
push 0
push 0
push edi
push ebx
call fcn.0053919f
mov edi, eax
add esp, 0x10
mov dword [ebp - 0xac], edi
test edi, edi
jg 0x522c2f
push 0
push dword [ebp + 0x14]
lea eax, [esi + 0xdc]
push 0
push eax
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
jmp 0x522c3b
mov dword [ebp - 0xb8], edi
mov dword [ebp - 0xac], edi
xor eax, eax
mov dword [ebp - 0xa4], eax
cmp dword [ebp + 0x10], eax
jbe 0x522d93
mov ecx, dword [ebp - 0xb4]
mov edx, dword [ebp - 0xbc]
lea ecx, [ecx*8 + 6]
add ecx, ebx
mov dword [ebp - 0x98], ecx
movsx ecx, word [ecx]
xor ebx, ebx
and dword [ebp - 0x94], ebx
mov dword [ebp - 0xa8], ecx
lea ecx, [ebp - 0x94]
push ecx
push ebx
push dword [edx + eax*8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x522ce6
test byte [ebp - 0x94], 0x29
setne al
movzx edx, ax
mov eax, edx
or eax, 4
test byte [ebp - 0x94], 0x32
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test byte [ebp - 0x94], 4
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [ebp - 0xc0], 0
movzx eax, cx
mov ebx, eax
je 0x522ce6
test edi, edi
jg 0x522ce6
cmp dword [ebp - 0x94], 0
je 0x522ce6
inc dword [ebp - 0xb8]
mov eax, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0xbc]
push 0
push dword [esi + 0xdc]
push dword [ecx + eax*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test edi, edi
jle 0x522d68
mov edx, dword [ebp - 0xa8]
mov eax, 0x300
and edx, eax
mov eax, ebx
or eax, 1
test edx, edx
movzx ecx, ax
movzx eax, bx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 4
test byte [ebp - 0xa8], 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
test dword [ebp - 0xa8], 0x400
movzx ecx, ax
mov eax, edx
mov edx, dword [ebp - 0xbc]
cmove ecx, eax
mov eax, dword [ebp - 0xa4]
mov word [edx + eax*8 + 6], cx
jmp 0x522d74
mov eax, dword [ebp - 0xa4]
mov edx, dword [ebp - 0xbc]
mov ecx, dword [ebp - 0x98]
inc eax
add ecx, 8
mov dword [ebp - 0xa4], eax
mov dword [ebp - 0x98], ecx
cmp eax, dword [ebp + 0x10]
jb 0x522c67
cmp dword [ebp - 0xb4], 0
je 0x522e40
mov ebx, dword [esi + 4]
jmp 0x522e32
lea eax, [ebp - 0x18]
push eax
push ebx
call fcn.00521819
mov ebx, dword [ebp - 0xac]
xor edi, edi
pop ecx
pop ecx
mov dword [ebp - 0xa8], eax
xor edx, edx
mov ecx, edi
inc edx
shl edx, cl
lea ecx, [edi + 0x10]
bts edx, ecx
test eax, edx
je 0x522e29
and dword [ebp - 0x94], 0
lea eax, [ebp - 0x94]
push eax
push 0
push dword [ebp + edi*4 - 0x18]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x522e0b
cmp dword [ebp - 0xc0], eax
je 0x522e0b
test ebx, ebx
jg 0x522e0b
cmp dword [ebp - 0x94], eax
je 0x522e0b
inc dword [ebp - 0xb8]
push 0
push dword [esi + 0xdc]
push dword [ebp + edi*4 - 0x18]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
mov eax, dword [ebp - 0xa8]
inc edi
cmp edi, 5
jb 0x522dc2
mov ebx, dword [ebp - 0x98]
mov ebx, dword [ebx + 4]
mov dword [ebp - 0x98], ebx
test ebx, ebx
jne 0x522da8
push dword [esi + 0xdc]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov edi, dword [ebp - 0xa0]
cmp byte [ebp - 0x99], 0
je 0x522e69
mov eax, dword [ebp - 0xb0]
push eax
call dword [0x59e13c]
pop ecx
mov ecx, dword [ebp - 0xc0]
test ecx, ecx
je 0x522e7b
mov eax, dword [ebp - 0xb8]
mov dword [ecx], eax
cmp byte [ebp + 0x1c], 0
je 0x522ec5
test edi, edi
jne 0x522ec5
cmp byte [ebp + 0x20], 0
jne 0x522ec5
and dword [ebp - 0x98], edi
lea eax, [ebp - 0x98]
push eax
push esi
call fcn.0052132b
pop ecx
pop ecx
test eax, eax
jne 0x522ec5
mov eax, dword [ebp - 0x98]
test eax, eax
je 0x522ec5
mov ecx, dword [ebp + 0x14]
cmp eax, ecx
jg 0x522eb9
test eax, eax
jns 0x522ebb
mov eax, ecx
cdq
push edx
push eax
call fcn.00539563
pop ecx
pop ecx
xor eax, eax
jmp 0x522ecc
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0051bf16
leave
ret