Function at 0x401dd0
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0xa8
mov rax, qword [0x00428ca8]
mov edx, 4
mov qword [rsp + 0x60], rax
mov rcx, rax
call qword [sym.imp.msvcrt.dll__access]
test eax, eax
jne 0x40261d
mov rcx, qword [0x00428ca8]
call fcn.00401860
test rax, rax
mov qword [0x00428ca0], rax
je 0x4025a8
mov rax, qword [0x004255d0]
cmp dword [rax], 2
ja 0x4025de
lea rax, str.AAB_aix_stdio
mov qword [rsp + 0x58], 0
mov qword [rsp + 0x50], rax
nop word cs:[rax + rax]
mov rax, qword [rsp + 0x50]
test byte [rax + 0x1d], 0x80
jne 0x402357
mov rbx, qword [rax + 8]
test rbx, rbx
je 0x401eb9
mov rsi, qword [0x00428ca8]
cmp byte [rsi], 0x2e
je 0x401e89
jmp 0x401ea7
add rsi, 2
cmp byte [rsi], 0x2e
jne 0x401ea7
cmp byte [rsi + 1], 0x2f
je 0x401e80
jmp 0x401ea7
mov rcx, rbx
call sub.msvcrt.dll_strlen
lea rbx, [rbx + rax + 1]
cmp byte [rbx], 0
je 0x402357
xor r8d, r8d
mov rdx, rsi
mov rcx, rbx
call fcn.00408f80
test eax, eax
jne 0x401e91
mov rax, qword [rsp + 0x50]
mov r13, qword [rax + 0x20]
mov eax, dword [rax + 0x18]
test eax, eax
jle 0x401f39
sub eax, 1
lea r15, [0x00415314]
lea rbp, [rsp + 0x70]
lea rax, [rax + rax*2 + 3]
xor r12d, r12d
xor edi, edi
lea rbx, [r13 + rax*8]
nop word [rax + rax]
cmp dword [r13], 4
ja case.default.0x401f02
mov eax, dword [r13]
movsxd rax, dword [r15 + rax*4]
add rax, r15
jmp rax
mov rcx, qword [r13 + 8]
mov r8, qword [0x00428ca0]
mov rdx, qword [0x00428ca8]
call fcn.00402f80
test eax, eax
jne 0x402357
add r13, 0x18
cmp r13, rbx
jne 0x401ef0
test r12d, r12d
je 0x401f39
test edi, edi
je 0x402357
mov rax, qword [0x004255d0]
cmp dword [rax], 1
jbe 0x401f70
mov rax, qword [rsp + 0x50]
mov rsi, qword [0x00428ca8]
mov rbx, qword [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.Applying___24s_to__s_n
lea rcx, [rax + 0x60]
mov r9, rsi
mov r8, rbx
call sub.msvcrt.dll_fprintf
mov rax, qword [rsp + 0x50]
mov esi, dword [rax + 0x1c]
test sil, 8
jne 0x402586
mov rax, qword [0x00428c40]
test sil, 4
mov qword [rsp + 0x68], rax
jne 0x40248d
mov rax, qword [rsp + 0x50]
mov rcx, qword [rsp + 0x68]
mov rbp, qword [rax + 0x28]
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x60]
mov rbx, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [rbp]
add rax, rbx
lea rbx, [rax + 0x23]
add rax, 0x2a
and esi, 2
lea rsi, [rbp + 8]
cmove rax, rbx
test rcx, rcx
mov rdi, rax
je 0x401ff7
nop word [rax + rax]
add rsi, 8
call sub.msvcrt.dll_strlen
mov rcx, qword [rsi - 8]
lea rdi, [rdi + rax + 0x18]
test rcx, rcx
jne 0x401fe0
mov rcx, rdi
mov r12, rdi
call fcn.00409560
mov rcx, qword [rsp + 0x50]
sub r12, rbx
mov r15, rax
mov rax, r15
test byte [rcx + 0x1c], 2
mov rdx, qword [rcx + 0x28]
je 0x402030
mov ecx, 0x2028
lea rax, [r15 + 2]
mov byte [r15 + 2], 0
mov word [r15], cx
add rdx, 0x10
lea rcx, [rdx + 8]
mov rdx, qword [rdx]
mov qword [rsp + 0x48], rcx
lea rcx, [rdx + 1]
movzx edx, byte [rdx]
test dl, dl
je 0x402063
nop word [rax + rax]
add rax, 1
add rcx, 1
mov byte [rax - 1], dl
movzx edx, byte [rcx - 1]
test dl, dl
jne 0x402050
add qword [rsp + 0x48], 8
mov rdx, qword [rsp + 0x48]
mov r13, qword [rdx - 8]
test r13, r13
je 0x402412
lea rbp, [rax + 1]
mov byte [rax], 0x20
mov r8, r12
mov rdx, r13
mov rax, rbp
mov rcx, rbp
sub rax, r15
sub r8, rax
call fcn.00402b30
test rax, rax
jne 0x40247c
mov rbx, rdi
add rbx, 0x64
mov r14, rbp
mov rcx, r15
lea rsi, [r12 + rbx]
sub r14, r15
mov rdx, rbx
call fcn.004095e0
sub rsi, rdi
lea rbp, [rax + r14]
mov rdx, r13
mov r8, rsi
mov r15, rax
sub r8, r14
mov rcx, rbp
call fcn.00402b30
test rax, rax
je 0x4020a5
mov r12, rsi
mov rdi, rbx
jmp 0x402063
mov rcx, qword [r13 + 0x10]
mov rdx, qword [0x00428ca0]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 0
call fcn.00408c70
test eax, eax
jne case.default.0x401f02
jmp 0x402357
mov r14, qword [0x00428ca8]
mov rcx, r14
call sub.msvcrt.dll_strlen
mov rcx, qword [r13 + 8]
mov rsi, rax
call sub.msvcrt.dll_strlen
lea rcx, [rsi + rax + 0x21]
call fcn.00409560
mov r9, qword [r13 + 8]
lea rdx, str.file_s__test__s____dev_null_2_1
mov r8, r14
mov rsi, rax
mov rcx, rax
call sub.msvcrt.dll_sprintf
mov rcx, rsi
call fcn.00402c30
mov rcx, rsi
mov r14d, eax
call sub.msvcrt.dll_free
test r14d, r14d
je case.default.0x401f02
jmp 0x402357
test edi, edi
jne case.default.0x401f02
mov rax, qword [0x004254f0]
mov r9d, dword [rax]
test r9d, r9d
jne 0x402402
mov rsi, qword [0x00428ca8]
mov edx, 0x2f
mov r14, qword [0x00428ca0]
mov rcx, rsi
call sub.msvcrt.dll_strrchr
lea rdx, [rax + 1]
test rax, rax
mov qword [rsp + 0x70], rax
cmovne rsi, rdx
call qword [sym.imp.msvcrt.dll__errno]
mov rcx, qword [r13 + 8]
mov r8d, 0xa
mov rdx, rbp
mov dword [rax], 0
call sub.msvcrt.dll_strtoul
mov r12d, eax
call qword [sym.imp.msvcrt.dll__errno]
mov r8d, dword [rax]
test r8d, r8d
jne 0x402407
mov rdx, qword [rsp + 0x70]
mov r11, qword [0x004254d0]
lea rax, [rdx + 1]
mov qword [rsp + 0x70], rax
movzx ecx, byte [rdx]
test byte [r11 + rcx*2], 0x40
je 0x402407
movzx ecx, byte [rdx + 1]
test byte [r11 + rcx*2], 0x40
je 0x40224d
add rdx, 2
nop dword [rax + rax]
mov rax, rdx
mov qword [rsp + 0x70], rdx
mov r10, qword [0x004254d0]
movzx ecx, byte [rax]
add rdx, 1
test byte [r10 + rcx*2], 0x40
jne 0x402230
lea rdx, [rax + 1]
mov r10, qword [0x004254d0]
mov qword [rsp + 0x70], rdx
movzx ecx, byte [rax]
test byte [r10 + rcx*2], 4
je 0x402407
movzx ecx, byte [rax + 1]
test byte [r10 + rcx*2], 4
je 0x40229d
add rax, 2
nop word [rax + rax]
mov rdx, rax
mov qword [rsp + 0x70], rax
mov r11, qword [0x004254d0]
movzx ecx, byte [rdx]
add rax, 1
test byte [r11 + rcx*2], 4
jne 0x402280
lea rcx, [rdx + 1]
mov r11, qword [0x004254d0]
mov qword [rsp + 0x70], rcx
movzx eax, byte [rdx]
test byte [r11 + rax*2], 0x40
je 0x402407
movzx eax, byte [rdx + 1]
test byte [r11 + rax*2], 0x40
je 0x4022ed
add rdx, 2
nop word [rax + rax]
mov rcx, rdx
mov qword [rsp + 0x70], rdx
mov r11, qword [0x004254d0]
movzx eax, byte [rcx]
add rdx, 1
test byte [r11 + rax*2], 0x40
jne 0x4022d0
mov rdx, rsi
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x402315
jmp 0x402407
mov edx, eax
shr eax, 1
add r14, 1
shl edx, 0xf
add eax, ecx
movzx edx, dx
add eax, edx
movzx eax, ax
movsx ecx, byte [r14]
test cl, cl
jne 0x402300
xor edi, edi
cmp r12d, eax
mov r12d, 1
sete dil
jmp case.default.0x401f02
mov rcx, qword [r13 + 0x10]
mov rdx, qword [0x00428ca0]
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 0
call fcn.00408c70
test eax, eax
je case.default.0x401f02
add qword [rsp + 0x58], 0x38
add qword [rsp + 0x50], 0x38
mov rax, qword [rsp + 0x58]
cmp rax, 0x37c8
jne 0x401e50
mov rcx, qword [0x00428c40]
xor edx, edx
call sub.msvcrt.dll__open
test eax, eax
mov esi, eax
js 0x402693
lea rdx, [0x004150cb]
mov ecx, eax
xor ebx, ebx
call fcn.004094d0
mov r12, qword [0x00428ca0]
mov rbp, rax
jmp 0x4023b2
mov rdx, rbx
mov ecx, edi
call sub.msvcrt.dll_putc
mov rcx, rbp
call sub.msvcrt.dll_getc
cmp eax, 0xffffffff
je 0x40272a
test rbx, rbx
movzx edi, al
jne 0x4023a8
movzx eax, byte [r12]
cmp eax, edi
je 0x40266f
call fcn.004016a0
mov rcx, qword [0x00428ca0]
mov rbx, rax
cmp rcx, r12
je 0x4023a8
mov rdx, r12
mov r9, rax
mov r8d, 1
sub rdx, rcx
call sub.msvcrt.dll_fwrite
jmp 0x4023a8
mov edi, 1
mov r12d, 1
jmp case.default.0x401f02
mov rdi, qword [rsp + 0x50]
test byte [rdi + 0x1c], 2
je 0x402430
mov edx, 0x20
mov dword [rax], 0x3c202920
add rax, 5
mov word [rax - 1], dx
mov rdi, qword [rsp + 0x68]
mov r8, qword [rsp + 0x60]
lea rdx, str.__s____sX___rm__f__s__mv__f__sX__s
mov rcx, rax
mov qword [rsp + 0x30], rdi
mov qword [rsp + 0x28], rdi
mov r9, rdi
mov qword [rsp + 0x20], rdi
call sub.msvcrt.dll_sprintf
mov rcx, r15
call fcn.00402c30
mov rcx, r15
call sub.msvcrt.dll_free
mov rax, qword [0x00428c40]
mov qword [rsp + 0x60], rax
jmp 0x402357
mov rsi, r12
mov rbx, rdi
mov r12, rsi
mov rdi, rbx
jmp 0x402063
mov rax, qword [0x004255a0]
mov rsi, qword [0x00428ca8]
movabs r12, 0x697869662f2e2e2f
mov rcx, qword [rax]
call sub.msvcrt.dll_strlen
mov rcx, rsi
mov rbp, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x60]
mov rdi, rax
call sub.msvcrt.dll_strlen
mov rcx, qword [rsp + 0x68]
mov rbx, rax
call sub.msvcrt.dll_strlen
lea rcx, [rbp + rdi + 0x3d]
movabs rbp, 0x2f736564756c636e
movabs rdi, 0x786966796c707061
add rcx, rbx
add rcx, rax
call fcn.00409560
mov r15, rax
mov rax, qword [0x004255a0]
mov rcx, r15
mov rbx, qword [rax]
mov rdx, rbx
call sub.msvcrt.dll_strcpy
mov rcx, rbx
call sub.msvcrt.dll_strlen
lea rbx, [r15 + rax]
lea rdx, [rsp + 0x70]
mov rcx, r15
mov qword [rbx], r12
mov qword [rbx + 8], rbp
mov qword [rbx + 0x10], rdi
mov dword [rbx + 0x18], 0x6578652e
mov byte [rbx + 0x1c], 0
call fcn.0040ac80
cmp eax, 0xffffffff
je 0x4025bc
mov rcx, rbx
call sub.msvcrt.dll_strlen
mov r8, qword [rsp + 0x58]
lea rcx, [rbx + rax]
mov rax, qword [rsp + 0x68]
lea rdx, str.__ld__s__s__s
mov r9, rsi
sar r8, 3
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x60]
imul r8d, r8d, 0xb6db6db7
mov qword [rsp + 0x20], rax
call sub.msvcrt.dll_sprintf
jmp 0x40245b
mov rax, qword [rax + 0x28]
mov rbx, qword [rax]
test rbx, rbx
je 0x40259b
cmp byte [rbx], 0
jne 0x4026e2
mov rcx, qword [0x00428ca0]
call sub.msvcrt.dll_free
nop
add rsp, 0xa8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov dword [rbx], 0x2e2e2f
mov qword [rbx + 0xb], rbp
mov qword [rbx + 3], r12
mov qword [rbx + 0x13], rdi
mov dword [rbx + 0x1b], 0x6578652e
mov byte [rbx + 0x1f], 0
jmp 0x402542
mov r10d, dword [0x00428038]
test r10d, r10d
je 0x401e31
mov rsi, qword [0x00428ca8]
mov rbx, qword [0x00428c50]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str._6lu___50s____r
lea rcx, [rax + 0x60]
mov r9, rsi
mov r8d, ebx
call sub.msvcrt.dll_fprintf
jmp 0x401e31
call qword [sym.imp.msvcrt.dll__errno]
mov ebx, dword [rax]
mov ecx, ebx
call fcn.00409630
xor ecx, ecx
mov edx, 0x1000
mov rbp, rax
call sub.msvcrt.dll__getcwd
mov rsi, qword [0x00428ca8]
mov rdi, rax
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.Cannot_access__s_from__s_n_terror__d___s__n
lea rcx, [rax + 0x60]
mov qword [rsp + 0x28], rbp
mov dword [rsp + 0x20], ebx
mov r9, rdi
mov r8, rsi
call sub.msvcrt.dll_fprintf
jmp 0x4025a8
mov rcx, rbp
add r12, 1
call sub.msvcrt.dll_getc
cmp eax, 0xffffffff
je 0x40276c
cmp byte [r12], al
movzx edi, al
jne 0x4023d8
jmp 0x40266f
mov rbx, qword [sym.imp.msvcrt.dll__errno]
call rbx
cmp dword [rax], 2
je 0x40259b
mov rdi, qword [0x00428c40]
call rbx
mov ecx, dword [rax]
call fcn.00409630
mov rsi, rax
call rbx
mov ebx, dword [rax]
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.error__d___s__opening_output___s__for_read_n
lea rcx, [rax + 0x60]
mov qword [rsp + 0x20], rdi
mov r9, rsi
mov r8d, ebx
call sub.msvcrt.dll_fprintf
jmp 0x40259b
call fcn.004016a0
mov rcx, rbx
mov rsi, rax
call sub.msvcrt.dll_strlen
mov r9, rsi
mov rdi, rax
mov r8d, 1
mov rdx, rax
mov rcx, rbx
call sub.msvcrt.dll_fwrite
cmp byte [rbx + rdi - 1], 0xa
je 0x40271d
mov rdx, rsi
mov ecx, 0xa
call sub.msvcrt.dll_fputc
mov rcx, rsi
call sub.msvcrt.dll_fclose
jmp 0x40259b
test rbx, rbx
je 0x40276c
mov rcx, rbx
lea r15, [rsp + 0x70]
call sub.msvcrt.dll_fclose
lea rax, [0x00428c60]
mov rdx, qword [0x00428ca0]
mov dword [rsp + 0x20], 0
mov r9, r15
mov r8d, 1
mov rcx, rax
mov qword [rsp + 0x48], rax
call fcn.00408c70
test eax, eax
je 0x402793
mov rcx, rbp
call sub.msvcrt.dll_fclose
mov ecx, esi
call sub.msvcrt.dll__close
mov ecx, esi
call sub.msvcrt.dll__close
mov rcx, qword [0x00428c40]
call sub.msvcrt.dll__unlink
jmp 0x40259b
mov rbx, qword [0x00428ca8]
mov edx, 0x2f
mov r14, qword [0x00428ca0]
mov rcx, rbx
call sub.msvcrt.dll_strrchr
mov r12, rax
mov rax, qword [0x004255d0]
cmp dword [rax], 1
jbe 0x4027d6
call qword [sym.imp.msvcrt.dll___iob_func]
lea rdx, str.Quoted_includes_in__s_n
lea rcx, [rax + 0x60]
mov r8, rbx
call sub.msvcrt.dll_fprintf
test r12, r12
lea rdi, [0x00415250]
je 0x4027ea
mov byte [r12], 0
mov rdi, rbx
mov r13, qword [sym.imp.msvcrt.dll___iob_func]
movsxd rax, dword [rsp + 0x70]
add r14, rax
cmp byte [r14], 0x22
je 0x402809
add r14, 1
cmp byte [r14], 0x22
jne 0x4027ff
mov rax, qword [0x004255b0]
mov r8, r14
mov rdx, rdi
mov rcx, qword [rax]
call fcn.004015b0
test eax, eax
jne 0x402850
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0x20], 0
mov r9, r15
mov r8d, 1
mov rdx, r14
call fcn.00408c70
test eax, eax
je 0x4027f1
jmp 0x40276c
mov rax, qword [0x004255b0]
lea rcx, str._s___s_
mov r8, rdi
mov rbx, r14
mov rdx, qword [rax]
call sub.msvcrt.dll_printf
cmp byte [r14], 0x22
je 0x4028e1
mov r12, r13
add rbx, 1
call r13
movsx ecx, byte [rbx - 1]
lea rdx, [rax + 0x30]
call sub.msvcrt.dll_putc
cmp byte [rbx], 0x22
jne 0x402875
mov rax, qword [0x00425550]
lea rcx, str.___s__s_
mov r8, rdi
mov rdx, qword [rax]
call sub.msvcrt.dll_printf
cmp byte [r14], 0x22
je 0x4028c8
add r14, 1
call r12
movsx ecx, byte [r14 - 1]
lea rdx, [rax + 0x30]
call sub.msvcrt.dll_putc
cmp byte [r14], 0x22
jne 0x4028ad
call r12
lea rdx, [rax + 0x30]
mov ecx, 0xa
mov r14, rbx
call sub.msvcrt.dll_putc
jmp 0x402822
mov r12, qword [sym.imp.msvcrt.dll___iob_func]
jmp 0x40288e