Function at 0x14001f400
Capabilities:
Read file on windows
Write file on windows

Disassembly:
lea rcx, [0x140018520]
jmp fcn.14000adf6
push r15
mov eax, 0x1078
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
call fcn.14001a240
sub rsp, rax
mov rsi, rdx
mov edi, ecx
call fcn.1400191b0
mov rax, qword [fcn.14001ed20]
xor ecx, ecx
mov qword [rsp + 0x38], rax
call rax
mov rcx, rax
call sub.msvcrt.dll__fileno
mov edx, 0x8000
mov ecx, eax
call sub.msvcrt.dll__setmode
test edi, edi
je 0x14001f7e3
mov rax, qword [rsi]
mov edx, 0x2f
mov rcx, rax
mov qword [rsp + 0x58], rax
call sub.msvcrt.dll_strrchr
test rax, rax
je 0x14001f472
add rax, 1
mov qword [rsp + 0x58], rax
lea ebx, [rdi - 1]
cmp edi, 1
lea r15, [rsi + 8]
je 0x14001f819
sub edi, 2
add rsi, 0x10
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x50], 0
lea r12, str.__version
lea r13, str.__binary
jmp 0x14001f4c9
mov ebx, edi
mov dword [rsp + 0x50], 1
sub edi, 1
add rsi, 8
test ebx, ebx
je 0x14001f98e
mov r14, qword [rsi - 8]
lea r15, [rsi - 8]
mov rbp, rsi
lea ebx, [rdi + 1]
cmp byte [r14], 0x2d
jne 0x14001f4f0
cmp byte [r14 + 1], 0x2d
jne 0x14001f4f0
cmp byte [r14 + 2], 0
je 0x14001f86b
nop
mov rdx, r12
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14001f875
mov rdx, r13
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14001f4b0
lea rdx, str.__stdkey
mov rcx, r14
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x14001f610
test ebx, ebx
jle 0x14001f839
mov ecx, dword [rsp + 0x50]
test ecx, ecx
jne 0x14001f846
mov edx, dword [rsp + 0x30]
lea rax, str.What_am_I__a_doctor_or_a_moonshuttle_conductor_
mov qword [rsp + 0x40], rax
test edx, edx
je 0x14001f825
mov rcx, qword [rsp + 0x40]
call sub.msvcrt.dll_strlen
cmp qword [str.data_28_key_4], 0
mov qword [rsp + 0x48], rax
je 0x14001f67b
lea rsi, [0x140020038]
lea rdi, [rsp + 0x70]
nop
mov r12, qword [rsi - 8]
mov rcx, r12
call sub.msvcrt.dll_strlen
mov rcx, r12
mov rdx, rax
call fcn.140018ba0
test rax, rax
mov r12, rax
je 0x14001f5e1
mov r13, qword [rsi - 0x10]
mov rcx, r13
call sub.msvcrt.dll_strlen
mov rdx, r13
mov rcx, r12
mov r8, rax
call fcn.140018a30
mov rdx, rdi
mov rcx, r12
call fcn.140018dc0
test rax, rax
je 0x14001f5d9
cmp qword [rsp + 0x70], 0x20
jne 0x14001f5d9
mov rcx, qword [rsi]
cmp qword [rax], rcx
je 0x14001f61f
mov rcx, r12
call fcn.1400189f0
mov ecx, 2
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
lea rdx, str._s:_fatal_error:_self_test_failed_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 2
call sub.msvcrt.dll_exit
nop dword [rax + rax]
mov ebx, edi
mov dword [rsp + 0x30], 1
jmp 0x14001f4ba
mov rcx, qword [rsi + 8]
cmp qword [rax + 8], rcx
jne 0x14001f5d9
mov rcx, qword [rsi + 0x10]
cmp qword [rax + 0x10], rcx
jne 0x14001f5d9
mov rcx, qword [rsi + 0x18]
cmp qword [rax + 0x18], rcx
jne 0x14001f5d9
test byte [r12 + 0x28], 2
je 0x14001f664
lea rax, [r12 + 0x6c]
lea rdx, [r12 + 0xac]
nop word [rax + rax]
mov byte [rax], 0
add rax, 1
cmp rdx, rax
jne 0x14001f658
mov rcx, r12
add rsi, 0x38
call fcn.14001f318
cmp qword [rsi - 0x18], 0
jne 0x14001f580
lea rdi, str._02x
xor eax, eax
test ebx, ebx
sete al
mov ebp, ebx
mov dword [rsp + 0x54], eax
or eax, ebx
je 0x14001f7cd
mov qword [rsp + 0x30], r15
nop dword [rax]
test ebx, ebx
je 0x14001f8a8
mov rax, qword [rsp + 0x30]
lea rdx, section..rdata
mov r14, qword [rax]
mov rcx, r14
call sub.msvcrt.dll_fopen
mov r13, rax
test r13, r13
je 0x14001f94c
mov rdx, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x40]
call fcn.140018ba0
test rax, rax
mov r12, rax
je 0x14001fa52
lea rsi, [rsp + 0x70]
jmp 0x14001f6fb
mov rdx, rsi
mov rcx, r12
call fcn.140018a30
mov r8d, 0x1000
mov r9, r13
mov edx, 1
mov rcx, rsi
call sub.msvcrt.dll_fread
test rax, rax
mov r8, rax
jne 0x14001f6f0
mov rcx, r13
mov r15, rax
call sub.msvcrt.dll_ferror
test eax, eax
jne 0x14001fa10
test ebx, ebx
jne 0x14001f930
lea rdx, [rsp + 0x68]
mov rcx, r12
call fcn.140018dc0
test rax, rax
mov r13, rax
je 0x14001f9d3
mov eax, dword [rsp + 0x50]
test eax, eax
je 0x14001f8c0
mov ecx, 1
mov rax, qword [rsp + 0x38]
call rax
mov rdx, qword [rsp + 0x68]
mov r8d, 1
mov rcx, r13
mov r9, rax
call sub.msvcrt.dll_fwrite
cmp rax, 1
jne 0x14001f996
test byte [r12 + 0x28], 2
je 0x14001f7ac
lea rax, [r12 + 0x6c]
lea rdx, [r12 + 0xac]
nop word [rax + rax]
mov byte [rax], 0
add rax, 1
cmp rdx, rax
jne 0x14001f7a0
mov rcx, r12
call fcn.14001f318
test ebx, ebx
je 0x14001f7cd
mov eax, dword [rsp + 0x54]
sub ebp, 1
add qword [rsp + 0x30], 8
or eax, ebp
jne 0x14001f6a0
xor eax, eax
add rsp, 0x1078
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
lea rax, [0x140021003]
mov qword [rsp + 0x58], rax
mov ecx, 2
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
lea rdx, str.usage:__s____binary_____stdkeykey___filename__n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
test ebx, ebx
jle 0x14001f7ef
mov dword [rsp + 0x50], 0
mov rax, qword [r15]
sub ebx, 1
add r15, 8
mov qword [rsp + 0x40], rax
jmp 0x14001f555
cmp dword [rsp + 0x30], 0
jne 0x14001f531
jmp 0x14001f7ef
mov rax, qword [rsp + 0x38]
mov ecx, 1
call rax
mov rcx, rax
call sub.msvcrt.dll__fileno
mov edx, 0x8000
mov ecx, eax
call sub.msvcrt.dll__setmode
jmp 0x14001f53d
mov ebx, edi
mov r15, rsi
jmp 0x14001f529
mov ecx, 1
mov rax, qword [rsp + 0x38]
call rax
lea rcx, str.hmac256__Libgcrypt__standalone_nCopyright__C__2008_Free_Software_Foundation__Inc._nLicense_LGPLv2.1:_GNU_LGPL_version_2.1_or_later__http:__gnu.org_licenses_old_licenses_lgpl_2.1.html__nThis_is_free_software:_you_are_free_to_change_and_redistribute_it._nThere_is_NO_WARRANTY__to_the_extent_permitted_by_law._n
mov r8d, 0x130
mov edx, 1
mov r9, rax
call sub.msvcrt.dll_fwrite
xor ecx, ecx
call sub.msvcrt.dll_exit
nop word [rax + rax]
mov rax, qword [rsp + 0x38]
lea r14, [0x140021038]
xor ecx, ecx
call rax
mov r13, rax
jmp 0x14001f6c2
cmp qword [rsp + 0x68], 0
je 0x14001f8e9
nop dword [rax + rax]
movzx edx, byte [r13 + r15]
mov rcx, rdi
add r15, 1
call fcn.1400187d0
cmp qword [rsp + 0x68], r15
ja 0x14001f8d0
test byte [r12 + 0x28], 2
je 0x14001f90c
lea rax, [r12 + 0x6c]
lea rdx, [r12 + 0xac]
nop
mov byte [rax], 0
add rax, 1
cmp rdx, rax
jne 0x14001f900
mov rcx, r12
call fcn.14001f318
test ebx, ebx
je 0x14001f93d
lea rcx, str.___s_n
mov rdx, r14
call fcn.1400187d0
jmp 0x14001f7b8
mov rcx, r13
call sub.msvcrt.dll_fclose
jmp 0x14001f734
mov ecx, 0xa
call sub.msvcrt.dll_putchar
jmp 0x14001f7cd
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov ecx, 2
mov rbx, rax
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
mov qword [rsp + 0x20], rbx
mov r9, r14
lea rdx, str._s:_cant_open___s:__s_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
mov r15, rbp
jmp 0x14001f529
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov ecx, 2
mov rbx, rax
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
mov r9, rbx
lea rdx, str._s:_error_writing_output:__s_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov ecx, 2
mov rbx, rax
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
mov r9, rbx
lea rdx, str._s:_error_computing_HMAC:__s_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov ecx, 2
mov rbx, rax
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
mov qword [rsp + 0x20], rbx
mov r9, r14
lea rdx, str._s:_error_reading___s:__s_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
call qword [sym.imp.msvcrt.dll__errno]
mov ecx, dword [rax]
call sub.msvcrt.dll_strerror
mov ecx, 2
mov rbx, rax
mov rax, qword [rsp + 0x38]
call rax
mov r8, qword [rsp + 0x58]
mov r9, rbx
lea rdx, str._s:_cant_allocate_context:__s_n
mov rcx, rax
call fcn.1400187a0
mov ecx, 1
call sub.msvcrt.dll_exit
nop
jmp 0x140018510