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

Disassembly:
sub esp, 0xc0
mov eax, dword [0x57f0b4]
xor eax, esp
mov dword [esp + 0xbc], eax
mov eax, dword [esp + 0xc8]
push ebp
push esi
xor ebp, ebp
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0xdc]
lea esi, [esp + 0x74]
push edi
mov edi, dword [esp + 0xd0]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x34], eax
mov dword [esp + 0x30], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x18], esi
mov byte [esp + 0xf], 0
test edi, edi
je 0x4d2005
cmp dword [edi], 0xbab1e
jne 0x4d2005
cmp byte [edi + 0xe2], 0
je 0x4d1a17
pop edi
pop esi
lea eax, [ebp + 8]
pop ebp
mov ecx, dword [esp + 0xbc]
xor ecx, esp
call fcn.00518690
add esp, 0xc0
ret
cmp dword [esp + 0xdc], ebp
jge 0x4d1a3d
pop edi
pop esi
mov eax, 0xa
pop ebp
mov ecx, dword [esp + 0xbc]
xor ecx, esp
call fcn.00518690
add esp, 0xc0
ret
push ebx
mov ebx, dword [edi + 4]
test ebx, ebx
je 0x4d1aa8
lea eax, [esp + 0x68]
push eax
push ebx
call fcn.004d03b0
add esp, 8
mov edi, eax
xor edx, edx
mov eax, 1
nop dword [eax]
or esi, 0xffffffff
test edi, eax
je 0x4d1a73
mov ecx, dword [esp + edx*4 + 0x68]
cmp ecx, 0xffffffff
jae 0x4d1a73
inc ebp
mov esi, ecx
mov ecx, eax
rol ecx, 0x10
test edi, ecx
je 0x4d1a88
mov ecx, dword [esp + edx*4 + 0x68]
cmp ecx, 0xffffffff
jae 0x4d1a88
inc ebp
mov esi, ecx
cmp esi, 0xffffffff
je 0x4d1a95
inc edx
rol eax, 1
cmp edx, 5
jb 0x4d1a60
mov ebx, dword [ebx + 4]
mov dword [esp + 0x34], ebp
test ebx, ebx
jne 0x4d1a45
mov edi, dword [esp + 0x20]
lea esi, [esp + 0x7c]
lea eax, [esp + 0x2c]
push eax
push edi
call fcn.004d1880
mov eax, dword [esp + 0x34]
add esp, 8
test eax, eax
js 0x4d1ad1
mov ecx, dword [esp + 0xe0]
cmp eax, ecx
cmovl ecx, eax
mov dword [esp + 0xe0], ecx
mov eax, dword [esp + 0xdc]
add eax, ebp
cmp byte [esp + 0xec], 0
lea ecx, [eax + 1]
cmove ecx, eax
cmp ecx, 0xa
jbe 0x4d1b29
lea eax, [ecx*8]
push eax
call dword [0x57f060]
mov esi, eax
add esp, 4
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x4d1b24
lea eax, [esi + 3]
pop ebx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0xbc]
xor ecx, esp
call fcn.00518690
add esp, 0xc0
ret
mov byte [esp + 0x13], 1
xor edx, edx
mov dword [esp + 0x18], edx
test ebp, ebp
je 0x4d1c29
mov eax, dword [edi + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4d1c29
lea ecx, [esp + 0x68]
push ecx
push eax
call fcn.004d03b0
add esp, 8
mov dword [esp + 0x24], eax
xor esi, esi
nop word [eax + eax]
mov edx, 1
mov ecx, esi
shl edx, cl
or edi, 0xffffffff
xor ebx, ebx
test eax, edx
mov edx, dword [esp + 0x18]
je 0x4d1b9c
mov eax, dword [esp + esi*4 + 0x68]
cmp eax, 0xffffffff
jae 0x4d1b9c
mov edi, eax
mov ecx, 0x300
mov eax, dword [esp + 0x1c]
mov ebx, 0x29
mov dword [eax + edx*8], edi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x18], edx
lea ecx, [esi + 0x10]
mov eax, 1
shl eax, cl
test dword [esp + 0x24], eax
je 0x4d1be1
mov eax, dword [esp + esi*4 + 0x68]
cmp eax, 0xffffffff
jae 0x4d1be1
push 0
push 0
mov edi, eax
or ebx, 0x32
push 0
push edi
call dword [sym.imp.WS2_32.dll_send]
mov edx, dword [esp + 0x18]
mov ecx, 0x10
mov eax, dword [esp + 0x1c]
mov dword [eax + edx*8], edi
mov word [eax + edx*8 + 4], cx
inc edx
mov dword [esp + 0x18], edx
cmp edi, 0xffffffff
je 0x4d1c12
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xdc]
push edi
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x4d1d2d
mov eax, dword [esp + 0x24]
inc esi
cmp esi, 5
jb 0x4d1b60
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4d1b46
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0xdc], 0
mov dword [esp + 0x14], 0
jbe 0x4d1d0e
lea edi, [esi + 4]
mov esi, dword [esp + 0x30]
lea edi, [edi + edx*8]
add esi, 4
nop dword [eax]
movzx edx, word [esi]
mov al, dl
and al, 1
movzx ecx, al
mov al, dl
neg ecx
sbb ecx, ecx
and ecx, 0x29
mov ebx, ecx
or ebx, 4
and al, 2
cmove ebx, ecx
test dl, 4
je 0x4d1c84
push 0
push 0
push 0
push dword [esi - 4]
or ebx, 0x32
call dword [sym.imp.WS2_32.dll_send]
mov eax, dword [esp + 0x20]
push ebx
push dword [eax + 0xdc]
push dword [esi - 4]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test eax, eax
jne 0x4d1d2d
mov eax, dword [esi - 4]
xor ecx, ecx
mov dword [edi - 4], eax
xor eax, eax
mov word [edi], ax
movzx eax, word [esi]
mov edx, eax
test al, 1
je 0x4d1cc3
mov eax, 0x300
mov word [edi], ax
mov ecx, eax
movzx edx, word [esi]
movzx eax, dx
movzx edx, cx
mov ebx, eax
test al, 2
je 0x4d1cde
or ecx, 0x400
mov word [edi], cx
movzx ebx, word [esi]
movzx edx, cx
test bl, 4
je 0x4d1ce9
or edx, 0x10
mov word [edi], dx
mov eax, dword [esp + 0x14]
add edi, 8
mov edx, dword [esp + 0x18]
inc eax
inc edx
mov dword [esp + 0x14], eax
add esi, 8
mov dword [esp + 0x18], edx
cmp eax, dword [esp + 0xdc]
jb 0x4d1c50
test edx, edx
jne 0x4d1d4b
mov bl, byte [esp + 0xec]
test bl, bl
je 0x4d1f75
mov ebx, dword [esp + 0x1c]
xor edi, edi
mov dword [esp + 0x2c], edi
jmp 0x4d1d63
cmp byte [esp + 0x13], 0
je 0x4d1d41
push dword [esp + 0x1c]
call dword [0x57f064]
add esp, 4
mov eax, 4
jmp 0x4d1b0b
mov ebx, dword [esp + 0x1c]
push 0
push 0
push edx
push ebx
call fcn.004ef5f0
add esp, 0x10
mov dword [esp + 0x2c], eax
mov edi, eax
test edi, edi
jg 0x4d1d85
mov ecx, dword [esp + 0x20]
push 0
push dword [esp + 0xe4]
add ecx, 0xdc
push 0
push ecx
push 1
call dword [sym.imp.WS2_32.dll_WSAWaitForMultipleEvents]
xor ecx, ecx
mov eax, edi
test edi, edi
cmovle eax, ecx
mov dword [esp + 0x28], eax
cmp dword [esp + 0xdc], ecx
jbe 0x4d1eb9
mov dword [esp + 0x28], eax
lea eax, [ebp*8 + 6]
add eax, ebx
xor ebp, ebp
mov dword [esp + 0x14], eax
movsx ebx, word [eax]
xor esi, esi
lea eax, [esp + 0x3c]
mov dword [esp + 0x24], ebx
push eax
mov eax, dword [esp + 0x34]
push esi
mov dword [esp + 0x44], esi
push dword [eax + ebp*8]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x4d1e33
mov ecx, dword [esp + 0x3c]
mov eax, esi
test cl, 0x29
mov ebx, ecx
setne al
movzx edx, ax
mov eax, edx
or eax, 4
and bl, 0x32
mov ebx, dword [esp + 0x3c]
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and bl, 4
movzx ecx, ax
mov eax, edx
cmove ecx, eax
cmp dword [esp + 0x38], 0
movzx eax, cx
mov esi, eax
je 0x4d1e2f
test edi, edi
jg 0x4d1e2f
cmp dword [esp + 0x3c], 0
mov ebx, dword [esp + 0x24]
je 0x4d1e33
inc dword [esp + 0x28]
jmp 0x4d1e33
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xdc]
mov eax, dword [esp + 0x38]
push dword [eax + ebp*8]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
test edi, edi
jle 0x4d1e9c
mov eax, esi
mov edx, ebx
or eax, 1
and edx, 0x300
movzx ecx, ax
movzx eax, si
mov esi, dword [esp + 0x24]
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 4
and bl, 0x10
movzx ecx, ax
mov eax, edx
cmove ecx, eax
movzx edx, cx
mov eax, edx
or eax, 2
and esi, 0x400
movzx ecx, ax
mov eax, edx
cmove ecx, eax
mov eax, dword [esp + 0x30]
mov word [eax + ebp*8 + 6], cx
mov eax, dword [esp + 0x14]
inc ebp
add eax, 8
mov dword [esp + 0x14], eax
cmp ebp, dword [esp + 0xdc]
jb 0x4d1db2
mov ebp, dword [esp + 0x34]
test ebp, ebp
je 0x4d1f5e
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
je 0x4d1f5e
mov ebx, dword [esp + 0x2c]
lea ecx, [esp + 0x68]
push ecx
push eax
call fcn.004d03b0
add esp, 8
mov ebp, eax
xor esi, esi
mov edi, 1
nop
lea ecx, [esi + 0x10]
mov edx, edi
bts edx, ecx
test ebp, edx
je 0x4d1f4b
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
push 0
push dword [esp + esi*4 + 0x70]
call dword [sym.imp.WS2_32.dll_WSAEnumNetworkEvents]
test eax, eax
jne 0x4d1f2d
cmp dword [esp + 0x38], eax
je 0x4d1f2d
test ebx, ebx
jg 0x4d1f2d
cmp dword [esp + 0x3c], eax
je 0x4d1f2d
inc dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push 0
push dword [eax + 0xdc]
push dword [esp + esi*4 + 0x70]
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
inc esi
rol edi, 1
cmp esi, 5
jb 0x4d1ef0
mov eax, dword [esp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4d1ed8
mov eax, dword [esp + 0x20]
push dword [eax + 0xdc]
call dword [sym.imp.WS2_32.dll_WSAResetEvent]
mov bl, byte [esp + 0xec]
cmp byte [esp + 0x13], 0
je 0x4d1f89
push dword [esp + 0x1c]
call dword [0x57f064]
add esp, 4
mov ecx, dword [esp + 0x38]
test ecx, ecx
je 0x4d1f97
mov eax, dword [esp + 0x28]
mov dword [ecx], eax
cmp byte [esp + 0xe8], 0
je 0x4d1ffe
cmp dword [esp + 0x18], 0
jne 0x4d1ffe
test bl, bl
jne 0x4d1ffe
mov eax, dword [esp + 0x20]
mov dword [esp + 0x2c], 0
cmp dword [eax], 0xbab1e
jne 0x4d1ffe
cmp byte [eax + 0xe2], bl
jne 0x4d1ffe
lea ecx, [esp + 0x2c]
push ecx
push eax
call fcn.004d1880
add esp, 8
test eax, eax
jne 0x4d1ffe
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x4d1ffe
mov ecx, dword [esp + 0xe0]
cmp eax, ecx
jg 0x4d1ff1
test eax, eax
jns 0x4d1ff3
mov eax, ecx
cdq
push edx
push eax
call fcn.004efaf0
add esp, 8
xor eax, eax
jmp 0x4d1b0b
mov ecx, dword [esp + 0xc8]
mov eax, 1
pop edi
pop esi
pop ebp
xor ecx, esp
call fcn.00518690
add esp, 0xc0
ret