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

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
movzx eax, word [edi + 4]
movzx ecx, word [edi + 6]
movzx edx, word [edi + 0x442e]
mov esi, dword [edi + 0x4428]
mov ebx, dword [edi]
push 0
sub eax, ecx
push eax
mov eax, dword [edi + 0x18]
add edx, esi
push edx
push eax
mov dword [ebp - 4], 0
and ebx, 0x10
call sub.WS2_32.dll_recv
mov dword [ebp + 8], eax
test eax, eax
jns 0x1021f8ee
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x2733
jne 0x1021f8e9
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 8]
test eax, eax
jg 0x1021f905
mov ecx, 0xfffffffe
mov dword [ebp - 4], 0xffffff00
mov word [edi + 0x10], cx
jmp 0x1021fb45
movzx edx, word [edi + 0x442e]
add edx, dword [edi + 0x4428]
push eax
push eax
push edx
push str.received__d_bytes
push edi
call fcn.1021e900
mov ecx, dword [ebp + 8]
add word [edi + 6], cx
mov ax, word [edi + 6]
add word [edi + 0x442e], cx
add esp, 0x14
cmp ax, word [edi + 4]
jb 0x1021f8e0
movzx ecx, ax
xor eax, eax
mov word [edi + 6], ax
mov eax, dword [edi]
mov dword [ebp + 8], ecx
test al, 1
je 0x1021f9e6
test byte [esi], 0x80
je 0x1021f99e
cmp byte [esi + 2], 1
jne 0x1021f99e
push str.Error:_no_SSLv23_handshaking_allowed_n
call fcn.10231b66
call fcn.102311d7
add eax, 0x20
push eax
call fcn.1023929c
push eax
call fcn.10239246
add esp, 0xc
test eax, eax
jne 0x1021f992
call fcn.102311d7
add eax, 0x20
push eax
call fcn.10235a9f
add esp, 4
mov dword [ebp - 4], 0xfffffeee
jmp 0x1021fb45
movzx ecx, byte [esi + 3]
mov edx, 0x100
imul cx, dx
movzx edx, byte [esi + 4]
add cx, dx
mov edx, 0x43fb
mov word [edi + 4], cx
cmp cx, dx
ja case.default.0x1021fa83
and eax, 0xfffffffe
mov dword [edi], eax
mov ax, word [esi]
mov word [edi + 0x44a0], ax
mov cl, byte [esi + 2]
mov byte [edi + 0x44a2], cl
mov dl, byte [esi]
mov byte [edi + 8], dl
jmp 0x1021fb45
or eax, 1
mov edx, 5
mov dword [edi], eax
mov word [edi + 4], dx
test al, 4
je 0x1021fa73
mov eax, dword [edi + 0x1c]
mov edx, dword [eax + 0x10]
push ecx
mov ecx, dword [edi + 0x24]
push esi
push esi
push ecx
call edx
add esp, 0x10
cmp byte [edi + 0xb], 0x32
jb 0x1021fa22
mov eax, dword [edi + 0x1c]
cmp byte [eax + 2], 0
je 0x1021fa22
movzx eax, byte [eax + 2]
add esi, eax
sub dword [ebp + 8], eax
mov eax, dword [ebp + 8]
neg ebx
sbb ebx, ebx
push esi
and ebx, 2
push ebx
mov ecx, edi
call fcn.1021d880
add esp, 8
mov dword [ebp + 8], eax
test eax, eax
jns 0x1021fa47
mov dword [ebp - 4], eax
jmp 0x1021fb45
push eax
push esi
push str.decrypted
push edi
call fcn.1021e900
mov ecx, 0xffffbb70
add esp, 0x10
lea eax, [edi + 0x4497]
sub ecx, edi
inc byte [eax]
jne 0x1021fa70
dec eax
lea edx, [ecx + eax]
test edx, edx
jns 0x1021fa64
mov ecx, dword [ebp + 8]
movzx eax, byte [edi + 8]
add eax, 0xffffffec
cmp eax, 3
ja case.default.0x1021fa83
jmp dword [eax*4 + 0x1021fb6c]
mov eax, dword [edi + 0x14]
test eax, eax
je 0x1021faad
push ecx
xor edx, edx
push esi
push edi
mov word [eax + 0x138], dx
call fcn.1021f0e0
add esp, 0xc
mov dword [ebp - 4], eax
jmp 0x1021fb45
mov dword [ebp - 4], 0xfffffeef
jmp 0x1021fb45
cmp word [edi + 0xe], 0x14
je 0x1021fac9
mov dword [ebp - 4], 0xfffffefc
jmp 0x1021fb45
or dword [edi], 4
push 0
call fcn.1021dfb0
add esp, 4
test eax, eax
jns 0x1021fae3
mov dword [ebp - 4], 0xfffffefc
jmp 0x1021fb45
xor eax, eax
mov dword [edi + 0x4490], eax
mov dword [edi + 0x4494], eax
jmp 0x1021fb45
mov eax, dword [ebp + 0xc]
test eax, eax
je 0x1021fb00
mov dword [eax], esi
mov byte [ecx + esi], 0
mov dword [ebp - 4], ecx
jmp 0x1021fb45
cmp byte [esi], 1
jne 0x1021fb27
cmp byte [esi + 1], 0
jne 0x1021fb27
push 0
push edi
mov dword [ebp - 4], 0xfffffffd
call fcn.1021f2a0
add esp, 8
or dword [edi], 0x40
jmp 0x1021fb45
movzx ecx, byte [esi + 1]
mov eax, ecx
push ecx
neg eax
push edi
mov dword [ebp - 4], eax
call fcn.1021eb60
add esp, 8
jmp 0x1021fb45
mov dword [ebp - 4], 0xfffffefb
xor eax, eax
mov word [edi + 0x442e], ax
mov eax, dword [ebp - 4]
test eax, eax
jns 0x1021fb62
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x1021fb62
mov dword [ecx], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret