Function at 0x4a1132
Capabilities:
Receive data
Receive data on socket
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x5094
call fcn.00401910
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 8]
and dword [ebp - 0x508c], 0
push ebx
push esi
push edi
test edx, edx
jne 0x4a1162
xor eax, eax
inc eax
jmp 0x4a143e
push 0
push ecx
mov ecx, dword [ecx]
push 0x4a08d4
call fcn.0049fe9d
mov edi, eax
add esp, 0xc
test edi, edi
je 0x4a115a
mov eax, dword [ebp + 0xc]
mov esi, eax
shr esi, 0x10
test esi, esi
je 0x4a11e7
xor ebx, ebx
inc ebx
cmp dword [edi + 0x50], 0
je 0x4a11ca
mov ecx, dword [edi + 0xc]
push esi
push str.Network_error__winsock_.
push dword [edi + 0x5c]
mov eax, dword [ecx]
push dword [edi + 0x50]
push ebx
call dword [eax]
cmp dword [edi + 0x50], 0
je 0x4a11ca
mov ecx, dword [edi + 0x50]
lea edx, [edi + 0x54]
call fcn.004a0b5d
test eax, eax
je 0x4a11c7
mov ecx, edi
call fcn.004a15ef
cmp dword [edi + 0x50], 0
mov esi, eax
jne 0x4a11a9
xor ebx, ebx
inc ebx
test esi, esi
je 0x4a12a2
push 0
push esi
mov ecx, dword [edi + 0xc]
push str.Network_error__winsock_.
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x4a143e
movzx eax, ax
push 1
pop ebx
dec eax
je 0x4a13b4
dec eax
je 0x4a1388
push 2
pop esi
sub eax, esi
je 0x4a1330
sub eax, 4
je 0x4a12a9
sub eax, 8
je 0x4a128c
sub eax, 0x10
jne 0x4a12a2
xor esi, esi
inc esi
push 0
push 0x5000
lea eax, [ebp - 0x5008]
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_recv]
mov ebx, eax
test ebx, ebx
js 0x4a126a
mov ecx, dword [edi + 0xc]
je 0x4a1253
mov edx, dword [ecx]
lea eax, [ebp - 0x5008]
push ebx
push eax
push 0
call dword [edx + 8]
jmp 0x4a125d
mov eax, dword [ecx]
xor edx, edx
push edx
push edx
push edx
call dword [eax + 4]
and esi, eax
test ebx, ebx
jg 0x4a1220
mov eax, esi
jmp 0x4a143e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4a1263
mov ecx, dword [edi + 0xc]
push 0
push eax
push str.Network_error__winsock_.
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4a143e
mov ecx, dword [edi + 0x50]
mov dword [edi + 0x28], ebx
mov dword [edi + 0x24], ebx
test ecx, ecx
je 0x4a12a2
call fcn.004a0cb9
and dword [edi + 0x50], 0
mov eax, ebx
jmp 0x4a143e
mov eax, 0x80
push eax
mov dword [ebp - 0x5090], eax
lea eax, [ebp - 0x5088]
push 0
push eax
call dword [sym.imp.msvcrt.dll_memset]
add esp, 0xc
lea eax, [ebp - 0x5090]
push eax
lea eax, [ebp - 0x5088]
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_accept]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a12f2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2afa
je 0x4a12a2
push 2
pop eax
cmp word [ebp - 0x5088], ax
jne 0x4a131d
cmp dword [edi + 0x34], 0
je 0x4a131d
push dword [ebp - 0x5084]
call fcn.004a0c18
pop ecx
test eax, eax
jne 0x4a131d
push esi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x4a12a2
mov ecx, dword [edi + 0xc]
push esi
mov eax, dword [ecx]
call dword [eax + 0x10]
test eax, eax
je 0x4a12a2
jmp 0x4a1314
push ebx
push 0x5000
lea eax, [ebp - 0x5008]
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_recv]
mov edx, eax
test edx, edx
jg 0x4a1372
jne 0x4a1355
mov eax, str.Internal_err
jmp 0x4a1360
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov eax, str.Network_error__winsock_.
push eax
push 0x4f2b08
call fcn.004a0859
pop ecx
pop ecx
jmp 0x4a12a2
mov ecx, dword [edi + 0xc]
push edx
lea edx, [ebp - 0x5008]
push edx
mov eax, dword [ecx]
push esi
call dword [eax + 8]
jmp 0x4a143e
mov esi, dword [edi + 0x20]
mov ecx, edi
add esi, dword [edi + 0x3c]
mov dword [edi + 0x28], ebx
call fcn.004a18a7
mov edx, dword [edi + 0x20]
add edx, dword [edi + 0x3c]
cmp edx, esi
jge 0x4a12a2
mov ecx, dword [edi + 0xc]
push edx
mov eax, dword [ecx]
call dword [eax + 0xc]
jmp 0x4a12a2
xor esi, esi
cmp dword [edi + 0x2c], esi
je 0x4a13c3
mov dword [edi + 0x30], ebx
jmp 0x4a12a2
cmp dword [edi + 0x40], esi
mov dword [ebp - 0x508c], ebx
je 0x4a13e3
lea eax, [ebp - 0x508c]
push eax
push 0x40047307
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
push esi
push 0x5000
lea eax, [ebp - 0x5008]
push eax
push dword [edi + 8]
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jns 0x4a1418
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
cmp edx, 0x2733
je 0x4a12a2
push esi
push edx
jmp 0x4a11d5
mov ecx, dword [edi + 0xc]
jne 0x4a1425
push esi
push esi
push esi
jmp 0x4a11dd
mov edx, dword [ecx]
push eax
lea eax, [ebp - 0x5008]
push eax
xor eax, eax
cmp dword [ebp - 0x508c], eax
sete al
push eax
call dword [edx + 8]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00401000
mov esp, ebp
pop ebp
ret 8