Function at 0x65a872d3
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
lea ebx, [ebp - 0x344]
mov edi, ebx
sub esp, 0x38c
mov dword [ebp - 0x360], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x35c], edx
mov edx, ecx
mov esi, dword [ebp + 8]
mov ecx, 4
mov dword [ebp - 0x368], eax
mov eax, dword [ebp - 0x35c]
mov dword [ebp - 0x34c], 1
mov dword [ebp - 0x330], eax
xor eax, eax
cmp dword [ebp + 0xc], 0
rep stosd dword es:[edi], eax
mov dword [ebp - 0x348], 0
mov dword [ebp - 0x334], 1
je 0x65a8737a
cmp dword [ebp + 0x14], 0
je 0x65a8734c
mov dword [esp], 0x16
jmp 0x65a877c2
cmp dword [ebp + 0xc], 0
je 0x65a8737a
mov edi, dword [ebp + 0xc]
xor eax, eax
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
mov dword [ebp - 0x364], eax
cmp eax, 0xff
jbe 0x65a87384
mov dword [esp], 0x26
jmp 0x65a877c2
mov dword [ebp - 0x364], 0
movzx eax, dx
mov dword [ebp - 0x370], edx
lea edi, [ebp - 0x344]
mov dword [esp], eax
mov eax, dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x344], 2
mov dword [ebp - 0x36c], eax
call eax
push ecx
mov word [ebp - 0x342], ax
mov dword [esp], 0x7f000001
call dword [sym.imp.WS2_32.dll_htonl]
push ebx
mov dword [ebp - 0x340], eax
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x360]
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], edi
mov dword [esp], eax
call dbg._assuan_connect
mov ebx, eax
test eax, eax
je 0x65a87453
mov edx, dword [ebp - 0x370]
cmp dx, 0x235a
jne 0x65a8744b
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 0x6b
jne 0x65a877f5
mov dword [esp], 0x23be
mov eax, dword [ebp - 0x36c]
call eax
push edx
mov word [ebp - 0x342], ax
mov eax, dword [ebp - 0x35c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x360]
mov dword [esp + 0xc], 0x10
mov dword [esp + 8], edi
mov dword [esp], eax
call dbg._assuan_connect
mov ebx, eax
test ebx, ebx
jne 0x65a877f5
cmp esi, 1
mov dword [esp], 3
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x22e]
mov word [ebp - 0x22e], 0x105
sbb edi, edi
not edi
and edi, 2
mov eax, edi
mov byte [ebp - 0x22c], al
mov eax, dword [ebp - 0x360]
call dbg.do_writen
mov ebx, eax
test eax, eax
jne 0x65a877f5
lea eax, [ebp - 0x34c]
mov dword [esp + 0xc], 0
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x334]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x35c]
mov dword [esp + 8], 0
inc eax
mov dword [esp], eax
call dword [sym.imp.WS2_32.dll_select]
sub esp, 0x14
test eax, eax
je case.0x65a87775.5
mov dword [esp], 2
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x22e]
mov eax, dword [ebp - 0x360]
call dbg.do_readn
mov ebx, eax
test eax, eax
jne 0x65a877f5
cmp byte [ebp - 0x22e], 5
jne case.0x65a87775.6
movzx eax, byte [ebp - 0x22d]
cmp edi, eax
jne case.0x65a87775.6
test esi, esi
je 0x65a87634
mov dword [esp + 4], 0x3a
mov dword [esp], esi
call sym._strchr
mov edx, eax
test eax, eax
je 0x65a87340
lea eax, [eax + 1]
or ecx, 0xffffffff
lea edi, [edx + 1]
mov dword [ebp - 0x370], eax
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [ecx - 1]
sub edx, esi
je 0x65a87340
cmp edx, 0xff
jg 0x65a87340
test eax, eax
je 0x65a87340
cmp eax, 0xff
jg 0x65a87340
mov byte [ebp - 0x22d], dl
mov ecx, edx
lea edi, [ebp - 0x22c]
mov byte [ebp - 0x22e], 1
rep movsb byte es:[edi], byte [esi]
mov byte [ebp + edx - 0x22c], al
lea esi, [edx + 3]
mov ecx, eax
lea edx, [ebp - 0x22e]
mov dword [ebp - 0x36c], esi
add edx, esi
mov esi, dword [ebp - 0x370]
mov edi, edx
mov edx, dword [ebp - 0x35c]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x36c]
lea ecx, [ebp - 0x22e]
lea edi, [ebp - 0x22e]
add esi, eax
mov eax, dword [ebp - 0x360]
mov dword [esp], esi
call dbg.do_writen
lea edx, [edi + esi]
mov ecx, edi
cmp ecx, edx
je 0x65a875ec
mov byte [ecx], 0
inc ecx
jmp 0x65a875e2
test eax, eax
jne 0x65a877f3
mov dword [esp], 2
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x22e]
mov eax, dword [ebp - 0x360]
call dbg.do_readn
test eax, eax
jne 0x65a877f3
cmp byte [ebp - 0x22e], 1
jne case.0x65a87775.7
cmp byte [ebp - 0x22d], 0
jne case.0x65a87775.1
cmp dword [ebp + 0xc], 0
je 0x65a87650
mov eax, dword [ebp + 0xc]
cmp byte [eax], 0
jne 0x65a87650
cmp word [ebp - 0x368], 0
je 0x65a877f5
cmp dword [ebp + 0xc], 0
mov byte [ebp - 0x22c], 0
mov word [ebp - 0x22e], 0x105
je 0x65a876b3
mov al, byte [ebp - 0x364]
mov esi, dword [ebp + 0xc]
mov byte [ebp - 0x22b], 3
mov ecx, dword [ebp - 0x364]
mov dl, byte [ebp - 0x368]
mov byte [ebp - 0x22a], al
lea eax, [ebp - 0x229]
mov edi, eax
mov eax, dword [ebp - 0x368]
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp - 0x364]
mov byte [ebp + esi - 0x229], ah
mov eax, esi
mov byte [ebp + esi - 0x228], dl
add eax, 7
jmp 0x65a87709
mov eax, dword [ebp + 0x14]
cmp word [eax], 0x17
mov ax, word [eax + 2]
jne 0x65a876ea
mov esi, dword [ebp + 0x14]
lea edx, [ebp - 0x22a]
mov byte [ebp - 0x22b], 4
mov ecx, 4
mov word [ebp - 0x21a], ax
mov edi, edx
mov eax, 0x16
add esi, 8
rep movsd dword es:[edi], dword [esi]
jmp 0x65a87709
mov edi, dword [ebp + 0x14]
mov byte [ebp - 0x22b], 1
mov word [ebp - 0x226], ax
mov eax, 0xa
mov edx, dword [edi + 4]
mov dword [ebp - 0x22a], edx
mov dword [esp], eax
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x22e]
mov eax, dword [ebp - 0x360]
call dbg.do_writen
test eax, eax
jne 0x65a877f3
mov dword [esp], 0xa
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x22e]
mov eax, dword [ebp - 0x360]
call dbg.do_readn
test eax, eax
jne 0x65a877f3
cmp byte [ebp - 0x22e], 5
jne case.0x65a87775.7
cmp byte [ebp - 0x22c], 0
jne case.0x65a87775.7
mov al, byte [ebp - 0x22d]
test al, al
je 0x65a877cc
dec eax
cmp al, 7
ja case.0x65a87775.6
movzx eax, al
jmp dword [eax*4 + 0x65a8d590]
mov dword [esp], 0x74
jmp 0x65a877c2
mov dword [esp], 0xd
jmp 0x65a877c2
mov dword [esp], 0x76
jmp 0x65a877c2
mov dword [esp], 0x6e
jmp 0x65a877c2
mov dword [esp], 0x6b
jmp 0x65a877c2
mov dword [esp], 0x8a
jmp 0x65a877c2
mov dword [esp], 0x87
jmp 0x65a877c2
mov dword [esp], 0x81
call sym._gpg_err_set_errno
or ebx, 0xffffffff
jmp 0x65a877f5
cmp byte [ebp - 0x22b], 4
jne 0x65a877f5
mov dword [esp], 0xc
mov edx, dword [ebp - 0x35c]
lea ecx, [ebp - 0x224]
mov eax, dword [ebp - 0x360]
call dbg.do_readn
mov ebx, eax
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret