Function at 0x1000200f
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
mov edi, 0x1005b1e8
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push dword [ebp + 8]
call fcn.10003003
pop ecx
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebx, ebx
cmp esi, ebx
je 0x100022be
cmp dword [esi + 0xb4], ebx
je 0x10002063
mov ecx, dword [esi + 0x8c]
lea eax, [esi + 0x8c]
test cl, 0x20
jne 0x10002063
add ecx, 0x20
mov dword [eax], ecx
jmp 0x100022be
push esi
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
call fcn.10001158
test eax, eax
pop ecx
je 0x1000228a
push 0x10
lea eax, [esi + 0x38]
pop edi
push edi
push ebx
push eax
call fcn.10017bc0
mov dword [ebp - 0xc], edi
mov eax, dword [esi + 0x18]
add esp, 0xc
cmp eax, ebx
jle 0x100020c7
mov ecx, dword [esi + 0x1c]
cmp ecx, ebx
jl 0x100020c7
cmp eax, ecx
jle 0x100022be
add dword [esi + 0x8c], 0x20
push 2
push dword [esi + 4]
push 0x403
push dword [0x1005b218]
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x100022be
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x78]
add eax, 0xa
push ebx
mov dword [esi + 0x7c], eax
mov eax, dword [esi + 0x14]
sub eax, 0xa
push ebx
mov dword [edi], eax
lea eax, [ebp - 0xc]
push eax
lea eax, [esi + 0x38]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
je 0x1000227d
mov eax, dword [ebp - 4]
cmp eax, ebx
jbe 0x1000210c
mov dword [esi + 0x18], eax
push 0x1005b1e8
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0x24]
push 0x1005b1e8
mov dword [ebp + 8], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 8], 3
jne 0x1000213b
push 0x12c
push esi
call fcn.100037a3
pop ecx
pop ecx
cmp dword [esi + 0xb0], ebx
jne 0x10002164
mov eax, dword [esi + 0x3c]
cmp eax, dword [esi + 0x2c]
jne 0x10002164
mov ax, word [esi + 0x3a]
cmp word [esi + 0x2a], ax
je 0x10002164
push 1
mov word [esi + 0x2a], ax
pop eax
mov dword [esi + 0xb0], eax
jmp 0x10002167
push 1
pop eax
mov ecx, dword [esi + 0x3c]
cmp ecx, dword [esi + 0x2c]
jne 0x10002225
mov cx, word [esi + 0x3a]
cmp cx, word [esi + 0x2a]
jne 0x10002225
cmp dword [esi + 0xb0], ebx
jne 0x1000218f
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x38]
push eax
mov eax, dword [esi + 0x10]
add eax, 0xd
push eax
push esi
call fcn.10001e8b
add esp, 0xc
cmp eax, 1
jne 0x100022be
mov eax, dword [esi + 0x10]
add eax, 0xa
push eax
call fcn.100033b9
cmp eax, ebx
pop ecx
mov dword [ebp + 8], eax
jl 0x1000228a
lea ecx, [eax + 0xa]
cmp ecx, dword [esi + 0x14]
jg 0x1000228a
cmp eax, dword [ebp - 4]
jg 0x1000228a
cmp dword [ebp - 4], ebx
jbe 0x1000228a
mov ecx, dword [esi + 0x10]
push ebx
push ebx
lea ecx, [ecx + eax + 0xa]
mov dword [esi + 0x7c], ecx
mov ecx, dword [ebp - 4]
sub ecx, eax
lea eax, [esi + 0x38]
mov dword [edi], ecx
push dword [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push ebx
push eax
push 1
push edi
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
je 0x1000227d
cmp dword [ebp - 4], ebx
jbe 0x1000221d
mov eax, dword [ebp - 8]
add dword [esi + 0x1c], eax
mov eax, dword [esi + 0x18]
sub eax, dword [ebp + 8]
jmp 0x100022a4
mov ecx, dword [esi + 0x10]
push ebx
push ebx
mov byte [ecx + 2], bl
mov ecx, dword [esi + 0x10]
mov byte [ecx + 1], bl
mov ecx, dword [esi + 0x10]
mov byte [ecx], bl
mov ecx, dword [esi + 0x10]
mov byte [ecx + 3], 1
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x3c]
mov dword [ecx + 4], edx
mov ecx, dword [esi + 0x10]
mov dx, word [esi + 0x3a]
mov word [ecx + 8], dx
mov ecx, dword [esi + 0x10]
mov dword [esi + 0x7c], ecx
mov ecx, dword [ebp - 4]
add ecx, 0xa
mov dword [edi], ecx
push dword [ebp - 0xc]
lea ecx, [esi + 0x28]
push ecx
lea ecx, [ebp - 8]
push ebx
push ecx
push eax
push edi
push dword [esi + 4]
call dword [sym.imp.WS2_32.dll_WSASendTo]
cmp eax, 0xffffffff
jne 0x10002294
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x100022be
push dword [esi]
call fcn.10003950
pop ecx
jmp 0x100022be
mov eax, dword [ebp - 8]
cmp eax, ebx
jbe 0x1000229e
add dword [esi + 0x1c], eax
mov eax, dword [esi + 0x18]
add eax, 0xa
cmp dword [esi + 0x1c], eax
jne 0x100022be
push dword [esi + 0x14]
mov dword [esi + 0x1c], ebx
mov dword [esi + 0x18], ebx
push ebx
push dword [esi + 0x10]
call fcn.10017bc0
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret