Function at 0x1400cf8e0
Capabilities:
Connect socket
Get socket status
Resolve dns

Disassembly:
push rbp
sub rsp, 0x4b0
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x440], rcx
mov rax, qword [rbp + 0x440]
add rax, 0x2b8
mov r9d, 0xa44
lea r8, str.setup_stratum_socket
lea rdx, str..._.._cgminer_4.9.1_util.c
mov rcx, rax
call dbg._mutex_lock
mov rax, qword [rbp + 0x440]
mov byte [rax + 0x281], 0
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x228]
test rax, rax
je 0x1400cf95b
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x228]
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [rbp + 0x440]
mov qword [rax + 0x228], 0
mov rax, qword [rbp + 0x440]
add rax, 0x2b8
mov r9d, 0xa49
lea r8, str.setup_stratum_socket
lea rdx, str..._.._cgminer_4.9.1_util.c
mov rcx, rax
call dbg._mutex_unlock
lea rax, [rbp + 0x3d0]
mov r8d, 0x30
mov edx, 0
mov rcx, rax
call sym.memset
mov dword [rbp + 0x3d4], 0
mov dword [rbp + 0x3d8], 1
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0xe0]
test rax, rax
jne 0x1400cfa44
mov rax, qword [0x14011bf20]
mov rax, qword [rax]
test rax, rax
je 0x1400cfa44
mov rax, qword [0x14011bf20]
mov rdx, qword [rax]
mov rax, qword [rbp + 0x440]
mov qword [rax + 0xe0], rdx
mov rax, qword [rbp + 0x440]
lea rcx, [rax + 0x250]
mov rax, qword [rbp + 0x440]
lea rdx, [rax + 0x248]
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0xe0]
mov r8, rcx
mov rcx, rax
call dbg.extract_sockaddr
mov rax, qword [rbp + 0x440]
mov dword [rax + 0xd8], 5
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0xe0]
test rax, rax
je 0x1400cfa83
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x248]
mov qword [rbp + 0x420], rax
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x250]
mov qword [rbp + 0x418], rax
jmp 0x1400cfaad
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x240]
mov qword [rbp + 0x420], rax
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x220]
mov qword [rbp + 0x418], rax
lea r8, [rbp + 0x400]
lea rcx, [rbp + 0x3d0]
mov rdx, qword [rbp + 0x418]
mov rax, qword [rbp + 0x420]
mov r9, r8
mov r8, rcx
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_getaddrinfo]
call rax
test eax, eax
je 0x1400cfbf9
mov rax, qword [rbp + 0x440]
movzx eax, byte [rax + 0x63]
xor eax, 1
test al, al
je 0x1400cfb7a
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cfb22
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cfb22
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x1400cfb6d
mov rcx, qword [rbp + 0x420]
lea rax, [rbp + 0x1b0]
mov rdx, qword [rbp + 0x418]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Failed_to_resolve___wrong_URL___s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov rax, qword [rbp + 0x440]
mov byte [rax + 0x63], 1
jmp 0x1400cfbef
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cfba4
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cfba4
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 2
jle 0x1400cfbef
mov rcx, qword [rbp + 0x420]
lea rax, [rbp + 0x1b0]
mov rdx, qword [rbp + 0x418]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Failed_to_getaddrinfo_for__s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 3
call dbg._applog
mov eax, 0
jmp 0x1400d041a
mov rax, qword [rbp + 0x400]
mov qword [rbp + 0x428], rax
jmp 0x1400d00a5
mov rax, qword [rbp + 0x428]
mov ecx, dword [rax + 0xc]
mov rax, qword [rbp + 0x428]
mov edx, dword [rax + 8]
mov rax, qword [rbp + 0x428]
mov eax, dword [rax + 4]
mov r8d, ecx
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_socket]
call rax
mov dword [rbp + 0x414], eax
cmp dword [rbp + 0x414], 0xffffffff
jne 0x1400cfcc1
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x1400d008c
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cfc87
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cfc87
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x1400d008c
lea rax, [rbp + 0x1b0]
lea r8, str.Failed_socket
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
jmp 0x1400d008c
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
call dbg.noblock_socket
mov rax, qword [rbp + 0x428]
mov rax, qword [rax + 0x10]
mov ecx, eax
mov rax, qword [rbp + 0x428]
mov rdx, qword [rax + 0x20]
mov eax, dword [rbp + 0x414]
cdqe
mov r8d, ecx
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_connect]
call rax
cmp eax, 0xffffffff
jne 0x1400d001c
mov dword [rbp + 0x3c8], 1
mov dword [rbp + 0x3cc], 0
call dbg.sock_connecting
xor eax, 1
test al, al
je 0x1400cfdbb
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x1400d008f
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cfd81
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cfd81
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x1400d008f
lea rax, [rbp + 0x1b0]
lea r8, str.Failed_sock_connect
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
jmp 0x1400d008f
nop
mov dword [rbp + 0x1b0], 0
mov dword [rbp + 0x410], 0
jmp 0x1400cfdf4
mov eax, dword [rbp + 0x410]
mov rdx, qword [rbp + rax*8 + 0x1b8]
mov eax, dword [rbp + 0x414]
cdqe
cmp rdx, rax
je 0x1400cfe02
add dword [rbp + 0x410], 1
mov eax, dword [rbp + 0x1b0]
cmp dword [rbp + 0x410], eax
jb 0x1400cfdd2
mov eax, dword [rbp + 0x1b0]
cmp dword [rbp + 0x410], eax
jne 0x1400cfe41
mov eax, dword [rbp + 0x1b0]
cmp eax, 0x3f
ja 0x1400cfe41
mov eax, dword [rbp + 0x414]
movsxd rdx, eax
mov eax, dword [rbp + 0x410]
mov qword [rbp + rax*8 + 0x1b8], rdx
mov eax, dword [rbp + 0x1b0]
add eax, 1
mov dword [rbp + 0x1b0], eax
mov eax, dword [rbp + 0x414]
add eax, 1
lea rcx, [rbp + 0x1b0]
lea rdx, [rbp + 0x3c8]
mov qword [rsp + 0x20], rdx
mov r9d, 0
mov r8, rcx
mov edx, 0
mov ecx, eax
mov rax, qword [sym.imp.WSOCK32.dll_select]
call rax
mov dword [rbp + 0x40c], eax
cmp dword [rbp + 0x40c], 0
jle 0x1400cff80
mov eax, dword [rbp + 0x414]
cdqe
lea rdx, [rbp + 0x1b0]
mov rcx, rax
call sym.__WSAFDIsSet
test eax, eax
je 0x1400cff80
mov dword [rbp + 0x3c4], 4
mov eax, dword [rbp + 0x414]
cdqe
lea rcx, [rbp + 0x3c0]
lea rdx, [rbp + 0x3c4]
mov qword [rsp + 0x20], rdx
mov r9, rcx
mov r8d, 0x1007
mov edx, 0xffff
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_getsockopt]
call rax
mov dword [rbp + 0x408], eax
cmp dword [rbp + 0x408], 0
jne 0x1400cff80
mov eax, dword [rbp + 0x3c0]
test eax, eax
jne 0x1400cff80
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x1400cff6b
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cff3c
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cff3c
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x1400cff6b
lea rax, [hints.ai_addrlen]
lea r8, str.Succeeded_delayed_connect
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [hints.ai_addrlen]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
call dbg.block_socket
jmp 0x1400d00b3
cmp dword [rbp + 0x40c], 0
jns 0x1400cff97
call dbg.interrupted
test al, al
je 0x1400cff97
jmp 0x1400cfdbc
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
mov rax, qword [sym.imp.WSOCK32.dll_closesocket]
call rax
mov rax, qword [0x14011bd40]
movzx eax, byte [rax]
test al, al
je 0x1400d0092
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400cffeb
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400cffeb
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 3
jle 0x1400d0092
lea rax, [hints.ai_addrlen]
lea r8, str.Select_timeout_failed_connect
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [hints.ai_addrlen]
mov r8d, 0
mov rdx, rax
mov ecx, 4
call dbg._applog
jmp 0x1400d0092
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400d0045
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400d0045
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x1400d007a
lea rax, [rbp + 0x1b0]
lea r8, str.Succeeded_immediate_connect
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
call dbg.block_socket
jmp 0x1400d00b3
nop
jmp 0x1400d0093
nop
jmp 0x1400d0093
nop
mov rax, qword [rbp + 0x428]
mov rax, qword [rax + 0x28]
mov qword [rbp + 0x428], rax
cmp qword [rbp + 0x428], 0
jne 0x1400cfc0c
cmp qword [rbp + 0x428], 0
jne 0x1400d0153
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400d00eb
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400d00eb
mov rax, qword [0x14011be10]
mov eax, dword [rax]
cmp eax, 2
jle 0x1400d0136
mov rcx, qword [rbp + 0x420]
lea rax, [rbp + 0x1b0]
mov rdx, qword [rbp + 0x418]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Failed_to_connect_to_stratum_on__s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 3
call dbg._applog
mov rax, qword [rbp + 0x400]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
mov eax, 0
jmp 0x1400d041a
mov rax, qword [rbp + 0x400]
mov rcx, rax
mov rax, qword [sym.imp.WS2_32.dll_freeaddrinfo]
call rax
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0xe0]
test rax, rax
je 0x1400d0338
mov rax, qword [rbp + 0x440]
mov eax, dword [rax + 0xd8]
cmp eax, 7
ja case.0x1400d01b3.2
mov eax, eax
lea rdx, [rax*4]
lea rax, [0x140116d4c]
mov eax, dword [rdx + rax]
cdqe
lea rdx, [0x140116d4c]
add rax, rdx
jmp rax
mov edx, dword [rbp + 0x414]
mov rax, qword [rbp + 0x440]
mov r8d, 1
mov rcx, rax
call dbg.http_negotiate
xor eax, 1
test al, al
je 0x1400d032b
mov eax, 0
jmp 0x1400d041a
mov edx, dword [rbp + 0x414]
mov rax, qword [rbp + 0x440]
mov r8d, 0
mov rcx, rax
call dbg.http_negotiate
xor eax, 1
test al, al
je 0x1400d032e
mov eax, 0
jmp 0x1400d041a
mov edx, dword [rbp + 0x414]
mov rax, qword [rbp + 0x440]
mov rcx, rax
call dbg.socks5_negotiate
xor eax, 1
test al, al
je 0x1400d0331
mov eax, 0
jmp 0x1400d041a
mov edx, dword [rbp + 0x414]
mov rax, qword [rbp + 0x440]
mov r8d, 0
mov rcx, rax
call dbg.socks4_negotiate
xor eax, 1
test al, al
je 0x1400d0334
mov eax, 0
jmp 0x1400d041a
mov edx, dword [rbp + 0x414]
mov rax, qword [rbp + 0x440]
mov r8d, 1
mov rcx, rax
call dbg.socks4_negotiate
xor eax, 1
test al, al
je 0x1400d0337
mov eax, 0
jmp 0x1400d041a
mov rax, qword [0x14011c1e0]
movzx eax, byte [rax]
test al, al
jne 0x1400d02c8
mov rax, qword [0x14011be20]
movzx eax, byte [rax]
test al, al
jne 0x1400d02c8
mov rax, qword [0x14011be10]
mov eax, dword [rax]
test eax, eax
jle 0x1400d0321
mov rax, qword [rbp + 0x440]
mov rdx, qword [rax + 0x250]
mov rax, qword [rbp + 0x440]
mov rcx, qword [rax + 0x248]
lea rax, [rbp + 0x1b0]
mov qword [rsp + 0x20], rdx
mov r9, rcx
lea r8, str.Unsupported_proxy_type_for__s:_s
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 0
mov rdx, rax
mov ecx, 1
call dbg._applog
mov eax, 0
jmp 0x1400d041a
nop
jmp 0x1400d0338
nop
jmp 0x1400d0338
nop
jmp 0x1400d0338
nop
jmp 0x1400d0338
nop
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x230]
test rax, rax
jne 0x1400d03ee
mov edx, 1
mov ecx, 0x2000
call sym.calloc
mov rdx, rax
mov rax, qword [rbp + 0x440]
mov qword [rax + 0x230], rdx
mov rax, qword [rbp + 0x440]
mov rax, qword [rax + 0x230]
test rax, rax
jne 0x1400d03dc
lea rax, [rbp + 0x1b0]
mov dword [rsp + 0x28], 0xabf
lea rdx, str.setup_stratum_socket
mov qword [rsp + 0x20], rdx
lea r9, str..._.._cgminer_4.9.1_util.c
lea r8, str.Failed_to_calloc_pool_sockbuf_in__s__s__:_d
mov edx, 0x200
mov rcx, rax
call dbg.snprintf
lea rax, [rbp + 0x1b0]
mov r8d, 1
mov rdx, rax
mov ecx, 0
call dbg._applog
mov ecx, 1
call dbg._quit
mov rax, qword [rbp + 0x440]
mov qword [rax + 0x238], 0x2000
mov eax, dword [rbp + 0x414]
movsxd rdx, eax
mov rax, qword [rbp + 0x440]
mov qword [rax + 0x228], rdx
mov eax, dword [rbp + 0x414]
cdqe
mov rcx, rax
call dbg.keep_sockalive
mov eax, 1
add rsp, 0x4b0
pop rbp
ret