Function at 0x410040
Capabilities:
Get socket status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4514a0
mov eax, dword fs:[0]
push eax
sub esp, 0x338
mov eax, dword [0x492040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x344], ebx
mov eax, dword [ebx]
mov esi, dword [ebp + 8]
mov dword [ebp - 0x334], esi
cmp byte [eax + 0x2dc], 0
je 0x41013b
lea esi, [eax + 0x33c]
mov dword [ebp - 0x340], eax
push 0
lea eax, [ebp - 0x218]
mov byte [ebp - 0x211], 1
push eax
push 0
lea ecx, [ebp - 0x211]
push esi
mov dword [ebp - 0x33c], ecx
call dword [sym.imp.KERNEL32.dll_InitOnceBeginInitialize]
test eax, eax
jne 0x4100c9
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
cmp dword [ebp - 0x218], 0
je 0x41010e
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x21c], 4
lea ecx, [ebp - 0x340]
mov dword [ebp - 4], 0
call fcn.0040fcc0
push 0
push 0
push esi
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_InitOnceComplete]
test eax, eax
je 0x41035f
cmp byte [ebp - 0x211], 0
jne 0x410127
mov eax, dword [ebx + 4]
mov dword [eax], 9
xor al, al
jmp 0x410341
mov esi, dword [ebp - 0x334]
push 0
push 0
push esi
call dword [sym.imp.libssl_3.dll_SSL_set_verify]
add esp, 0xc
mov ecx, dword [ebx]
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
mov eax, dword [ecx + 0x120]
mov dword [ebp - 0x33c], eax
mov eax, dword [ecx + 0x124]
mov dword [ebp - 0x21c], eax
mov eax, dword [ecx + 0x118]
mov dword [ebp - 0x338], eax
mov eax, dword [ecx + 0x11c]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebx + 8]
mov ebx, dword [eax]
mov dword [ebp - 0x218], ebx
nop
push esi
call dword [sym.imp.libssl_3.dll_SSL_connect]
add esp, 4
cmp eax, 1
je 0x410290
push eax
push esi
call dword [sym.imp.libssl_3.dll_SSL_get_error]
add esp, 8
sub eax, 2
je 0x410210
sub eax, 1
jne 0x41027a
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x228], eax
mov eax, dword [ebp - 0x33c]
mov dword [ebp - 0x32c], ebx
inc ebx
mov dword [ebp - 0x330], 1
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x228]
push eax
push 0
lea eax, [ebp - 0x330]
push eax
push 0
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jns 0x4101fd
call edi
cmp dword [eax], 4
je 0x4101d5
test esi, esi
jle 0x41027a
mov ebx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x334]
jmp 0x410180
mov eax, dword [ebp - 0x338]
mov dword [ebp - 0x220], eax
mov eax, dword [ebp - 0x33c]
mov dword [ebp - 0x114], ebx
inc ebx
mov dword [ebp - 0x118], 1
mov dword [ebp - 0x21c], eax
nop dword [eax]
lea eax, [ebp - 0x220]
push eax
push 0
push 0
lea eax, [ebp - 0x118]
push eax
push ebx
call dword [sym.imp.WS2_32.dll_select]
mov esi, eax
test esi, esi
jns 0x410268
call edi
cmp dword [eax], 4
je 0x410240
test esi, esi
mov ebx, dword [ebp - 0x218]
mov esi, dword [ebp - 0x334]
jg 0x410180
mov eax, dword [ebp - 0x344]
mov eax, dword [eax + 4]
mov dword [eax], 8
xor al, al
jmp 0x410341
mov ebx, dword [ebp - 0x344]
mov eax, dword [ebx]
cmp byte [eax + 0x2dc], 0
je 0x41033f
push esi
call dword [sym.imp.libssl_3.dll_SSL_get_verify_result]
mov ecx, dword [ebx]
add esp, 4
mov dword [ecx + 0x34c], eax
mov eax, dword [ebx]
cmp dword [eax + 0x34c], 0
jne 0x410328
push esi
call dword [sym.imp.libssl_3.dll_SSL_get1_peer_certificate]
mov esi, eax
add esp, 4
test esi, esi
je 0x410328
mov edi, dword [ebx]
mov ecx, edi
push esi
call fcn.004105a0
test al, al
jne 0x410335
push esi
call dword [sym.imp.libcrypto_3.dll_X509_get_subject_name]
add esp, 4
test eax, eax
je 0x41031e
push 0x200
lea ecx, [ebp - 0x210]
push ecx
push 0xd
push eax
call dword [sym.imp.libcrypto_3.dll_X509_NAME_get_text_by_NID]
add esp, 0x10
cmp eax, 0xffffffff
je 0x41031e
push eax
lea eax, [ebp - 0x210]
mov ecx, edi
push eax
call fcn.004107c0
test al, al
jne 0x410335
push esi
call dword [sym.imp.libcrypto_3.dll_X509_free]
add esp, 4
mov eax, dword [ebx + 4]
mov dword [eax], 0xa
xor al, al
jmp 0x410341
push esi
call dword [sym.imp.libcrypto_3.dll_X509_free]
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0044ec8d
mov esp, ebp
pop ebp
ret 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
int3