Function at 0x40e750
Capabilities:
Get socket status

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x378
xor r13d, r13d
xor r15d, r15d
xor ebp, ebp
mov rbx, rcx
lea rdi, [rcx + 0x130]
jmp 0x40e803
mov rcx, qword [rbx + 0x118]
lea rax, [rsp + 0x58]
mov qword [rsp + 0x168], rcx
mov qword [rsp + 0x58], 0x1e
mov qword [rsp + 0x20], rax
inc ecx
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x160]
mov dword [rsp + 0x160], 1
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x40e8c8
xor ecx, ecx
lea rdx, str.stratum_subscribe_timed_out
call fcn.0040aeb0
mov rcx, r12
call sub.msvcrt.dll_free
test r15, r15
jne 0x40e89a
test rbp, rbp
setne al
xor r13d, 1
and al, r13b
je 0x40e9a3
mov r13d, 1
mov rsi, qword [rbx + 0x148]
test rsi, rsi
je 0x40e9f8
mov rcx, rsi
call sub.msvcrt.dll_strlen
lea rcx, [rax + 0x80]
call sub.msvcrt.dll_malloc
mov r12, rax
test r13b, r13b
jne 0x40e9e0
mov r8, rsi
lea rdx, str._id_:_1___method_:__mining.subscribe____params_:___cpuminer_opt_gr_1.1.0_____s__
mov rcx, rax
call fcn.0040aa40
mov rax, qword [0x007a7560]
cmp byte [rax], 0
jne 0x40e9c0
mov rcx, rdi
call fcn.006f9420
mov rcx, rbx
mov rdx, r12
call fcn.0040ada0
mov esi, eax
mov rcx, rdi
call fcn.006fa350
test sil, sil
jne 0x40e780
xor ecx, ecx
lea rdx, str.stratum_subscribe_send_failed
call fcn.0040aeb0
mov rcx, r12
call sub.msvcrt.dll_free
test r15, r15
je 0x40e7ea
mov rax, qword [r15 + 8]
cmp rax, 0xffffffffffffffff
je 0x40e7ea
dec rax
mov qword [r15 + 8], rax
jne 0x40e7ea
mov rcx, r15
call fcn.006f3440
jmp 0x40e7ea
mov rcx, rbx
call fcn.0040e170
mov rbp, rax
test rax, rax
je 0x40ea20
xor edx, edx
mov rcx, rax
lea r8, [rsp + 0x60]
call fcn.006f1c90
mov r15, rax
mov rcx, rbp
call sub.msvcrt.dll_free
test r15, r15
je 0x40ebc8
lea rdx, str.result
mov rcx, r15
call fcn.006f2d00
lea rdx, str.error
mov rcx, r15
mov qword [rsp + 0x30], rax
mov rsi, rax
call fcn.006f2d00
mov r14, rax
test rsi, rsi
je 0x40eb90
cmp dword [rsi], 7
je 0x40eb90
test rax, rax
je 0x40ea50
cmp dword [rax], 7
je 0x40ea50
mov rax, qword [0x007a74e0]
cmp byte [rax], 0
jne 0x40ec18
test r13b, r13b
jne 0x40ec18
mov rcx, r12
call sub.msvcrt.dll_free
mov rax, qword [r15 + 8]
cmp rax, 0xffffffffffffffff
je 0x40e7fd
dec rax
mov qword [r15 + 8], rax
jne 0x40e7ea
xor eax, eax
mov rcx, r15
mov byte [rsp + 0x30], al
call fcn.006f3440
movzx eax, byte [rsp + 0x30]
test al, al
je 0x40e7ea
add rsp, 0x378
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r8, r12
lea rdx, [0x0073a220]
mov ecx, 4
call fcn.0040b1a0
jmp 0x40e855
lea rdx, str._id_:_1___method_:__mining.subscribe____params_:___
mov rcx, r12
call fcn.0040aa40
jmp 0x40e845
mov ecx, pe_nt_image_headers64
call sub.msvcrt.dll_malloc
mov r12, rax
test r13b, r13b
jne 0x40e9e0
lea rdx, str._id_:_1___method_:__mining.subscribe____params_:___cpuminer_opt_gr_1.1.0__
mov rcx, r12
call fcn.0040aa40
jmp 0x40e845
mov rcx, r12
call sub.msvcrt.dll_free
test r15, r15
je 0x40ea40
mov rax, qword [r15 + 8]
cmp rax, 0xffffffffffffffff
jne 0x40e8a8
nop dword [rax + rax]
xor eax, eax
jmp 0x40e9a3
mov rcx, qword [rsp + 0x30]
xor edx, edx
call fcn.006f2f40
lea rdx, [rbx + 0x480]
mov qword [rsp + 0x38], rdx
test rax, rax
je 0x40ebf0
cmp dword [rax], 1
jne 0x40ebf0
mov rcx, rax
mov qword [rsp + 0x40], rax
call fcn.006f2f20
test eax, eax
jle 0x40eb08
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x3c0], rbx
mov rbp, qword [rsp + 0x40]
lea r14d, [rax - 1]
xor esi, esi
jmp 0x40eae8
cmp dword [rax], 1
jne 0x40eafb
xor edx, edx
mov rcx, rax
call fcn.006f2f40
mov rcx, rax
call fcn.006f3160
mov rcx, rax
test rax, rax
je 0x40eadc
lea rdx, str.mining.notify
call qword [sym.imp.msvcrt.dll__stricmp]
test eax, eax
je 0x40ec5c
lea rax, [rsi + 1]
cmp r14, rsi
je 0x40eafb
mov rsi, rax
mov rdx, rsi
mov rcx, rbp
call fcn.006f2f40
mov rbx, rax
test rax, rax
jne 0x40eaa8
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x3c0]
mov rcx, qword [rsp + 0x38]
call fcn.006f9420
mov rcx, qword [rbx + 0x148]
test rcx, rcx
je 0x40eb23
call sub.msvcrt.dll_free
xor eax, eax
mov qword [rbx + 0x148], rax
mov rax, qword [0x0073b1c0]
mov rcx, qword [rsp + 0x38]
mov qword [rbx + 0x138], rax
call fcn.006fa350
mov rdx, qword [rsp + 0x30]
mov r8d, 1
mov rcx, rbx
call fcn.0040b360
mov rcx, r12
mov byte [rsp + 0x30], al
call sub.msvcrt.dll_free
mov rdx, qword [r15 + 8]
movzx eax, byte [rsp + 0x30]
cmp rdx, 0xffffffffffffffff
je 0x40e99b
dec rdx
mov qword [r15 + 8], rdx
jne 0x40e99b
jmp 0x40e98a
mov rax, qword [0x007a74e0]
cmp byte [rax], 0
jne 0x40eba5
test r13b, r13b
je 0x40e965
mov rcx, r12
call sub.msvcrt.dll_free
test r14, r14
jne 0x40ec20
lea rcx, str._unknown_reason_
call sub.msvcrt.dll__strdup
mov r12, rax
jmp 0x40ec30
mov r8d, dword [rsp + 0x60]
xor ecx, ecx
lea r9, [rsp + 0xbc]
lea rdx, str.JSON_decode_failed__d_:__s
call fcn.0040aeb0
mov rcx, r12
call sub.msvcrt.dll_free
jmp 0x40e7ea
mov rcx, rdx
call fcn.006f9420
mov rcx, qword [rbx + 0x148]
test rcx, rcx
je 0x40eb23
call sub.msvcrt.dll_free
jmp 0x40eb23
mov rcx, r12
call sub.msvcrt.dll_free
mov edx, 3
mov rcx, r14
call fcn.006ef880
mov r12, rax
mov r8, r12
lea rdx, str.JSON_RPC_call_failed:__s
xor ecx, ecx
call fcn.0040aeb0
mov rcx, r12
call sub.msvcrt.dll_free
mov rax, qword [r15 + 8]
cmp rax, 0xffffffffffffffff
jne 0x40e97b
jmp 0x40e7ea
mov r14, rbx
mov rcx, r14
mov edx, 1
mov rbp, qword [rsp + 0x48]
mov rbx, qword [rsp + 0x3c0]
call fcn.006f2f40
mov rcx, rax
call fcn.006f3160
mov r14, rax
mov rax, qword [0x007a74e0]
cmp byte [rax], 0
je 0x40ecde
test r14, r14
je 0x40eb08
mov r8, r14
lea rdx, str.Stratum_session_id:__s
mov ecx, 4
call fcn.0040b1a0
mov rcx, qword [rsp + 0x38]
call fcn.006f9420
mov rcx, qword [rbx + 0x148]
test rcx, rcx
je 0x40ecd1
call sub.msvcrt.dll_free
test r14, r14
je 0x40eb23
mov rcx, r14
call sub.msvcrt.dll__strdup
jmp 0x40eb25
mov rcx, qword [rsp + 0x38]
call fcn.006f9420
mov rcx, qword [rbx + 0x148]
test rcx, rcx
jne 0x40ecc3
jmp 0x40ecc8