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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe68
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ecx
mov dword [ebp - 8], edx
mov ebx, eax
mov eax, dword [ebp - 4]
test eax, eax
je 0x5982d2c4
xor edx, edx
mov dword [eax], edx
xor eax, eax
push ebp
push 0x5982d58d
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0xd], 0
mov eax, dword [ebp - 4]
call sub.rtl120.bpl__System__LStrClr_qqrpv
xor eax, eax
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x1d], 1
cmp dword [ebx + 0x84], 0
je 0x5982d32f
cmp dword [ebx + 0x7c], 0
je 0x5982d32f
mov byte [ebp - 0x1d], 0
mov eax, dword [ebx + 0x7c]
mov dword [ebp - 0x14], eax
mov edx, dword [ebx + 0x78]
mov eax, dword [ebx + 0x84]
mov ecx, dword [ebx + 0x7c]
call sub.rtl120.bpl__System_Move_qqrpxvpvi
mov eax, dword [ebx + 0x84]
push eax
call sub.kernel32.dll_LocalFree_1
xor eax, eax
mov dword [ebx + 0x84], eax
xor eax, eax
mov dword [ebx + 0x7c], eax
jmp 0x5982d3bd
cmp byte [ebp - 0x1d], 0
je 0x5982d3bd
mov byte [ebp - 0x1d], 0
mov dword [ebp - 0x168], 1
mov eax, dword [ebx + 0x50]
mov dword [ebp - 0x164], eax
mov eax, dword [sym.madExcept_.bpl__Madexcept_SmtpTimeout]
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x28]
push eax
push 0
push 0
lea eax, [ebp - 0x168]
push eax
push 0
call sub.wsock32.dll_select
test eax, eax
jle 0x5982d577
push 0
mov eax, dword [ebx + 0x74]
sub eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebx + 0x78]
add eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebx + 0x50]
push eax
call sub.wsock32.dll_recv
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jg 0x5982d3b7
cmp dword [ebp - 0x18], 0
jne 0x5982d3a9
cmp dword [ebp - 0x14], 0
je 0x5982d3ad
xor eax, eax
jmp 0x5982d3af
mov al, 1
mov byte [ebp - 0xd], al
jmp 0x5982d577
mov eax, dword [ebp - 0x18]
add dword [ebp - 0x14], eax
cmp dword [ebx + 8], 0
je 0x5982d53e
push 3
mov eax, dword [ebx + 0x78]
mov dword [ebp - 0x178], eax
xor eax, eax
mov dword [ebp - 0x174], eax
xor eax, eax
mov dword [ebp - 0x170], eax
xor eax, eax
mov dword [ebp - 0x16c], eax
lea eax, [ebp - 0x178]
push eax
push 3
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x188], eax
xor eax, eax
mov dword [ebp - 0x184], eax
xor eax, eax
mov dword [ebp - 0x180], eax
xor eax, eax
mov dword [ebp - 0x17c], eax
lea eax, [ebp - 0x188]
push eax
push 3
mov dword [ebp - 0x198], 1
xor eax, eax
mov dword [ebp - 0x194], eax
xor eax, eax
mov dword [ebp - 0x190], eax
xor eax, eax
mov dword [ebp - 0x18c], eax
lea eax, [ebp - 0x198]
push eax
push 3
lea ecx, [ebp - 0x58]
lea edx, [ebp - 0x64]
mov eax, ebx
call fcn.5982cc54
push 0
push 0
lea eax, [ebp - 0x64]
push eax
lea eax, [ebx + 0x54]
push eax
mov eax, dword [ebx + 8]
call dword [eax + 0x68]
sub eax, 0x80090318
je 0x5982d51d
sub eax, 0x7ff6fce8
je 0x5982d492
sub eax, 0x90317
je 0x5982d538
sub eax, 0xa
je 0x5982d526
jmp 0x5982d577
mov dword [ebp - 0x1c], 4
lea esi, [ebp - 0x54]
cmp dword [esi], 1
jne 0x5982d4c5
cmp dword [esi - 4], 0
jbe 0x5982d4c5
push 0
lea eax, [ebp - 0xc]
mov ecx, dword [esi - 4]
mov edx, dword [esi + 4]
call sub.rtl120.bpl__System__LStrFromPCharLen_qqrr27System__AnsiStringT_us_i0__pcius
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 4]
add esi, 0xc
dec dword [ebp - 0x1c]
jne 0x5982d49c
push ebp
lea eax, [ebp - 0xd]
call fcn.5982d1b8
pop ecx
test al, al
jne 0x5982d577
xor eax, eax
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x1d], 1
mov dword [ebp - 0x1c], 4
lea edi, [ebp - 0x54]
cmp dword [edi], 5
jne 0x5982d510
mov ecx, dword [edi - 4]
mov edx, dword [ebx + 0x78]
mov eax, dword [edi + 4]
call sub.rtl120.bpl__System_Move_qqrpxvpvi
mov eax, dword [edi - 4]
mov dword [ebp - 0x14], eax
jmp 0x5982d2e7
add edi, 0xc
dec dword [ebp - 0x1c]
jne 0x5982d4f2
jmp 0x5982d2e7
mov byte [ebp - 0x1d], 1
jmp 0x5982d2e7
xor edx, edx
mov eax, ebx
call fcn.5982cdbc
test al, al
je 0x5982d577
jmp 0x5982d2e7
mov byte [ebp - 0xd], 1
jmp 0x5982d577
push 0
lea eax, [ebp - 0xc]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x78]
call sub.rtl120.bpl__System__LStrFromPCharLen_qqrr27System__AnsiStringT_us_i0__pcius
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
call sub.rtl120.bpl__System__LStrCat_qqrv
mov eax, dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x1d], 1
push ebp
lea eax, [ebp - 0xd]
call fcn.5982d1b8
pop ecx
test al, al
je 0x5982d2e7
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x5982d594
lea eax, [ebp - 0xc]
call sub.rtl120.bpl__System__LStrClr_qqrpv
ret