Function at 0x40b580
Capabilities:
Check http status code

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2a8
xor eax, eax
mov r15d, 0x1e
mov r13d, dword [rsp + 0x318]
mov r12, rcx
lea rdi, [rsp + 0x1b0]
mov ecx, 0x1e
and r13d, 1
rep stosq qword [rdi], rax
mov r10, rdx
mov rsi, r8
mov rbp, r9
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x1a0], 0
mov qword [rsp + 0x1a8], 0
je 0x40b602
mov rax, qword [0x006f1f50]
mov r15d, dword [rax]
mov rax, qword [0x006f1ec0]
lea r14, [rsp + 0x80]
mov rbx, qword [sym.imp.libcurl_4.dll_curl_easy_setopt]
mov qword [rsp + 0x80], 0
mov qword [rsp + 0x88], 0
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0x78], r14
cmp byte [rax], 0
jne 0x40bc50
mov r8, r10
mov edx, 0x2712
mov rcx, r12
call rbx
mov rax, qword [0x006f1e30]
mov r8, qword [rax]
test r8, r8
je 0x40b67c
mov edx, 0x2751
mov rcx, r12
call rbx
lea rdi, [rsp + 0x1a0]
xor r8d, r8d
mov edx, 0x40
mov rcx, r12
call rbx
lea r8, [0x00690be3]
mov edx, 0x2776
mov rcx, r12
call rbx
xor r8d, r8d
mov edx, 0x2d
mov rcx, r12
call rbx
mov r8d, 1
mov edx, 0x63
mov rcx, r12
call rbx
mov r8d, 1
mov edx, 0x79
mov rcx, r12
call rbx
lea r8, [0x0040a7e0]
mov edx, 0x4e2b
mov rcx, r12
call rbx
lea r8, [rsp + 0x60]
mov edx, 0x2711
mov rcx, r12
call rbx
mov r8, rdi
mov edx, 0x271a
mov rcx, r12
call rbx
mov rax, qword [0x006f1f10]
cmp byte [rax], 0
jne 0x40bc30
mov r8d, r15d
mov edx, 0xd
mov rcx, r12
call rbx
lea r8, [0x0040a5f0]
mov edx, 0x4e6f
mov rcx, r12
call rbx
mov r8, r14
mov edx, 0x272d
mov rcx, r12
call rbx
mov rax, qword [0x006f1ed0]
mov r8, qword [rax]
test r8, r8
je 0x40b764
mov edx, 0x2714
mov rcx, r12
call rbx
mov rax, qword [0x006f1ee0]
mov edx, 0x65
mov rcx, r12
mov r8d, dword [rax]
call rbx
test rsi, rsi
je 0x40b786
mov r8, rsi
mov edx, 0x2715
mov rcx, r12
call rbx
mov r8d, 1
mov edx, 0x6b
mov rcx, r12
call rbx
test r13d, r13d
jne 0x40bca0
mov r8, rbp
mov edx, 0x271f
mov rcx, r12
call rbx
mov rax, qword [0x006f1ec0]
cmp byte [rax], 0
jne 0x40bc80
mov rsi, qword [sym.imp.libcurl_4.dll_curl_slist_append]
xor ecx, ecx
lea rdx, str.Content_Type:_application_json
call rsi
mov rcx, rax
lea rdx, str.User_Agent:_cpuminer_opt_23.11_x64W
call rsi
lea rdx, str.X_Mining_Extensions:_longpoll_reject_reason
mov rcx, rax
call rsi
mov edx, 0x2727
mov rcx, r12
mov r8, rax
mov r14, rax
call rbx
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_perform]
cmp qword [rsp + 0x310], 0
mov ebx, eax
je 0x40b806
mov rax, qword [rsp + 0x310]
mov dword [rax], ebx
test ebx, ebx
jne 0x40bef0
mov rax, qword [0x006f2580]
cmp byte [rax], 0
je 0x40b850
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x40b850
mov r8d, 0xe
lea rdx, str.stratumtcp:__
call qword [sym.imp.msvcrt.dll__strnicmp]
test eax, eax
je 0x40be40
nop word cs:[rax + rax]
nop dword [rax]
mov rax, qword [0x006f1ca0]
cmp byte [rax], 0
je 0x40bb30
mov r9, qword [rsp + 0x60]
test r9, r9
je 0x40bf90
mov rcx, r9
mov qword [rsp + 0x28], r9
call sub.msvcrt.dll_strlen
mov edx, 1
lea rcx, [rax + rax + 1]
call sub.msvcrt.dll_calloc
mov r9, qword [rsp + 0x28]
test rax, rax
mov r13, rax
je 0x40c0c0
movsx cx, byte [r9]
mov eax, ecx
test cx, cx
je 0x40c0c0
mov rdi, qword [sym.imp.msvcrt.dll__errno]
mov dword [rsp + 0x28], 0
xor r11d, r11d
xor edx, edx
xor r15d, r15d
mov qword [rsp + 0x30], rdi
lea rdi, [rsp + 0xa0]
mov qword [rsp + 0x38], rdi
jmp 0x40b91e
cmp cx, 0x5c
je 0x40bb00
mov ecx, r15d
or ecx, edx
test cl, cl
jne 0x40ba70
movsx edx, al
sub edx, 0x30
cmp edx, 9
jbe 0x40ba50
mov edx, ecx
mov r15d, ecx
mov byte [rbp], al
movsx cx, byte [rsi]
mov eax, ecx
test cx, cx
je 0x40b949
mov r11d, r10d
mov ebx, edi
lea r10d, [r11 + 1]
movsxd rbp, ebx
lea edi, [rbx + 1]
movsxd rsi, r10d
add rbp, r13
add rsi, r9
cmp cx, 0x22
jne 0x40b8e0
mov byte [rbp], al
movsx cx, byte [rsi]
xor r15d, 1
mov eax, ecx
test cx, cx
jne 0x40b919
mov rax, qword [rsp + 0x30]
call rax
xor edx, edx
mov rcx, r13
mov r8, qword [rsp + 0x38]
mov dword [rax], 0
call fcn.00651c00
mov rcx, r13
mov r15, rax
call sub.msvcrt.dll_free
test r15, r15
je 0x40c0e0
mov rax, qword [0x006f1ec0]
cmp byte [rax], 0
jne 0x40bcc0
lea rdx, str.result
mov rcx, r15
call fcn.00652ce0
lea rdx, str.error
mov rcx, r15
mov rbx, rax
call fcn.00652ce0
mov r13, rax
test rbx, rbx
je 0x40bd20
test rax, rax
je 0x40b9ce
cmp dword [rax], 7
je 0x40b9ce
test byte [rsp + 0x318], 4
je 0x40bd29
mov rcx, qword [rsp + 0x88]
test rcx, rcx
je 0x40b9f2
call fcn.00653110
lea rdx, str.reject_reason
mov rcx, r15
mov r8, rax
call fcn.006538c0
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
mov rcx, r14
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
call qword [sym.imp.libcurl_4.dll_curl_slist_free_all]
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_reset]
mov rax, r15
add rsp, 0x2a8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov r15d, ecx
mov dword [rsp + 0x28], ebx
mov edx, 1
jmp 0x40b90b
test dl, dl
je 0x40b90b
lea ecx, [rax - 0x2b]
mov r8d, ecx
cmp cl, 0x3a
jbe 0x40bd00
mov ecx, ebx
sub ecx, dword [rsp + 0x28]
xor edx, edx
cmp ecx, 4
jle 0x40b90b
mov dword [rsp + 0x4c], r11d
mov qword [rsp + 0x40], r9
mov rax, qword [rsp + 0x30]
mov dword [rsp + 0x48], r10d
call rax
mov r8d, 0xa
movsxd rcx, dword [rsp + 0x28]
mov rdx, qword [rsp + 0x38]
mov dword [rax], 0
add rcx, r13
call fcn.00684030
mov rax, qword [rsp + 0xa0]
mov r10d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
movsxd r11, dword [rsp + 0x4c]
cmp byte [rax], 0
je 0x40c080
movzx eax, byte [r9 + r11]
xor edx, edx
jmp 0x40b90b
mov byte [rbp], 0x5c
movzx eax, byte [rsi]
test al, al
je 0x40b949
lea r10d, [r11 + 2]
movsxd rdi, edi
movsxd rsi, r10d
lea rbp, [r13 + rdi]
lea edi, [rbx + 2]
add rsi, r9
jmp 0x40b90b
mov rax, qword [0x006f2570]
cmp byte [rax], 0
je 0x40b860
mov rdi, qword [rsp + 0x80]
test rdi, rdi
je 0x40b860
mov rax, qword [0x006f1c90]
cmp byte [rax], 0
jne 0x40b860
mov rax, qword [0x006f1bc0]
cmp byte [rax], 0
je 0x40b860
mov rax, qword [0x006f1cb0]
cmp byte [rax], 0
jne 0x40b860
mov rax, qword [0x006f1ca0]
mov rdx, qword [0x006f2510]
mov ecx, 1
mov byte [rax], 1
mov rax, qword [0x006f1d00]
movsxd rax, dword [rax]
lea rax, [rax + rax*4]
shl rax, 4
add rax, qword [rdx]
mov edx, 0x18
mov rsi, qword [rax + 0x20]
call sub.msvcrt.dll_calloc
mov r15, rax
test rax, rax
je 0x40bc14
mov qword [rax], rdi
lea r13, [rsi + 0x18]
lea rdi, [rax + 8]
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
mov rcx, r13
call fcn.006594e0
cmp byte [rsi + 0x10], 0
jne 0x40c13d
mov rax, qword [rsi + 8]
vmovq xmm2, rsi
mov qword [rsi + 8], rdi
vpinsrq xmm0, xmm2, rax, 1
vmovups xmmword [r15 + 8], xmm0
mov qword [rax], rdi
lea rcx, [rsi + 0x20]
call fcn.0065a600
mov rcx, r13
call fcn.0065a410
mov qword [rsp + 0x80], 0
jmp 0x40b860
mov r8d, 1
mov edx, 0x34
mov rcx, r12
call rbx
jmp 0x40b70c
mov qword [rsp + 0x2f8], r10
mov r8d, 1
mov edx, 0x29
mov rcx, r12
call rbx
mov r10, qword [rsp + 0x2f8]
jmp 0x40b656
mov r8, rbp
lea rdx, str.JSON_protocol_request:_n_s_n
mov ecx, 5
call fcn.0040ab60
jmp 0x40b7ac
lea r8, [0x0040a580]
mov edx, 0x4eb4
mov rcx, r12
call rbx
jmp 0x40b78f
mov rcx, r15
mov edx, 3
call fcn.0064f7f0
lea rdx, str.JSON_protocol_response:_n_s
mov ecx, 5
mov r13, rax
mov r8, rax
call fcn.0040ab60
mov rcx, r13
call sub.msvcrt.dll_free
jmp 0x40b989
movabs rcx, 0x400000004007fed
bt rcx, r8
jb 0x40b90b
jmp 0x40ba87
test rax, rax
je 0x40c030
xor edx, edx
mov rcx, r13
call fcn.0064f7f0
lea rdx, str.message
mov rcx, r13
mov r15, rax
call fcn.00652ce0
lea rdx, str.code
mov rcx, r13
mov rbx, rax
call fcn.00652ce0
cmp qword [rsp + 0x310], 0
mov rsi, rax
je 0x40bd76
mov rcx, rax
call fcn.00653290
test rax, rax
jne 0x40c110
test rbx, rbx
je 0x40bd84
cmp dword [rbx], 2
je 0x40bfb0
mov rax, qword [r13 + 8]
cmp rax, 0xffffffffffffffff
je 0x40bd9b
dec rax
mov qword [r13 + 8], rax
je 0x40c050
cmp qword [rsp + 0x310], 0
je 0x40bdb2
mov rax, qword [0x006f1e50]
cmp byte [rax], 0
je 0x40bdc6
mov r8, r15
lea rdx, str.JSON_RPC_call_failed:__s
mov ecx, 1
call fcn.0040a9d0
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x80]
xor r15d, r15d
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x88]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x90]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
mov rcx, r14
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x70], 0
mov qword [rsp + 0x78], 0
call qword [sym.imp.libcurl_4.dll_curl_slist_free_all]
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_reset]
jmp 0x40ba32
mov rax, qword [0x006f1cb0]
mov rdx, qword [0x006f2510]
mov ecx, 1
mov rdi, qword [rsp + 0x90]
mov byte [rax], 1
mov rax, qword [0x006f24f0]
movsxd rax, dword [rax]
lea rax, [rax + rax*4]
shl rax, 4
add rax, qword [rdx]
mov edx, 0x18
mov rsi, qword [rax + 0x20]
call sub.msvcrt.dll_calloc
mov r15, rax
test rax, rax
je 0x40bedb
mov qword [rax], rdi
lea r13, [rsi + 0x18]
lea rdi, [rax + 8]
mov qword [rax + 8], rdi
mov qword [rax + 0x10], rdi
mov rcx, r13
call fcn.006594e0
cmp byte [rsi + 0x10], 0
jne 0x40c130
mov rax, qword [rsi + 8]
vmovq xmm1, rsi
mov qword [rsi + 8], rdi
vpinsrq xmm0, xmm1, rax, 1
vmovups xmmword [r15 + 8], xmm0
mov qword [rax], rdi
lea rcx, [rsi + 0x20]
call fcn.0065a600
mov rcx, r13
call fcn.0065a410
mov qword [rsp + 0x90], 0
jmp 0x40b850
lea r8, [rsp + 0x5c]
mov edx, 0x200002
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_getinfo]
cmp ebx, 0x1c
jne 0x40bf0d
test r13d, r13d
jne 0x40bf39
test byte [rsp + 0x318], 2
je 0x40bf25
cmp dword [rsp + 0x5c], 0x194
je 0x40c060
mov r8, rdi
lea rdx, str.HTTP_request_failed:__s
mov ecx, 1
call fcn.0040a9d0
cmp qword [rsp + 0x310], 0
je 0x40bdce
test byte [rsp + 0x318], 2
je 0x40bdce
cmp dword [rsp + 0x5c], 0x194
jne 0x40bdce
nop word cs:[rax + rax]
nop
mov rax, qword [rsp + 0x310]
mov dword [rax], 0
jmp 0x40bdce
lea rdx, str.Empty_data_received_in_json_rpc_call.
mov ecx, 1
call fcn.0040a9d0
jmp 0x40bdce
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, rbx
call fcn.00653180
mov rcx, rax
call sub.msvcrt.dll__strdup
mov r15, rax
mov rax, qword [0x006f1ca0]
cmp byte [rax], 0
mov rax, qword [r13 + 8]
je 0x40bd88
test r15, r15
je 0x40bd88
mov ecx, 0x13
lea rdi, str.method_not_getwork
mov rsi, r15
repe cmpsb byte [rsi], byte [rdi]
seta dl
sbb dl, 0
test dl, dl
jne 0x40bd88
cmp rax, 0xffffffffffffffff
je 0x40bdc6
dec rax
mov qword [r13 + 8], rax
jne 0x40bdc6
mov rcx, r13
call fcn.006534b0
jmp 0x40bdc6
lea rcx, str._unknown_reason_
call sub.msvcrt.dll__strdup
mov r15, rax
jmp 0x40bd9b
mov rcx, r13
call fcn.006534b0
jmp 0x40bd9b
cmp qword [rsp + 0x310], 0
jne 0x40bf70
jmp 0x40bdce
mov rax, qword [rsp + 0x30]
call rax
cmp dword [rax], 0x22
mov r10d, dword [rsp + 0x48]
mov r9, qword [rsp + 0x40]
movsxd r11, dword [rsp + 0x4c]
jne 0x40baec
mov byte [rbp], 0x2e
lea ebp, [rbx + 2]
movsxd rdi, edi
movsxd rbp, ebp
mov byte [r13 + rdi], 0x30
lea edi, [rbx + 3]
add rbp, r13
jmp 0x40baec
mov rax, qword [sym.imp.msvcrt.dll__errno]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x38], rax
jmp 0x40b949
mov r8d, dword [rsp + 0xa0]
lea r9, [rsp + 0xfc]
lea rdx, str.JSON_decode_failed__d_:__s
mov ecx, 1
call fcn.0040a9d0
jmp 0x40bdce
mov rcx, rsi
call fcn.00653290
mov rdi, qword [rsp + 0x310]
mov dword [rdi], eax
jmp 0x40bd76
mov rcx, r15
call sub.msvcrt.dll_free
jmp 0x40beca
mov rcx, r15
call sub.msvcrt.dll_free
jmp 0x40bc03