Function at 0x10049670
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push edi
push esi
sub esp, 0x10
mov al, byte [edx + 0x30]
mov edi, ecx
mov ecx, 3
mov esi, edx
add al, 0xfd
cmp al, 3
movzx eax, al
cmovb ecx, eax
movzx eax, cl
lea ecx, [eax - 2]
cmp ecx, 2
jae 0x100496b9
cmp dword [esi + 8], 1
mov edx, 1
jne 0x100496ad
mov eax, dword [esi + 0xc]
mov edx, dword [eax]
and edx, 0xe
or edx, 1
mov ecx, esi
call fcn.100498b0
jmp 0x100497b9
test eax, eax
jne 0x100497b9
xor edx, edx
cmp dword [esi + 8], 1
jne 0x100496d1
mov eax, dword [esi + 0xc]
mov edx, dword [eax]
and edx, 0xe
mov ecx, esi
call fcn.100498b0
mov eax, dword [0x104debf8]
cmp eax, 5
jb 0x100496e7
mov eax, dword [0x104debfc]
mov ebx, dword [edi]
mov dword [esp], 0
mov dword [esp + 4], str.formatter_errorfailed_to_write_whole_buffer
mov dword [esp + 8], 0
mov dword [esp + 0xc], 0
lea ecx, [esp + 8]
lea edx, [esp + 0xc]
mov edi, esp
lea eax, [ebx + 0x58]
push 0
push eax
push ecx
push edx
push 1
push edi
push dword [ebx + 0x88]
call sub.WS2_32.dll_WSARecv
cmp eax, 0xffffffff
je 0x10049734
mov eax, 1
jmp 0x1004976a
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
xor eax, eax
cmp edi, 0x3e5
cmove edi, eax
je 0x1004976a
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x1004980c
cmp al, 2
je 0x1004980c
mov dword [esi + 0x34], edi
mov dword [esi + 0x30], 0
jmp 0x10049697
cmp eax, 1
jne 0x10049796
cmp byte [esi + 0x4c], 0
je 0x10049796
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x100497e6
cmp al, 2
je 0x100497e6
mov byte [esi + 0x30], 5
mov eax, dword [esp]
mov ecx, dword [esp + 3]
mov dword [esi + 0x31], eax
mov dword [esi + 0x34], ecx
jmp 0x10049697
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x100497c0
cmp al, 2
je 0x100497c0
mov byte [esi + 0x30], 4
mov eax, dword [esp]
mov ecx, dword [esp + 3]
mov dword [esi + 0x31], eax
mov dword [esi + 0x34], ecx
lock inc dword [ebx + 0x8c]
add esp, 0x10
pop esi
pop edi
pop ebx
ret
mov edi, dword [esi + 0x34]
mov eax, dword [edi + 4]
push dword [edi]
call dword [eax]
add esp, 4
mov eax, dword [edi + 4]
cmp dword [eax + 4], 0
je 0x10049842
mov edi, dword [edi]
cmp dword [eax + 8], 9
jae 0x10049832
call sub.KERNEL32.dll_GetProcessHeap
push edi
jmp 0x1004983a
mov edi, dword [esi + 0x34]
mov eax, dword [edi + 4]
push dword [edi]
call dword [eax]
add esp, 4
mov eax, dword [edi + 4]
cmp dword [eax + 4], 0
je 0x10049868
mov edi, dword [edi]
cmp dword [eax + 8], 9
jae 0x10049858
call sub.KERNEL32.dll_GetProcessHeap
push edi
jmp 0x10049860
mov ebx, dword [esi + 0x34]
mov eax, dword [ebx + 4]
push dword [ebx]
call dword [eax]
add esp, 4
mov eax, dword [ebx + 4]
cmp dword [eax + 4], 0
je 0x1004988e
mov ebx, dword [ebx]
cmp dword [eax + 8], 9
jae 0x1004987e
call sub.KERNEL32.dll_GetProcessHeap
push ebx
jmp 0x10049886
call sub.KERNEL32.dll_GetProcessHeap
push dword [edi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov edi, dword [esi + 0x34]
call sub.KERNEL32.dll_GetProcessHeap
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x100497a1
call sub.KERNEL32.dll_GetProcessHeap
push dword [edi - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov edi, dword [esi + 0x34]
call sub.KERNEL32.dll_GetProcessHeap
push edi
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x10049780
call sub.KERNEL32.dll_GetProcessHeap
push dword [ebx - 4]
push 0
push eax
call sub.KERNEL32.dll_HeapFree
mov ebx, dword [esi + 0x34]
call sub.KERNEL32.dll_GetProcessHeap
push ebx
push 0
push eax
call sub.KERNEL32.dll_HeapFree
jmp 0x1004975b