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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffef0
push ebx
push esi
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4d1d40
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
sub cl, 1
jb 0x4d1ae6
je 0x4d1b5e
jmp 0x4d1d25
mov byte [ebp - 0x110], 5
mov byte [ebp - 0x10f], 1
mov byte [ebp - 0x10e], 0
push 0
push 3
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_send
inc eax
je 0x4d1d25
lea eax, [ebp - 0x110]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403178
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_recv
cmp eax, 2
jl 0x4d1d25
cmp byte [ebp - 0x10f], 0
jne 0x4d1d25
mov byte [ebp - 5], 1
jmp 0x4d1d25
mov byte [ebp - 0x110], 5
mov byte [ebp - 0x10f], 2
mov byte [ebp - 0x10e], 0
mov byte [ebp - 0x10d], 2
push 0
push 4
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_send
inc eax
je 0x4d1d25
lea eax, [ebp - 0x110]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403178
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_recv
cmp eax, 2
jl 0x4d1d25
cmp byte [ebp - 0x10f], 2
jne 0x4d1d25
lea eax, [ebp - 0xc]
mov edx, dword [ebx + 0x50]
call fcn.0040477c
lea eax, [ebp - 0x10]
mov edx, dword [ebx + 0x54]
call fcn.0040477c
lea eax, [ebp - 0x110]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403178
mov byte [ebp - 0x110], 1
mov eax, dword [ebp - 0xc]
call fcn.004049a4
mov ebx, eax
mov byte [ebp - 0x10f], bl
mov esi, ebx
and esi, 0xff
sub esi, 1
jno 0x4d1c25
call fcn.004037ec
test esi, esi
jl 0x4d1c49
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0xc]
mov al, byte [eax + ebx]
mov edx, ebx
add edx, 2
jno 0x4d1c3e
call fcn.004037ec
mov byte [ebp + edx - 0x110], al
inc ebx
dec esi
jne 0x4d1c2c
mov eax, dword [ebp - 0x10]
call fcn.004049a4
mov ebx, eax
mov eax, dword [ebp - 0xc]
call fcn.004049a4
add eax, 2
jno 0x4d1c65
call fcn.004037ec
mov byte [ebp + eax - 0x110], bl
mov eax, dword [ebp - 0xc]
call fcn.004049a4
add eax, 2
jno 0x4d1c7e
call fcn.004037ec
movzx esi, byte [ebp + eax - 0x110]
sub esi, 1
jno 0x4d1c90
call fcn.004037ec
test esi, esi
jl 0x4d1cc3
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0xc]
call fcn.004049a4
add eax, 3
jno 0x4d1ca9
call fcn.004037ec
add eax, ebx
jno 0x4d1cb2
call fcn.004037ec
mov edx, dword [ebp - 0x10]
mov dl, byte [edx + ebx]
mov byte [ebp + eax - 0x110], dl
inc ebx
dec esi
jne 0x4d1c97
push 0
mov eax, dword [ebp - 0xc]
call fcn.004049a4
mov ebx, eax
mov eax, dword [ebp - 0x10]
call fcn.004049a4
add ebx, eax
jno 0x4d1ce0
call fcn.004037ec
add ebx, 3
jno 0x4d1cea
call fcn.004037ec
push ebx
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_send
inc eax
je 0x4d1d25
push 0
push pe_nt_image_headers32
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.ws2_32.dll_recv
inc eax
je 0x4d1d25
cmp byte [ebp - 0x10f], 0
jne 0x4d1d25
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4d1d47
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.00404708
ret