Function at 0x140022d80
Capabilities:
Check http status code
Connect to http server
Delete file
Download and write a file
Parse url
Read data from internet
Receive and write data from server to client
Receive data
Send data
Send http request
Write file on windows

Disassembly:
push rbp
push rdi
push r12
push r14
lea rbp, [rsp - 0x2a28]
mov eax, 0x2b28
call fcn.1400b3400
sub rsp, rax
mov rax, qword [0x140193440]
xor rax, rsp
mov qword [rbp + 0x2980], rax
mov rax, qword [rbp + 0x2a70]
xor edi, edi
mov qword [rsp + 0x2b20], rbx
mov rbx, r9
mov qword [rsp + 0x2b18], rsi
mov rsi, rcx
mov qword [rsp + 0x2b10], r13
lea rcx, [0x14015e798]
mov qword [rbp + 0x10], rcx
lea rcx, [rbp + 0x40]
mov qword [rbp - 0x48], rcx
lea rcx, [rbp + 0x100]
mov qword [rsp + 0x2b08], r15
xorps xmm0, xmm0
mov qword [rbp - 0x28], rcx
mov r14, r8
mov qword [rsp + 0x78], rbx
mov r15, rdx
mov qword [rsp + 0x70], rax
mov r13, 0xffffffffffffffff
mov qword [rbp + 0x18], rdi
mov r12d, edi
mov dword [rsp + 0x40], edi
mov qword [rbp - 0x78], rdi
mov qword [rbp - 0x80], rdi
mov qword [rsp + 0x58], rdi
mov dword [rbp - 0x60], 0x68
mov qword [rbp - 0x58], rdi
mov qword [rbp - 0x50], 1
mov dword [rbp - 0x40], 0x40
mov word [rbp - 0x3c], di
mov qword [rbp - 0x38], rdi
mov dword [rbp - 0x30], 1
mov dword [rbp - 0x20], 0x80
mov qword [rbp - 0x18], rdi
mov dword [rbp - 0x10], 1
mov dword [0x14019f120], edi
mov dword [0x1401e89f4], 0x194
movups xmmword [rbp - 8], xmm0
test rax, rax
je 0x140022e94
xor r9d, r9d
mov dword [rsp + 0x20], edi
mov r8, rax
xor edx, edx
mov ecx, r13d
call fcn.140066570
test rsi, rsi
jne 0x140022eb2
mov r8d, 0xc1
lea rdx, str.D:_a_rufus_rufus_src_net.c
lea rcx, str.url___NULL
call fcn.1400fbe54
test rbx, rbx
je 0x140022eba
mov qword [rbx], rdi
test r15, r15
je 0x140022ef2
mov rax, r13
inc rax
cmp byte [r15 + rax], dil
jne 0x140022ec2
test rax, rax
je 0x140022eed
movzx ecx, byte [r15 + rax]
cmp cl, 0x2f
je 0x140022eea
cmp cl, 0x5c
je 0x140022eea
sub rax, 1
jne 0x140022ed0
mov rax, r15
jmp 0x140022f2c
inc rax
add rax, r15
jmp 0x140022f2c
test rsi, rsi
jne 0x140022efc
mov rax, rdi
jmp 0x140022f2c
mov rax, r13
nop
inc rax
cmp byte [rsi + rax], dil
jne 0x140022f00
test rax, rax
je 0x140022f29
nop
movzx ecx, byte [rsi + rax]
cmp cl, 0x2f
je 0x140022f26
cmp cl, 0x5c
je 0x140022f26
sub rax, 1
jne 0x140022f10
jmp 0x140022f29
inc rax
add rax, rsi
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x70], rdi
je 0x140022f64
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 1
mov r9d, 0xc0d
mov r8d, 0x1388
call fcn.140021510
mov rdx, rsi
lea rcx, str.Downloading__s
call fcn.14004f2f0
test rsi, rsi
jne 0x140022f6e
mov rdx, rdi
jmp 0x140022f7a
mov rdx, r13
inc rdx
cmp byte [rsi + rdx], dil
jne 0x140022f71
lea r9, [rbp - 0x60]
xor r8d, r8d
mov rcx, rsi
call qword [sym.imp.WININET.dll_InternetCrackUrlA]
test eax, eax
je 0x14002387c
cmp qword [rbp - 0x48], rdi
je 0x14002387c
cmp qword [rbp - 0x18], rdi
je 0x14002387c
mov edx, 1
mov byte [rbp + 0x7f], dil
mov rcx, r14
call fcn.140022b20
mov qword [rbp - 0x78], rax
test rax, rax
jne 0x140022fd1
call fcn.14004fba0
lea rcx, str.Could_not_open_Internet_session:__s
jmp 0x140023888
movzx r8d, word [rbp - 0x3c]
xor r9d, r9d
mov rdx, qword [rbp - 0x48]
mov rcx, rax
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], 3
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_InternetConnectA]
mov qword [rbp - 0x80], rax
mov rcx, rax
test rax, rax
jne 0x14002302a
call fcn.14004fba0
movzx r8d, word [rbp - 0x3c]
lea rcx, str.Could_not_connect_to_server__s:_d:__s
mov rdx, qword [rbp - 0x48]
mov r9, rax
call fcn.14004f2f0
jmp 0x140023890
cmp dword [rbp - 0x4c], 4
mov eax, 0x408c600
mov r8, qword [rbp - 0x18]
mov edx, 0x488c600
cmove eax, edx
mov qword [rsp + 0x38], rdi
mov dword [rsp + 0x30], eax
lea rdx, [0x14015e870]
lea rax, [rbp + 0x10]
xor r9d, r9d
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rdi
call qword [sym.imp.WININET.dll_HttpOpenRequestA]
mov qword [rsp + 0x58], rax
mov r14, rax
test rax, rax
jne 0x14002308f
call fcn.14004fba0
mov r8, rax
lea rcx, str.Could_not_open_URL__s:__s
mov rdx, rsi
call fcn.14004f2f0
jmp 0x140023890
xor r9d, r9d
mov dword [rsp + 0x20], edi
mov r8d, 0xffffffff
lea rdx, str.Accept_Encoding:_gzip__deflate
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpSendRequestA]
test eax, eax
jne 0x1400230c1
call fcn.14004fba0
lea rcx, str.Unable_to_send_request:__s
jmp 0x140023888
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], 4
lea r8, [0x1401e89f4]
mov qword [rsp + 0x20], rdi
mov edx, 0x20000013
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
cmp dword [0x1401e89f4], 0xc8
je 0x14002313a
mov ecx, 0xc0032efc
mov dword [0x1401e0f70], 0x2efc
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r8d, dword [0x1401e89f4]
lea rax, str.File_not_found
cmp r8d, 0x194
lea rdx, str.Unable_to_access_file
lea rcx, str._s:__d
cmove rdx, rax
call fcn.14004f2f0
jmp 0x140023890
lea r9, [rsp + 0x48]
mov dword [rsp + 0x48], 0x20
lea r8, [rbp + 0x20]
mov qword [rsp + 0x20], rdi
mov edx, 5
mov rcx, r14
call qword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
jne 0x140023173
call fcn.14004fba0
lea rcx, str.Unable_to_retrieve_file_length:__s
jmp 0x140023888
xor edx, edx
lea rcx, [rbp + 0x20]
mov r8d, 0xa
call fcn.140102394
mov r14, rax
cmp qword [rsp + 0x70], rdi
je 0x14002356b
cmp dword [0x14019f590], edi
lea rdx, [0x140166140]
movaps xmmword [rsp + 0x2ae0], xmm7
lea rax, [0x1401564ce]
movaps xmmword [rsp + 0x2ad0], xmm8
cmove rdx, rax
movaps xmmword [rsp + 0x2ac0], xmm9
xorps xmm7, xmm7
movaps xmmword [rsp + 0x2ab0], xmm10
movaps xmmword [rsp + 0x2aa0], xmm11
movaps xmmword [rsp + 0x2a90], xmm12
mov qword [rsp + 0x60], rdx
test r14, r14
js 0x1400231f3
cvtsi2sd xmm7, r14
jmp 0x14002320b
mov rax, r14
mov rcx, r14
shr rcx, 1
and eax, 1
or rcx, rax
cvtsi2sd xmm7, rcx
addsd xmm7, xmm7
movsd xmm10, qword [0x140176fe0]
movaps xmm8, xmm7
movsd xmm9, qword [0x140176f68]
mov eax, edi
comisd xmm10, xmm8
ja 0x140023236
inc eax
mulsd xmm8, xmm9
cmp eax, 5
jl 0x140023223
movsd xmm11, qword [0x140176fc0]
movsd xmm12, qword [0x140176f90]
movaps xmmword [rsp + 0x2af0], xmm6
test eax, eax
jne 0x140023283
mov rax, qword [0x14019f560]
lea r9, str._s_d_s__s
cvttsd2si ecx, xmm8
mov rax, qword [rax + 0xa0]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], rdx
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rdx
jmp 0x1400232e2
movaps xmm6, xmm8
movsxd rbx, eax
movaps xmm0, xmm8
mulsd xmm6, xmm11
call fcn.140135bc0
lea rax, str._s_0.0f_s__s
mulsd xmm0, xmm11
lea r9, str._s_0.1f_s__s
subsd xmm6, xmm0
comisd xmm12, xmm6
cmova r9, rax
mov rax, qword [0x14019f560]
mov rax, qword [rax + rbx*8 + 0xa0]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x30], rax
movsd qword [rsp + 0x28], xmm8
mov qword [rsp + 0x20], rax
lea rbx, [0x1401e2e30]
mov r8, r13
mov rcx, rbx
mov edx, 0x20
call fcn.140004fd0
mov rdx, rbx
mov byte [0x1401e2e4f], dil
lea rcx, str.File_length:__s
call fcn.14004f2f0
cmp dword [0x14019f590], edi
mov eax, edi
movaps xmm8, xmmword [rsp + 0x2ad0]
je 0x140023410
comisd xmm10, xmm7
ja 0x140023339
inc eax
mulsd xmm7, xmm9
cmp eax, 5
jl 0x140023326
test eax, eax
jne 0x14002336d
mov rax, qword [0x14019f560]
lea r9, str._s_d_s__s
cvttsd2si ecx, xmm7
mov rax, qword [rax + 0xa0]
mov qword [rsp + 0x38], rax
lea rax, [0x140166140]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
jmp 0x1400233cd
movaps xmm6, xmm7
movsxd rbx, eax
movaps xmm0, xmm7
mulsd xmm6, xmm11
call fcn.140135bc0
lea rax, str._s_0.0f_s__s
mulsd xmm0, xmm11
lea r9, str._s_0.1f_s__s
subsd xmm6, xmm0
comisd xmm12, xmm6
cmova r9, rax
mov rax, qword [0x14019f560]
mov rax, qword [rax + rbx*8 + 0xa0]
lea rbx, [0x1401e2e30]
mov qword [rsp + 0x38], rax
lea rax, [0x140166140]
mov qword [rsp + 0x30], rax
movsd qword [rsp + 0x28], xmm7
mov r8, r13
mov qword [rsp + 0x20], rax
mov edx, 0x20
mov rcx, rbx
call fcn.140004fd0
lea rax, str.__s___s
mov byte [0x1401e2e4f], dil
mov rcx, rsi
mov qword [rsp + 0x60], rax
mov qword [rbp - 0x70], rbx
call fcn.140022970
mov rbx, rax
mov rax, qword [rbp - 0x70]
jmp 0x1400234e7
comisd xmm10, xmm7
ja 0x140023423
inc eax
mulsd xmm7, xmm9
cmp eax, 5
jl 0x140023410
test eax, eax
jne 0x140023457
mov rax, qword [0x14019f560]
lea r9, str._s_d_s__s
cvttsd2si ecx, xmm7
mov rax, qword [rax + 0xa0]
mov qword [rsp + 0x38], rax
lea rax, [0x1401564ce]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
jmp 0x1400234b7
movaps xmm6, xmm7
movsxd rbx, eax
movaps xmm0, xmm7
mulsd xmm6, xmm11
call fcn.140135bc0
lea rax, str._s_0.0f_s__s
mulsd xmm0, xmm11
lea r9, str._s_0.1f_s__s
subsd xmm6, xmm0
comisd xmm12, xmm6
cmova r9, rax
mov rax, qword [0x14019f560]
mov rax, qword [rax + rbx*8 + 0xa0]
lea rbx, [0x1401e2e30]
mov qword [rsp + 0x38], rax
lea rax, [0x1401564ce]
mov qword [rsp + 0x30], rax
movsd qword [rsp + 0x28], xmm7
mov r8, r13
mov qword [rsp + 0x20], rax
mov edx, 0x20
mov rcx, rbx
call fcn.140004fd0
lea rax, [0x14015e918]
mov byte [0x1401e2e4f], dil
mov rcx, rsi
mov qword [rsp + 0x60], rax
call fcn.140022970
mov r9, qword [rsp + 0x60]
lea rcx, [rbp + 0x80]
mov qword [rsp + 0x28], rbx
mov r8, r13
mov edx, 0x80
mov qword [rsp + 0x20], rax
call fcn.140004fd0
lea rax, [rbp + 0x80]
mov byte [rbp + 0xff], dil
xor edx, edx
mov qword [rsp + 0x20], rax
xor ecx, ecx
mov r9d, 0xc0d
mov r8d, 0x1388
call fcn.140021510
mov rbx, qword [rsp + 0x78]
movaps xmm12, xmmword [rsp + 0x2a90]
movaps xmm11, xmmword [rsp + 0x2aa0]
movaps xmm10, xmmword [rsp + 0x2ab0]
movaps xmm9, xmmword [rsp + 0x2ac0]
movaps xmm7, xmmword [rsp + 0x2ae0]
movaps xmm6, xmmword [rsp + 0x2af0]
test r15, r15
je 0x140023602
mov rcx, r15
call fcn.140021d00
mov qword [rsp + 0x30], rdi
xor r9d, r9d
mov dword [rsp + 0x28], 0x80
mov edx, 0xc0000000
mov r8d, 1
mov dword [rsp + 0x20], 2
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test rbx, rbx
je 0x1400235c3
mov rcx, rbx
call fcn.1400e8c70
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
cmp r13, 0xffffffffffffffff
jne 0x1400236de
call fcn.14004fba0
mov rdx, qword [rsp + 0x50]
lea rcx, str.Unable_to_create_file__s:__s
mov r8, rax
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1401e0f70], eax
mov r14d, edi
jmp 0x1400238a4
test rbx, rbx
jne 0x1400236a8
lea rcx, str.No_buffer_pointer_provided_for_download
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1401e0f70], eax
mov r14d, edi
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rax, qword [rbp - 0x80]
mov r15, qword [rsp + 0x2b08]
mov r13, qword [rsp + 0x2b10]
mov rsi, qword [rsp + 0x2b18]
mov rbx, qword [rsp + 0x2b20]
test rax, rax
je 0x140023663
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov rax, qword [rbp - 0x78]
test rax, rax
je 0x140023675
mov rcx, rax
call qword [sym.imp.WININET.dll_InternetCloseHandle]
mov ecx, dword [0x1401e0f70]
call qword [sym.imp.KERNEL32.dll_SetLastError]
test r14d, r14d
cmovne rdi, r12
mov rax, rdi
mov rcx, qword [rbp + 0x2980]
xor rcx, rsp
call fcn.1400b2a30
add rsp, 0x2b28
pop r14
pop r12
pop rdi
pop rbp
ret
lea rcx, [r14 + 1]
mov edx, 1
call fcn.1400c4f6c
mov qword [rbx], rax
test rax, rax
jne 0x1400236e3
lea rcx, str.Could_not_allocate_buffer_for_download
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1401e0f70], eax
mov r14d, edi
jmp 0x1400238df
mov rbx, qword [rsp + 0x78]
test dword [0x14019f120], 0x80000000
jne 0x140023848
mov rsi, qword [rsp + 0x70]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
lea r9, [rsp + 0x44]
mov r8d, 0x2800
lea rdx, [rbp + 0x180]
call qword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x1400237e4
mov eax, dword [rsp + 0x44]
test eax, eax
je 0x1400237e4
test rsi, rsi
je 0x140023753
mov r9, r14
mov dword [rsp + 0x20], edi
mov r8, r12
mov edx, 0xca9
mov ecx, 0xfffffffe
call fcn.140066570
mov eax, dword [rsp + 0x44]
lea rdx, [rbp + 0x180]
test r15, r15
je 0x14002379e
lea r9, [rsp + 0x68]
mov qword [rsp + 0x20], rdi
mov r8d, eax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1400237c9
mov r9d, dword [rsp + 0x44]
mov r8d, dword [rsp + 0x68]
cmp r9d, r8d
je 0x1400237b1
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:_Only__d__d_bytes_written
call fcn.14004f2f0
jmp 0x140023848
mov rcx, qword [rbx]
add rcx, r12
mov r8d, eax
call fcn.140135ea0
mov r9d, dword [rsp + 0x44]
mov eax, r9d
add r12, rax
test dword [0x14019f120], 0x80000000
je 0x140023700
jmp 0x140023848
call fcn.14004fba0
mov rdx, qword [rsp + 0x50]
lea rcx, str.Error_writing_file__s:__s
mov r8, rax
call fcn.14004f2f0
jmp 0x140023848
cmp r12, r14
je 0x140023807
mov r8, r14
lea rcx, str.Could_not_download_complete_file___read:__lld_bytes__expected:__lld_bytes
mov rdx, r12
call fcn.14004f2f0
mov dword [0x14019f120], 0xc003001d
jmp 0x140023848
mov dword [0x1401e89f4], 0xc8
mov dword [rsp + 0x40], 1
test rsi, rsi
je 0x140023848
mov r9, r14
mov dword [rsp + 0x20], edi
mov r8, r14
mov edx, 0xca9
mov ecx, 0xfffffffe
call fcn.140066570
mov rdx, qword [rsp + 0x50]
lea rcx, str.Successfully_downloaded__s
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1401e0f70], eax
cmp r13, 0xffffffffffffffff
je 0x14002386c
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r14d, dword [rsp + 0x40]
test r14d, r14d
jne 0x140023626
jmp 0x14002389f
call fcn.14004fba0
lea rcx, str.Unable_to_decode_URL:__s
mov rdx, rax
call fcn.14004f2f0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x1401e0f70], eax
mov r14d, edi
test r15, r15
je 0x1400238da
mov rcx, r15
call fcn.140021d00
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test rbx, rbx
je 0x1400238cd
mov rcx, rbx
call fcn.1400e8c70
mov ecx, esi
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov rbx, qword [rsp + 0x78]
test rbx, rbx
je 0x1400238ea
mov rcx, qword [rbx]
call fcn.1400e8c70
mov qword [rbx], rdi
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x140023631
jmp 0x14002362b