Function at 0x10020560
Capabilities:
Get socket status
Receive data
Receive data on socket

Disassembly:
mov al, byte [esi + 0x18]
sub esp, 0x110
test al, 2
push ebx
push ebp
push edi
je 0x100206e2
mov eax, dword [esi + 0x24]
test eax, eax
jne 0x100205a4
push 0xfde8
call dword [sym.libxml2.dll_xmlMallocAtomic]
add esp, 4
test eax, eax
mov dword [esi + 0x24], eax
je 0x100206ee
mov dword [esi + 0x34], 0xfde8
mov dword [esi + 0x30], eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov ecx, dword [esi + 0x24]
mov eax, dword [esi + 0x30]
lea edx, [ecx + 0x1000]
cmp eax, edx
jbe 0x100205e1
mov edx, dword [esi + 0x2c]
sub edx, eax
push edx
push eax
mov edi, eax
push ecx
sub edi, ecx
call dword [sym.imp.msvcrt.dll_memmove]
mov edx, dword [esi + 0x30]
mov ecx, dword [esi + 0x28]
mov eax, dword [esi + 0x2c]
sub edx, edi
sub ecx, edi
add esp, 0xc
sub eax, edi
mov dword [esi + 0x30], edx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], eax
mov ecx, dword [esi + 0x34]
mov edi, dword [esi + 0x24]
mov eax, dword [esi + 0x2c]
lea edx, [ecx + edi]
lea ebx, [eax + 0x1000]
cmp edx, ebx
jae 0x10020638
mov ebp, dword [esi + 0x28]
mov ebx, dword [esi + 0x30]
sub eax, edi
mov dword [esp + 0xc], eax
lea eax, [ecx + ecx]
push eax
push edi
sub ebp, edi
sub ebx, edi
mov dword [esi + 0x34], eax
call dword [sym.libxml2.dll_xmlRealloc]
add esp, 8
test eax, eax
mov dword [esi + 0x24], eax
je 0x10020713
mov ecx, dword [esp + 0xc]
lea edx, [eax + ecx]
lea ecx, [eax + ebp]
add eax, ebx
mov dword [esi + 0x2c], edx
mov dword [esi + 0x28], ecx
mov dword [esi + 0x30], eax
mov edx, dword [esi + 0x2c]
mov eax, dword [esi + 0x14]
push 0
push 0x1000
push edx
push eax
call dword [sym.imp.WSOCK32.dll_recv]
test eax, eax
mov dword [esi + 0x38], eax
jg 0x1002073f
je 0x100206e2
cmp eax, 0xffffffff
jne 0x10020691
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
cmp eax, 0x2746
jg 0x10020751
je 0x100206e2
cmp eax, 0xb
je 0x10020691
cmp eax, 0x2732
jle 0x10020758
cmp eax, 0x2734
jg 0x10020758
mov ecx, dword [0x100e9614]
mov eax, dword [esi + 0x14]
lea edx, [esp + 0x10]
push edx
push 0
mov dword [esp + 0x18], ecx
push 0
lea ecx, [esp + 0x24]
mov dword [esp + 0x28], eax
push ecx
inc eax
push eax
mov dword [esp + 0x28], 0
mov dword [esp + 0x2c], 1
call dword [sym.imp.WSOCK32.dll_select]
cmp eax, 1
jge 0x100206d8
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 4
jne 0x100206e2
test byte [esi + 0x18], 2
jne 0x10020574
pop edi
pop ebp
xor eax, eax
pop ebx
add esp, 0x110
ret
push str.allocating_input
push 0
push 0
push 2
push 0xa
call sym.libxml2.dll___xmlSimpleError
add esp, 0x14
pop edi
or eax, 0xffffffff
pop ebp
mov dword [esi + 0x38], eax
pop ebx
add esp, 0x110
ret
push str.allocating_input_buffer
push 0
push 0
push 2
push 0xa
call sym.libxml2.dll___xmlSimpleError
push edi
call dword [sym.libxml2.dll_xmlFree]
add esp, 0x18
pop edi
or eax, 0xffffffff
pop ebp
mov dword [esi + 0x38], eax
pop ebx
add esp, 0x110
ret
mov ecx, dword [esi + 0x2c]
pop edi
add ecx, eax
pop ebp
mov dword [esi + 0x2c], ecx
pop ebx
add esp, 0x110
ret
cmp eax, 0x274a
je 0x100206e2
push str.recv_failed_n
push 0
push 0xa
call fcn.100651c0
add esp, 0xc
pop edi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x110
ret