Function at 0x40b920
Capabilities:
Check http status code

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2f8
mov r14d, 0x1e
mov r12, rcx
mov rbp, rdx
mov rdi, r8
xor edx, edx
lea rcx, [rsp + 0x200]
mov r8d, 0xf0
mov r13, r9
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 0
mov qword [rsp + 0x1f0], 0
mov qword [rsp + 0x1f8], 0
call sub.msvcrt.dll_memset
mov esi, dword [rsp + 0x368]
and esi, 1
je 0x40b99a
mov rax, qword [0x00725820]
mov r14d, dword [rax]
mov rax, qword [0x00725790]
mov rbx, qword [sym.imp.libcurl_4.dll_curl_easy_setopt]
mov qword [rsp + 0x90], 0
mov qword [rsp + 0x98], 0
mov qword [rsp + 0xa0], 0
cmp byte [rax], 0
jne 0x40bfd0
mov r8, rbp
mov edx, 0x2712
mov rcx, r12
call rbx
mov rax, qword [0x007256f0]
mov r8, qword [rax]
test r8, r8
je 0x40b9fb
mov edx, 0x2751
mov rcx, r12
call rbx
lea rbp, [rsp + 0x70]
xor r8d, r8d
mov edx, 0x40
mov rcx, r12
call rbx
lea r8, [0x006bac74]
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, [0x0040ae30]
mov edx, 0x4e2b
mov rcx, r12
call rbx
lea r8, [rsp + 0x60]
mov edx, 0x2711
mov rcx, r12
call rbx
lea r8, [0x0040ac50]
mov edx, 0x4e2c
mov rcx, r12
call rbx
mov r8, rbp
mov edx, 0x2719
mov rcx, r12
call rbx
lea r8, [0x0040ab50]
mov edx, 0x4ec7
mov rcx, r12
call rbx
mov r8, rbp
lea rbp, [rsp + 0x1f0]
mov edx, 0x27b8
mov rcx, r12
call rbx
mov r8, rbp
mov edx, 0x271a
mov rcx, r12
call rbx
mov rax, qword [0x007257e0]
cmp byte [rax], 0
jne 0x40c030
mov r8d, r14d
mov edx, 0xd
mov rcx, r12
call rbx
lea r8, [0x0040aca0]
mov edx, 0x4e6f
mov rcx, r12
call rbx
lea r8, [rsp + 0x90]
mov edx, 0x272d
mov rcx, r12
call rbx
mov rax, qword [0x007257a0]
mov r8, qword [rax]
test r8, r8
je 0x40bb29
mov edx, 0x2714
mov rcx, r12
call rbx
mov rax, qword [0x007257b0]
mov edx, 0x65
mov rcx, r12
mov r8d, dword [rax]
call rbx
test rdi, rdi
je 0x40bb4b
mov r8, rdi
mov edx, 0x2715
mov rcx, r12
call rbx
mov r8d, 1
mov edx, 0x6b
mov rcx, r12
call rbx
test esi, esi
jne 0x40c010
mov r8d, 1
mov edx, 0x2f
mov rcx, r12
call rbx
mov rax, qword [0x00725790]
cmp byte [rax], 0
jne 0x40bff0
mov rcx, r13
mov qword [rsp + 0x70], r13
lea r13, [rsp + 0xb0]
call sub.msvcrt.dll_strlen
mov rcx, r13
lea rdx, str.Content_Length:__lu
mov qword [rsp + 0x80], 0
mov r8, rax
mov qword [rsp + 0x78], rax
call fcn.0040ab90
xor ecx, ecx
lea rdx, str.Content_Type:_application_json
mov rdi, qword [sym.imp.libcurl_4.dll_curl_slist_append]
call rdi
mov rdx, r13
mov rcx, rax
call rdi
lea rdx, str.User_Agent:_cpuminer_opt_gr_1.1.0
mov rcx, rax
call rdi
lea rdx, str.X_Mining_Extensions:_longpoll_reject_reason
mov rcx, rax
call rdi
mov edx, 0x2727
mov rcx, r12
mov r8, rax
mov r13, rax
call rbx
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_perform]
cmp qword [rsp + 0x360], 0
mov edi, eax
je 0x40bc0d
mov rax, qword [rsp + 0x360]
mov dword [rax], edi
test edi, edi
jne 0x40c235
mov rax, qword [0x00725f50]
cmp byte [rax], 0
je 0x40bc50
mov rcx, qword [rsp + 0xa0]
test rcx, rcx
je 0x40bc50
mov r8d, 0xe
lea rdx, str.stratumtcp:__
call qword [sym.imp.msvcrt.dll__strnicmp]
test eax, eax
je 0x40c189
nop dword [rax]
mov rax, qword [0x00725520]
cmp byte [rax], 0
je 0x40bed0
mov r15, qword [rsp + 0x60]
test r15, r15
je 0x40c2b8
mov rcx, r15
call sub.msvcrt.dll_strlen
mov edx, 1
lea rcx, [rax + rax + 1]
call sub.msvcrt.dll_calloc
mov r14, rax
test rax, rax
je 0x40c439
movsx cx, byte [r15]
mov eax, ecx
test cx, cx
je 0x40c439
mov r11, qword [sym.imp.msvcrt.dll__errno]
xor r10d, r10d
xor esi, esi
xor r8d, r8d
xor r9d, r9d
lea rdx, [rsp + 0xf0]
mov qword [rsp + 0x340], r12
jmp 0x40bd2c
movsxd rbp, edi
lea ebx, [rdi + 1]
add rbp, r14
cmp cx, 0x5c
je 0x40bd40
mov ecx, r9d
or ecx, r8d
test cl, cl
jne 0x40be60
movsx r8d, al
sub r8d, 0x30
cmp r8d, 9
jbe 0x40be90
mov r8d, ecx
mov r9d, ecx
mov ebx, edi
nop word [rax + rax]
lea edi, [rbx + 1]
inc esi
movsxd rbx, ebx
mov byte [r14 + rbx], al
movsxd rax, esi
movsx cx, byte [r15 + rax]
mov eax, ecx
test cx, cx
je 0x40bd60
cmp cx, 0x22
jne 0x40bcd0
xor r9d, 1
mov ebx, edi
jmp 0x40bd10
inc esi
mov byte [rbp], 0x5c
movsxd rax, esi
movzx eax, byte [r15 + rax]
test al, al
jne 0x40bd10
nop word cs:[rax + rax]
nop dword [rax]
mov r12, qword [rsp + 0x340]
mov qword [rsp + 0x28], rdx
call r11
mov rdx, qword [rsp + 0x28]
mov rcx, r14
mov dword [rax], 0
mov r8, rdx
xor edx, edx
call fcn.00672680
mov rcx, r14
mov r15, rax
call sub.msvcrt.dll_free
test r15, r15
je 0x40c44d
mov rax, qword [0x00725790]
cmp byte [rax], 0
jne 0x40c050
lea rdx, str.result
mov rcx, r15
call fcn.00673780
lea rdx, str.error
mov rcx, r15
mov rbx, rax
call fcn.00673780
mov r14, rax
test rbx, rbx
je 0x40c081
test rax, rax
je 0x40bdf1
cmp dword [rax], 7
je 0x40bdf1
test byte [rsp + 0x368], 4
je 0x40c08a
mov rcx, qword [rsp + 0x98]
test rcx, rcx
je 0x40be15
call fcn.00673ba0
lea rdx, str.reject_reason
mov rcx, r15
mov r8, rax
call fcn.006743b0
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
mov rcx, r13
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 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, 0x2f8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
test r8b, r8b
je 0x40bec0
lea ecx, [rax - 0x2b]
cmp cl, 0x3a
jbe 0x40beb0
mov ecx, edi
sub ecx, r10d
cmp ecx, 4
jg 0x40c2cb
mov ebx, edi
xor r8d, r8d
jmp 0x40bd10
mov r9d, ecx
mov r10d, edi
mov ebx, edi
mov r8d, 1
jmp 0x40bd10
movabs r12, 0x400000004007fed
bt r12, rcx
jae 0x40be6d
mov ebx, edi
jmp 0x40bd10
mov rax, qword [0x00725f40]
cmp byte [rax], 0
je 0x40bc60
mov rbx, qword [rsp + 0x90]
test rbx, rbx
je 0x40bc60
mov rax, qword [0x00725510]
cmp byte [rax], 0
jne 0x40bc60
mov rax, qword [0x007253c0]
cmp byte [rax], 0
je 0x40bc60
mov rax, qword [0x00725530]
cmp byte [rax], 0
jne 0x40bc60
mov rax, qword [0x00725520]
mov rdx, qword [0x00725ee0]
mov ecx, 1
mov byte [rax], 1
mov rax, qword [0x007255a0]
movsxd rax, dword [rax]
lea rax, [rax + rax*2]
shl rax, 5
add rax, qword [rdx]
mov edx, 0x18
mov rsi, qword [rax + 0x20]
call sub.msvcrt.dll_calloc
mov r15, rax
test rax, rax
je 0x40bfb4
mov qword [rax], rbx
lea r14, [rsi + 0x18]
lea rbx, [rax + 8]
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbx
mov rcx, r14
call fcn.00679e60
cmp byte [rsi + 0x10], 0
jne 0x40c494
mov rax, qword [rsi + 8]
vmovq xmm2, rsi
mov qword [rsi + 8], rbx
vpinsrq xmm0, xmm2, rax, 1
vmovdqu xmmword [r15 + 8], xmm0
mov qword [rax], rbx
lea rcx, [rsi + 0x20]
call fcn.0067af80
mov rcx, r14
call fcn.0067ad90
mov qword [rsp + 0x90], 0
jmp 0x40bc60
mov r8d, 1
mov edx, 0x29
mov rcx, r12
call rbx
jmp 0x40b9d5
mov r8, r13
lea rdx, str.JSON_protocol_request:_n_s_n
mov ecx, 4
call fcn.0040b2f0
jmp 0x40bb73
lea r8, [0x0040abe0]
mov edx, 0x4eb4
mov rcx, r12
call rbx
jmp 0x40bb53
mov r8d, 1
mov edx, 0x34
mov rcx, r12
call rbx
jmp 0x40bacc
mov rcx, r15
mov edx, 3
call fcn.00670210
lea rdx, str.JSON_protocol_response:_n_s
mov ecx, 4
mov r14, rax
mov r8, rax
call fcn.0040b2f0
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x40bdac
test rax, rax
je 0x40c3c0
xor edx, edx
mov rcx, r14
call fcn.00670210
lea rdx, str.message
mov rcx, r14
mov r15, rax
call fcn.00673780
lea rdx, str.code
mov rcx, r14
mov rbx, rax
call fcn.00673780
cmp qword [rsp + 0x360], 0
mov rsi, rax
je 0x40c0d7
mov rcx, rax
call fcn.00673d20
test rax, rax
jne 0x40c470
test rbx, rbx
je 0x40c0e5
cmp dword [rbx], 2
je 0x40c341
mov rax, qword [r14 + 8]
cmp rax, 0xffffffffffffffff
je 0x40c0fc
dec rax
mov qword [r14 + 8], rax
je 0x40c3d4
cmp qword [rsp + 0x360], 0
je 0x40c113
mov rax, qword [0x00725710]
cmp byte [rax], 0
je 0x40c124
mov r8, r15
lea rdx, str.JSON_RPC_call_failed:__s
xor ecx, ecx
call fcn.0040b000
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x90]
xor r15d, r15d
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x98]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0xa0]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x60]
call sub.msvcrt.dll_free
mov rcx, r13
mov qword [rsp + 0x60], 0
mov qword [rsp + 0x68], 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 0x40be43
mov rax, qword [0x00725530]
mov rdx, qword [0x00725ee0]
mov ecx, 1
mov rsi, qword [rsp + 0xa0]
mov byte [rax], 1
mov rax, qword [0x00725ec0]
movsxd rax, dword [rax]
lea rax, [rax + rax*2]
shl rax, 5
add rax, qword [rdx]
mov edx, 0x18
mov rbx, qword [rax + 0x20]
call sub.msvcrt.dll_calloc
mov r14, rax
test rax, rax
je 0x40c224
mov qword [rax], rsi
lea r15, [rbx + 0x18]
lea rsi, [rax + 8]
mov qword [rax + 8], rsi
mov qword [rax + 0x10], rsi
mov rcx, r15
call fcn.00679e60
cmp byte [rbx + 0x10], 0
jne 0x40c487
mov rax, qword [rbx + 8]
vmovq xmm1, rbx
mov qword [rbx + 8], rsi
vpinsrq xmm0, xmm1, rax, 1
vmovdqu xmmword [r14 + 8], xmm0
mov qword [rax], rsi
lea rcx, [rbx + 0x20]
call fcn.0067af80
mov rcx, r15
call fcn.0067ad90
mov qword [rsp + 0xa0], 0
jmp 0x40bc50
lea r8, [rsp + 0x5c]
mov edx, 0x200002
mov rcx, r12
call qword [sym.imp.libcurl_4.dll_curl_easy_getinfo]
test esi, esi
je 0x40c251
cmp edi, 0x1c
je 0x40c27a
test byte [rsp + 0x368], 2
je 0x40c269
cmp dword [rsp + 0x5c], 0x194
je 0x40c3e1
mov r8, rbp
lea rdx, str.HTTP_request_failed:__s
xor ecx, ecx
call fcn.0040b000
cmp qword [rsp + 0x360], 0
je 0x40c12c
test byte [rsp + 0x368], 2
je 0x40c12c
cmp dword [rsp + 0x5c], 0x194
jne 0x40c12c
mov rax, qword [rsp + 0x360]
mov dword [rax], 0
jmp 0x40c12c
lea rdx, str.Empty_data_received_in_json_rpc_call.
xor ecx, ecx
call fcn.0040b000
jmp 0x40c12c
mov byte [rsp + 0x40], r9b
mov dword [rsp + 0x28], r10d
mov qword [rsp + 0x38], r11
mov qword [rsp + 0x48], rdx
call r11
movsxd rcx, dword [rsp + 0x28]
mov r8d, 0xa
mov rdx, qword [rsp + 0x48]
mov dword [rax], 0
mov dword [rsp + 0x34], ecx
add rcx, r14
mov qword [rsp + 0x28], rdx
call fcn.006a46e0
mov rax, qword [rsp + 0xf0]
mov rdx, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x34]
mov r11, qword [rsp + 0x38]
movzx r9d, byte [rsp + 0x40]
cmp byte [rax], 0
je 0x40c3f5
movsxd rax, esi
mov ebx, edi
xor r8d, r8d
movzx eax, byte [r15 + rax]
jmp 0x40bd10
mov rcx, r15
call sub.msvcrt.dll_free
mov rcx, rbx
call fcn.00673c10
mov rcx, rax
call sub.msvcrt.dll__strdup
mov r15, rax
mov rax, qword [0x00725520]
cmp byte [rax], 0
je 0x40c0e5
test r15, r15
je 0x40c0e5
mov ecx, 0x13
lea rdi, str.method_not_getwork
mov rsi, r15
repe cmpsb byte [rsi], byte [rdi]
seta al
sbb al, 0
test al, al
jne 0x40c0e5
mov rax, qword [r14 + 8]
cmp rax, 0xffffffffffffffff
je 0x40c124
dec rax
mov qword [r14 + 8], rax
jne 0x40c124
mov rcx, r14
call fcn.00673f20
jmp 0x40c124
lea rcx, str._unknown_reason_
call sub.msvcrt.dll__strdup
mov r15, rax
jmp 0x40c0fc
mov rcx, r14
call fcn.00673f20
jmp 0x40c0fc
cmp qword [rsp + 0x360], 0
jne 0x40c2a5
jmp 0x40c12c
mov qword [rsp + 0x40], rdx
mov byte [rsp + 0x38], r9b
mov qword [rsp + 0x28], r11
call r11
cmp dword [rax], 0x22
mov r11, qword [rsp + 0x28]
mov r10d, dword [rsp + 0x34]
movzx r9d, byte [rsp + 0x38]
mov rdx, qword [rsp + 0x40]
jne 0x40c32f
movsxd rbx, ebx
mov byte [rbp], 0x2e
add edi, 2
mov byte [r14 + rbx], 0x30
jmp 0x40c32f
mov r11, qword [sym.imp.msvcrt.dll__errno]
lea rdx, [rsp + 0xf0]
jmp 0x40bd68
mov r8d, dword [rsp + 0xf0]
lea r9, [rsp + 0x14c]
lea rdx, str.JSON_decode_failed__d_:__s
xor ecx, ecx
call fcn.0040b000
jmp 0x40c12c
mov rcx, rsi
call fcn.00673d20
mov rsi, qword [rsp + 0x360]
mov dword [rsi], eax
jmp 0x40c0d7
mov rcx, r14
call sub.msvcrt.dll_free
jmp 0x40c213
mov rcx, r15
call sub.msvcrt.dll_free
jmp 0x40bfa3