Function at 0x1400217ca
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
xor r10d, r10d
xor r11d, r11d
mov qword [rsp + 0x50], r10
mov rsi, rcx
mov r12, rdx
mov rbp, r8
mov qword [rsp + 0x58], r10
mov r13d, r9d
mov dword [rsp + 0x4c], r11d
test rcx, rcx
jne 0x14002181a
mov r8d, 0x171
lea rdx, str.net.c
lea rcx, str.url___NULL
call qword [sym.imp.msvcrt.dll__wassert]
call sub.msvcrt.dll_strlen
lea rcx, [rax + 5]
call sub.msvcrt.dll_malloc
mov rbx, rax
test rax, rax
jne 0x140021841
lea rcx, str.Could_not_allocate_signature_URL
call fcn.1400380b9
jmp 0x140021a07
mov rdx, rsi
mov rcx, rax
call sub.msvcrt.dll_strcpy
lea rdx, str..sig
mov rcx, rbx
call sub.msvcrt.dll_strcat
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov dword [rsp + 0x28], r9d
xor edx, edx
lea r9, [rsp + 0x50]
mov rcx, rsi
call fcn.14001f576
mov rdi, rax
test eax, eax
je 0x140021a07
xor ecx, ecx
xor r8d, r8d
lea r9, [rsp + 0x58]
xor edx, edx
mov dword [rsp + 0x28], ecx
mov rcx, rbx
mov qword [rsp + 0x20], r8
xor r8d, r8d
call fcn.14001f576
mov r14, qword [rsp + 0x50]
cmp eax, 0x100
je 0x140021908
lea rcx, str.FATAL:_Download_signature_is_invalid_
call fcn.1400380b9
mov rax, qword [0x1400b42b0]
mov rcx, rbp
mov edx, 0x3f2
mov dword [0x14010fb30], 0x193
mov dword [rax], 0xe003120d
call qword [sym.imp.USER32.dll_GetDlgItem]
xor r9d, r9d
mov r8d, 2
mov edx, 0x410
mov rcx, rax
call qword [sym.imp.USER32.dll_SendMessageW]
mov ecx, 4
call fcn.14003b84f
jmp 0x140021a07
mov r8, qword [rsp + 0x58]
mov r9d, 0x100
mov edx, edi
mov rcx, r14
call fcn.140025a56
test eax, eax
je 0x1400218b1
lea rcx, str.Download_signature_is_valid_
call fcn.1400380b9
mov r8d, pe_nt_image_headers64
mov edx, 0xc0000000
mov rcx, r12
mov dword [0x14010fb30], 0xce
call fcn.14001ee07
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x14002197e
call fcn.140038579
mov rcx, r12
mov qword [rsp + 0x38], rax
call fcn.14001ebe0
mov r8, qword [rsp + 0x38]
lea rcx, str.Unable_to_create_file__s:__s
mov rdx, rax
call fcn.1400380b9
jmp 0x140021a07
xor edx, edx
lea r9, [rsp + 0x4c]
mov r8d, edi
mov rcx, rax
mov qword [rsp + 0x20], rdx
mov rdx, r14
call qword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
jne 0x1400219c5
call fcn.140038579
mov rcx, r12
mov qword [rsp + 0x38], rax
call fcn.14001ebe0
mov r8, qword [rsp + 0x38]
lea rcx, str.Error_writing_file__s:__s
mov rdx, rax
call fcn.1400380b9
jmp 0x1400219f3
mov r8d, dword [rsp + 0x4c]
cmp r8d, edi
je 0x1400219fb
mov rcx, r12
mov dword [rsp + 0x38], r8d
call fcn.14001ebe0
mov r8d, dword [rsp + 0x38]
mov r9d, edi
lea rcx, str.Error_writing_file__s:_Only__d__d_bytes_written
mov rdx, rax
call fcn.1400380b9
xor eax, eax
mov dword [rsp + 0x4c], eax
jmp 0x140021a0b
mov dword [0x14010fb30], 0xc8
jmp 0x140021a0b
or rsi, 0xffffffffffffffff
test rbp, rbp
je 0x140021a26
mov r8d, dword [rsp + 0x4c]
xor r9d, r9d
mov edx, 0x8003
mov rcx, rbp
call qword [sym.imp.USER32.dll_SendMessageW]
test r13d, r13d
je 0x140021b0b
cmp dword [0x14010fb30], 0xc8
je 0x140021b0b
xor r8d, r8d
xor edx, edx
mov r9d, 0xcaa
mov ecx, 1
call fcn.14001e4cb
mov ecx, dword [0x14010fc98]
mov r13, qword [sym.imp.KERNEL32.DLL_SetLastError]
call r13
mov rax, qword [str._3_b_]
mov ecx, 0xbe4
movzx ebp, word [rax]
mov rax, qword [0x1400b4e20]
cmp dword [rax], 1
sbb edi, edi
call fcn.14001e311
and edi, 0xffe80000
mov r12, rax
mov rax, qword [0x1400b42b0]
add edi, 0x180010
mov ecx, dword [rax]
test ecx, ecx
jns 0x140021aa9
xor edx, edx
call fcn.140038edd
jmp 0x140021aae
call fcn.140038579
mov rdx, qword [0x1400b4b90]
mov rcx, rax
mov r14, qword [rdx]
call fcn.14001ed5a
mov rcx, r12
mov r15, rax
call fcn.14001ed5a
mov r9d, edi
mov rdx, r15
mov rcx, r14
mov r8, rax
mov dword [rsp + 0x20], ebp
mov r12, rax
call qword [sym.imp.USER32.dll_MessageBoxExW]
call qword [sym.imp.KERNEL32.DLL_GetLastError]
mov edi, eax
test r15, r15
je 0x140021af9
mov rcx, r15
call sub.msvcrt.dll_free
test r12, r12
je 0x140021b06
mov rcx, r12
call sub.msvcrt.dll_free
mov ecx, edi
call r13
lea rax, [rsi - 1]
cmp rax, 0xfffffffffffffffd
ja 0x140021b1e
mov rcx, rsi
call qword [sym.imp.KERNEL32.DLL_CloseHandle]
mov rcx, rbx
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x50]
call sub.msvcrt.dll_free
mov rcx, qword [rsp + 0x58]
call sub.msvcrt.dll_free
mov eax, dword [rsp + 0x4c]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret