Function at 0x14000dcb0
Capabilities:
Query environment variable

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xc8
mov rbx, qword [0x14004add0]
mov qword [rsp + 0x48], 0
mov rdi, rcx
mov r12, rdx
mov rbp, r8
mov rax, qword [rbx]
mov qword [rsp + 0xb8], rax
xor eax, eax
mov rsi, r9
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x58], 0
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_url]
mov rbx, rax
test rax, rax
je 0x14000df80
mov r15, qword [sym.imp.libcurl_4.dll_curl_url_get]
mov r9d, 0x40
lea r8, [rsp + 0x78]
mov rcx, rdi
mov edx, 5
call r15
test eax, eax
jne 0x14000ddd0
cmp qword [rsp + 0x78], 0
je 0x14000ddd0
mov r14, qword [rsi + 0x1f8]
test r14, r14
je 0x14000dec0
lea rcx, [rsi + 0x1f8]
call 0x14000dbe0
test eax, eax
jne 0x14000dfa0
mov rax, qword [sym.imp.libcurl_4.dll_curl_url_set]
xor edx, edx
mov r8, qword [rsi + 0x1f8]
mov rcx, rbx
mov r9d, 0x200
mov qword [rsp + 0x30], rax
call rax
test eax, eax
jne 0x14000df60
mov rcx, qword [rsi + 0x1f8]
call sub.msvcrt.dll__strdup
mov r13, rax
test rax, rax
jne 0x14000df30
nop word cs:[rax + rax]
nop dword [rax]
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
xor r14d, r14d
xor r13d, r13d
mov edi, 3
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x48]
call rsi
mov rcx, qword [rsp + 0x50]
call rsi
mov rcx, qword [rsp + 0x58]
call rsi
mov rcx, qword [rsp + 0x70]
call rsi
mov rcx, qword [rsp + 0x60]
call rsi
mov rcx, qword [rsp + 0x68]
call rsi
mov rcx, qword [rsp + 0x78]
call rsi
mov rcx, r14
call rsi
mov rcx, rbx
call qword [sym.imp.libcurl_4.dll_curl_url_cleanup]
cmp edi, 0x25
je 0x14000dea0
cmp edi, 0x2b
je 0x14000de80
cmp edi, 3
jne 0x14000de4e
mov rax, qword [0x14004b210]
lea rdx, str.malformed_target_URL
mov rcx, qword [rax]
call fcn.14000e790
mov rbx, qword [0x14004add0]
mov rax, qword [rsp + 0xb8]
sub rax, qword [rbx]
jne 0x14000e33f
mov eax, edi
add rsp, 0xc8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rax, qword [0x14004b210]
lea rdx, str.__ipfs_gateway_was_given_a_malformed_URL
mov rcx, qword [rax]
call fcn.14000e790
jmp 0x14000de4e
mov rax, qword [0x14004b210]
lea rdx, str.IPFS_automatic_gateway_detection_failed
mov rcx, qword [rax]
call fcn.14000e790
jmp 0x14000de4e
mov rsi, qword [sym.imp.libcurl_4.dll_curl_getenv]
lea rcx, str.IPFS_GATEWAY
mov qword [rsp + 0x80], 0
call rsi
mov qword [rsp + 0x88], rax
test rax, rax
je 0x14000e180
lea rcx, [rsp + 0x88]
call 0x14000dbe0
mov r13, qword [rsp + 0x88]
test eax, eax
jne 0x14000e1b0
test r13, r13
je 0x14000e1cb
mov rax, qword [sym.imp.libcurl_4.dll_curl_url_set]
xor r9d, r9d
xor edx, edx
mov r8, r13
mov rcx, rbx
mov qword [rsp + 0x30], rax
call rax
test eax, eax
jne 0x14000df4b
xor r9d, r9d
lea r8, [rsp + 0x58]
mov edx, 8
mov rcx, rbx
call r15
cmp eax, 0x10
je 0x14000dfc0
xor r14d, r14d
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
mov edi, 3
jmp 0x14000dde2
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
xor r14d, r14d
xor r13d, r13d
mov edi, 0x2b
jmp 0x14000dde2
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
xor r14d, r14d
xor r13d, r13d
mov edi, 2
jmp 0x14000dde2
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
xor r14d, r14d
xor r13d, r13d
mov edi, 0x1b
jmp 0x14000dde2
mov r9d, 0x40
lea r8, [rsp + 0x48]
mov edx, 5
mov rcx, rbx
call r15
test eax, eax
jne 0x14000df48
mov r9d, 0x40
lea r8, [rsp + 0x60]
mov edx, 1
mov rcx, rbx
call r15
test eax, eax
jne 0x14000df48
lea rsi, [rsp + 0x50]
mov r9d, 0x40
lea r8, [rsp + 0x68]
mov rcx, rbx
mov edx, 6
call r15
mov r9d, 0x40
mov r8, rsi
mov rcx, rbx
mov edx, 7
call r15
lea r8, [rsp + 0x70]
mov edx, 7
mov rcx, rdi
mov r9d, 0x40
call r15
mov r8, qword [rsp + 0x60]
mov r14, qword [rsp + 0x30]
mov rcx, rdi
mov r9d, pe_nt_image_headers64
mov edx, 1
call r14
test eax, eax
jne 0x14000df48
mov r8, qword [rsp + 0x48]
mov r9d, pe_nt_image_headers64
mov edx, 5
mov rcx, rdi
call r14
test eax, eax
jne 0x14000df48
mov r8, qword [rsp + 0x68]
mov r9d, pe_nt_image_headers64
mov edx, 6
mov rcx, rdi
call r14
test eax, eax
jne 0x14000df48
mov rax, qword [rsp + 0x70]
test rax, rax
je 0x14000e0b3
cmp byte [rax], 0x2f
je 0x14000e32d
mov rcx, rsi
call 0x14000dbe0
mov rax, qword [rsp + 0x70]
mov r9, qword [rsp + 0x78]
mov r8, r12
lea rdx, [0x1400409e2]
lea rcx, str._s_s__s_s
test rax, rax
cmove rax, rdx
mov rdx, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
call qword [sym.imp.libcurl_4.dll_curl_maprintf]
mov r14, rax
test rax, rax
je 0x14000df48
mov r8, rax
mov edx, 7
mov rax, qword [rsp + 0x30]
mov rcx, rdi
mov r9d, pe_nt_image_headers64
call rax
test eax, eax
jne 0x14000e2d9
mov rcx, qword [rbp]
call sub.msvcrt.dll_free
mov rcx, rdi
mov r9d, pe_nt_image_headers64
xor edx, edx
mov qword [rbp], 0
lea r8, [rsp + 0x90]
call r15
mov edi, eax
test eax, eax
jne 0x14000e2d9
mov rsi, qword [rsp + 0x90]
mov rcx, rsi
call sub.msvcrt.dll__strdup
mov rcx, rsi
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
mov qword [rbp], rax
call rsi
cmp qword [rbp], 0
jne 0x14000dde2
mov edi, 3
jmp 0x14000dde2
lea rcx, str.IPFS_PATH
call rsi
mov qword [rsp + 0x80], rax
mov r13, rax
test rax, rax
jne 0x14000e200
lea rcx, str.HOME
call sub.msvcrt.dll_getenv
test rax, rax
je 0x14000e1b0
cmp byte [rax], 0
jne 0x14000e1df
nop
mov qword [rsp + 0x30], 0
mov rcx, r13
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x30]
call sub.msvcrt.dll_free
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
xor r13d, r13d
mov edi, 0x25
jmp 0x14000dde2
mov rdx, rax
lea rcx, str._s_.ipfs_
call qword [sym.imp.libcurl_4.dll_curl_maprintf]
mov qword [rsp + 0x80], rax
test rax, rax
je 0x14000e1b0
nop dword [rax]
lea rcx, [rsp + 0x80]
call 0x14000dbe0
mov rdx, qword [rsp + 0x80]
mov qword [rsp + 0x30], rdx
test eax, eax
jne 0x14000e2d1
mov rdx, qword [rsp + 0x30]
lea rcx, str._sgateway
call qword [sym.imp.libcurl_4.dll_curl_maprintf]
mov r13, rax
test rax, rax
je 0x14000e2d1
mov rcx, rax
lea rdx, [0x140040a13]
call fcn.14001c6d0
mov rcx, r13
mov rsi, rax
call sub.msvcrt.dll_free
test rsi, rsi
je 0x14000e2d1
lea r13, [rsp + 0x90]
mov edx, 0x2710
mov rcx, r13
call fcn.14001c800
lea rax, [rsp + 0x47]
mov qword [rsp + 0x38], rax
jmp 0x14000e29f
mov rdx, qword [rsp + 0x38]
mov r8d, 1
mov rcx, r13
mov byte [rsp + 0x47], al
call fcn.14001c8d0
test eax, eax
jne 0x14000e323
mov rcx, rsi
call sub.msvcrt.dll_getc
lea edx, [rax + 1]
cmp edx, 0xe
ja 0x14000e280
mov rcx, 0xffffffffffffb7fe
bt rcx, rdx
jb 0x14000e280
mov rcx, rsi
call sub.msvcrt.dll_fclose
mov rcx, r13
call fcn.14001ca00
test rax, rax
jne 0x14000e2e5
xor r13d, r13d
jmp 0x14000e1b9
mov rsi, qword [sym.imp.libcurl_4.dll_curl_free]
jmp 0x14000e175
mov rcx, r13
call fcn.14001c9e0
mov qword [rsp + 0x88], rax
test rax, rax
je 0x14000e2d1
lea rcx, [rsp + 0x88]
call 0x14000dbe0
mov r13, qword [rsp + 0x88]
test r13, r13
je 0x14000e2d1
mov rcx, qword [rsp + 0x30]
call sub.msvcrt.dll_free
jmp 0x14000df13
mov rcx, rsi
call sub.msvcrt.dll_fclose
jmp 0x14000e2d1
cmp byte [rax + 1], 0
jne 0x14000e0b3
mov byte [rax], 0
jmp 0x14000e0b3
call fcn.14001e3f0
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop word cs:[rax + rax]
nop word [rax + rax]