Function at 0x10049920
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 0x10049969
cmp dword [esi + 8], 1
mov edx, 1
jne 0x1004995d
mov eax, dword [esi + 0xc]
mov edx, dword [eax]
and edx, 0xe
or edx, 1
mov ecx, esi
call fcn.10049b60
jmp 0x10049a69
test eax, eax
jne 0x10049a69
xor edx, edx
cmp dword [esi + 8], 1
jne 0x10049981
mov eax, dword [esi + 0xc]
mov edx, dword [eax]
and edx, 0xe
mov ecx, esi
call fcn.10049b60
mov eax, dword [0x10551ebc]
cmp eax, 5
jb 0x10049997
mov eax, dword [0x10551ec0]
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 0x100499e4
mov eax, 1
jmp 0x10049a1a
call sub.WS2_32.dll_WSAGetLastError
mov edi, eax
xor eax, eax
cmp edi, 0x3e5
cmove edi, eax
je 0x10049a1a
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x10049abc
cmp al, 2
je 0x10049abc
mov dword [esi + 0x34], edi
mov dword [esi + 0x30], 0
jmp 0x10049947
cmp eax, 1
jne 0x10049a46
cmp byte [esi + 0x4c], 0
je 0x10049a46
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x10049a96
cmp al, 2
je 0x10049a96
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 0x10049947
mov al, byte [esi + 0x30]
cmp al, 5
ja 0x10049a70
cmp al, 2
je 0x10049a70
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 0x10049af2
mov edi, dword [edi]
cmp dword [eax + 8], 9
jae 0x10049ae2
call sub.KERNEL32.dll_GetProcessHeap
push edi
jmp 0x10049aea
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 0x10049b18
mov edi, dword [edi]
cmp dword [eax + 8], 9
jae 0x10049b08
call sub.KERNEL32.dll_GetProcessHeap
push edi
jmp 0x10049b10
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 0x10049b3e
mov ebx, dword [ebx]
cmp dword [eax + 8], 9
jae 0x10049b2e
call sub.KERNEL32.dll_GetProcessHeap
push ebx
jmp 0x10049b36
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 0x10049a51
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 0x10049a30
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 0x10049a0b