Function at 0x14006e840
Capabilities:
Get common file path
Query environment variable

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
push rbp
sub rsp, 0x5c8
xor r13d, r13d
mov dword [rsp + 0x168], r13d
mov r12, rdx
xor edx, edx
xor ebx, ebx
mov rdi, rcx
mov rcx, r12
xor r8d, r8d
mov dword [rsp + 0x160], ebx
mov dword [rsp + 0x150], r13d
mov dword [rsp + 0x158], ebx
call fcn.14006fdb0
mov rax, qword [rdi + 0xb0]
mov r14d, 1
mov qword [rsp + 0x48], rax
cmp rax, 3
mov rdx, qword [rdi + 0x58]
mov r9d, dword [rdi + 0x60]
mov rsi, qword [rdi + 0x40]
mov rbp, qword [rdi + 0x48]
mov dword [rsp + 0x148], 0
je 0x14006f76b
mov r8d, dword [r12 + 0x1b0]
cmp r8d, 0xfffffffc
je 0x14006f705
cmp r8d, 0xfffffffd
je 0x14006e90c
cmp r8d, 0xfffffffe
jne 0x14006e8f2
test byte [r12 + 0x24d], 4
je 0x14006e9b0
jmp 0x14006f7c7
cmp r8d, 0xffffffff
jne 0x14006e934
test byte [r12 + 0x24d], 4
je 0x14006e98e
jmp 0x14006f7b3
movzx eax, byte [r12 + 0x24d]
test al, 4
je 0x14006e9d2
test byte [r12 + 0x244], 1
jne 0x14006e9d2
jne 0x14006e9b0
jne 0x14006e98e
test rdx, rdx
je 0x14006f06e
mov eax, 0x100
cmp r9d, 0x100
lea rcx, [rsp + 0x3ae]
mov qword [rsp + 0x5b8], rcx
cmovg r9d, eax
movsxd r8, r9d
mov dword [rsp + 0x5c0], r9d
call fcn.14009ef60
mov r15d, dword [rsp + 0x5c0]
movsxd r15, r15d
mov r8, qword [rsp + 0x5b8]
mov byte [r8 + r15], 0
movsx r9d, byte [r8]
jmp 0x14006ea2c
lea rcx, str.FOR_PRINT
call fcn.14003fb28
mov r8, rax
mov qword [rsp + 0x5b8], r8
test r8, r8
je 0x14006f256
jmp 0x14006e9f2
lea rcx, str.FOR_TYPE
call fcn.14003fb28
mov r8, rax
mov qword [rsp + 0x5b8], r8
test r8, r8
je 0x14006f280
jmp 0x14006e9f2
lea rcx, str.FOR_ACCEPT
call fcn.14003fb28
mov r8, rax
mov qword [rsp + 0x5b8], r8
test r8, r8
je 0x14006f6db
mov rdx, r8
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x14006ea1d
mov rax, rdx
add rdx, rcx
call fcn.14009ef90
mov r15d, eax
mov dword [rsp + 0x5c0], r15d
movsx r9d, byte [r8]
cmp r9d, 0x20
jne 0x14006ea53
test r15d, r15d
jle 0x14006ea53
inc r8
dec r15d
mov qword [rsp + 0x5b8], r8
mov dword [rsp + 0x5c0], r15d
cmp byte [r8], 0x20
je 0x14006ea32
xor r9d, r9d
mov edx, r15d
mov ecx, r15d
xor r10d, r10d
xor r11d, r11d
test r15d, r15d
jle 0x14006eaa3
movsxd rax, r15d
mov qword [rsp + 0x40], r12
add rax, r8
movsx r12d, byte [r11 + rax - 1]
cmp r12d, 0x20
je 0x14006ea83
test r12d, r12d
jne 0x14006ea9e
inc r9d
lea r15d, [rcx + r10 - 1]
dec r10d
dec r11
mov dword [rsp + 0x5c0], r15d
cmp r9d, edx
jb 0x14006ea72
mov r12, qword [rsp + 0x40]
test r15d, r15d
jne 0x14006eaf3
test byte [r12 + 0x24d], 4
je 0x14006eaf3
mov rcx, r12
lea rdx, [rsp + 0x5b8]
lea r8, [rsp + 0x5c0]
call fcn.140069b10
test eax, eax
jne 0x14006ead9
mov r8, qword [rsp + 0x5b8]
jmp 0x14006eaf3
je 0x14006ebcb
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
test r14d, r14d
je 0x14006eb86
movsxd rax, dword [rsp + 0x5c0]
mov rcx, r12
mov rdx, r8
mov byte [r8 + rax], 0
call fcn.14004d550
cmp eax, 0xffffffff
je 0x14006f3c5
xor r14d, r14d
cmp dword [0x1400fc280], 0
jne 0x14006eb2e
cmp eax, 0xfffffffa
je 0x14006eb6b
cmp eax, 1
je 0x14006eb6b
test eax, eax
jne 0x14006eb44
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x14006eb76
cmp eax, 2
jne 0x14006eb56
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
jmp 0x14006eb76
mov dword [rsp + 0x148], 1
mov r8, qword [rsp + 0x5b8]
jmp 0x14006eb86
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
mov qword [r12 + 0x178], rax
mov r8, qword [rsp + 0x5b8]
mov rcx, r8
lea rdx, [rsp + 0x4af]
test cl, 3
je 0x14006eba9
mov al, byte [rcx]
inc rcx
test al, al
mov byte [rdx], al
je 0x14006ebae
inc rdx
test cl, 3
jne 0x14006eb96
call fcn.14009efc0
cmp dword [0x1400fc280], 0
je 0x14006ebcb
test r14d, r14d
jne 0x14006ebcb
cmp qword [r12 + 0x178], 0xffffffffffffffff
je 0x14006f2aa
mov rax, qword [rdi]
cmp rax, 5
ja case.default.0x14006ebea
movsxd rdx, eax
lea rax, [0x140000000]
mov rcx, qword [rax + rdx*8 + 0xb9840]
jmp rcx
mov dword [rsp + 0x150], 1
jmp case.0x14006ebea.0
mov ebx, 1
jmp 0x14006ec20
mov dword [rsp + 0x158], 1
jmp 0x14006ec20
mov dword [rsp + 0x160], 1
jmp 0x14006ec20
mov r13d, 1
mov rax, qword [rdi + 0x68]
cmp rax, 4
ja case.default.0x14006ec40
movsxd rdx, eax
lea rax, [0x140000000]
mov rcx, qword [rax + rdx*8 + 0xb9870]
jmp rcx
test r13d, r13d
jne 0x14006ec51
cmp dword [rsp + 0x158], 0
je 0x14006ec5b
mov ebx, 5
jmp 0x14006ed09
cmp dword [rsp + 0x160], 0
je 0x14006ec6f
mov ebx, 4
jmp 0x14006ed09
mov eax, 0xa
test ebx, ebx
cmovne ebx, eax
jmp 0x14006ed09
cmp dword [rsp + 0x160], 0
jne case.0x14006ec40.2
test ebx, ebx
jne case.0x14006ec40.2
cmp dword [rsp + 0x150], 0
je case.0x14006ec40.1
test r13d, r13d
jne 0x14006eca5
cmp dword [rsp + 0x158], 0
je 0x14006ecbb
movzx ebx, byte [r12 + 0x24c]
not ebx
and ebx, 1
shl ebx, 2
add ebx, 7
jmp 0x14006ed09
cmp dword [rsp + 0x160], 0
je 0x14006eccc
mov ebx, 6
jmp 0x14006ed09
mov eax, 9
test ebx, ebx
cmovne ebx, eax
jmp 0x14006ed09
test r13d, r13d
jne 0x14006ece7
cmp dword [rsp + 0x158], 0
je 0x14006ecee
mov ebx, 3
jmp 0x14006ed09
cmp dword [rsp + 0x160], 0
je 0x14006ecff
mov ebx, 2
jmp 0x14006ed09
mov eax, 8
test ebx, ebx
cmovne ebx, eax
mov rax, qword [rdi + 0x108]
test rax, rax
mov edx, dword [0x1400fc280]
je 0x14006ed38
test edx, edx
jne 0x14006ed38
mov eax, 0x232
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov rax, qword [rdi + 0x128]
test rax, rax
je 0x14006f391
test edx, edx
je 0x14006f001
mov eax, dword [rdi + 0x130]
mov dword [rsp + 0x168], eax
mov rcx, r12
lea rdx, [rsp + 0x4af]
call fcn.14004d550
cmp eax, 0xffffffff
je 0x14006edb5
cmp ebx, 3
jne 0x14006ed7e
mov ebx, 1
jmp 0x14006edb5
cmp ebx, 5
je 0x14006edb5
movzx edx, byte [r12 + 0x244]
test dl, 4
je 0x14006edb5
mov ecx, 0x229
mov eax, Ordinal_52
test dl, 0x20
cmovne eax, ecx
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov esi, dword [0x1400fc280]
test esi, esi
jne 0x14006edc6
cmp eax, 0xfffffffa
je 0x14006ee00
jmp 0x14006edee
cmp eax, 0xfffffffa
je 0x14006ee00
cmp eax, 1
je 0x14006ee00
cmp dword [rsp + 0x168], 0
jne 0x14006f001
mov rdx, qword [rdi + 0x108]
test rdx, rdx
jne 0x14006ed1f
cmp eax, 0xfffffffc
je 0x14006f373
cmp eax, 0xffffffff
je 0x14006f2c9
mov rbp, qword [r12 + 0xb8]
test esi, esi
je 0x14006ee66
mov rcx, rbp
lea rdx, [0x1400b98d8]
call fcn.14002da1c
test eax, eax
jne 0x14006ee3b
lea rdx, [0x1400b989c]
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
je 0x14006eed4
mov rcx, rbp
lea rdx, str.CONOUT_
call fcn.14002da1c
test eax, eax
jne 0x14006ee66
lea rdx, [0x1400b989c]
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
je 0x14006eed4
mov rcx, rbp
lea rdx, str.CONOUT_
call fcn.14002da1c
test eax, eax
jne 0x14006ee91
lea rdx, [0x1400b98d8]
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
je 0x14006eed4
mov rcx, rbp
lea rdx, [0x1400b98d8]
call fcn.14002da1c
test eax, eax
jne 0x14006eebc
lea rdx, str.CONOUT_
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
je 0x14006eed4
mov rdx, rbp
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
jne 0x14006ef6e
test byte [r12 + 0x244], 4
je 0x14006ef13
cmp ebx, dword [r12 + 0x208]
je 0x14006ef13
mov rax, qword [rdi + 0x68]
test rax, rax
jne 0x14006eefa
mov rax, qword [rdi]
test rax, rax
je 0x14006ef13
mov eax, 0x230
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
cmp dword [0x1400fc280], 0
je 0x14006ef58
movzx eax, byte [r12 + 0x24c]
test eax, 0x80
je 0x14006ef58
mov rax, qword [rdi + 0x108]
test rax, rax
je 0x14006ef58
mov rax, qword [rdi + 0x110]
test rax, rax
je 0x14006ef4f
or byte [r12 + 0x24d], 1
jmp 0x14006ef58
and byte [r12 + 0x24d], 0xfe
xor eax, eax
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
or byte [r12 + 0x24d], 2
mov rbx, qword [r12 + 0xc0]
test esi, esi
je 0x14006ef9c
movzx eax, byte [r12 + 0x24c]
test eax, 0x80
je 0x14006ef9c
or byte [r12 + 0x246], 8
mov rcx, r12
xor edx, edx
and byte [r12 + 0x249], 0x7f
call fcn.14004e150
and byte [r12 + 0x24d], 0xfd
mov qword [r12 + 0xc0], rbx
cmp dword [0x1400fc280], 0
je 0x14006efe3
movzx edx, byte [r12 + 0x24c]
test edx, 0x80
je 0x14006efe3
and byte [r12 + 0x246], 0xf7
mov edx, 0xffffffff
test eax, eax
cmove eax, edx
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov eax, 0x234
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov edx, 0x23e
mov eax, Ordinal_52
test byte [r12 + 0x244], 0x20
cmovne eax, edx
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
mov edx, 0x23c
mov eax, Ordinal_52
test byte [r12 + 0x244], 0x20
cmovne eax, edx
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
lea rdx, str.FORT_d
lea rcx, [rsp + 0x3ae]
call fcn.14002d710
lea rcx, [rsp + 0x3ae]
call fcn.14003fb28
mov r8, rax
mov qword [rsp + 0x5b8], r8
test r8, r8
jne 0x14006e9f2
mov eax, dword [r12 + 0x1b0]
add eax, 4
cmp eax, 0xa
ja case.0x14006f0c9.1
movsxd rax, eax
lea rdx, [0x140000000]
mov rcx, qword [rdx + rax*8 + 0xb97e0]
jmp rcx
mov ecx, 0xfffffff4
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, str.CONOUT_
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006f135
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, str.CONOUT_
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006f135
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, [0x1400b2c80]
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
xor r14d, r14d
test r8, r8
jne 0x14006e9f2
test byte [r12 + 0x24d], 4
jne 0x14006f233
test byte [r12 + 0x245], 0x20
je 0x14006f1bd
mov r8, qword [r12 + 0xb8]
mov rdx, r8
mov qword [rsp + 0x5b8], r8
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x14006f196
mov rax, rdx
add rdx, rcx
call fcn.14009ef90
mov rcx, qword [rsp + 0x48]
xor edx, edx
test rcx, rcx
mov r15d, eax
cmovne rcx, rdx
mov dword [rsp + 0x5c0], r15d
movsx r9d, byte [r8]
mov qword [rsp + 0x48], rcx
jmp 0x14006ea2c
lea rdx, str.fort._d
lea rcx, [rsp + 0x3ae]
mov r8d, dword [r12 + 0x1b0]
call fcn.14002d710
lea rdx, [rsp + 0x3ae]
mov rcx, rdx
and rdx, 0xfffffffffffffff0
pxor xmm0, xmm0
pcmpeqb xmm0, xmmword [rdx]
pmovmskb eax, xmm0
and ecx, 0xf
shr eax, cl
bsf eax, eax
jne 0x14006f209
mov rax, rdx
add rdx, rcx
call fcn.14009ef90
mov r15d, eax
lea r8, [rsp + 0x3ae]
mov rcx, r8
mov rdx, r8
mov dword [rsp + 0x5c0], r15d
mov qword [rsp + 0x5b8], rdx
movsx r9d, byte [rcx]
jmp 0x14006ea2c
xor r15d, r15d
lea r8, [rsp + 0x3ae]
mov qword [rsp + 0x5b8], r8
mov byte [r8], r15b
mov dword [rsp + 0x5c0], r15d
jmp 0x14006ea53
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, str.CONOUT_
xor r14d, r14d
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006e9f2
mov ecx, 0xfffffff5
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, str.CONOUT_
xor r14d, r14d
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006e9f2
cmp dword [rsp + 0x148], 0
jne 0x14006ebcb
mov qword [r12 + 0x178], 0
jmp 0x14006ebcb
xor edx, edx
lea rcx, [rsp + 0x4af]
mov r8d, 3
xor r9d, r9d
mov dword [rsp + 0x20], 3
mov dword [rsp + 0x28], 0
mov qword [rsp + 0x30], 0
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rbp, 0xffffffffffffffff
je 0x14006f368
mov rcx, rbp
lea rdx, [rsp + 0x144]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov rcx, qword [r12 + 0x178]
lea rdx, [rsp + 0x178]
call qword [sym.imp.KERNEL32.dll_GetFileInformationByHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [rsp + 0x160]
cmp eax, dword [rsp + 0x194]
jne 0x14006f368
mov eax, dword [rsp + 0x170]
cmp eax, dword [rsp + 0x1a4]
jne 0x14006f368
mov eax, dword [rsp + 0x174]
cmp eax, dword [rsp + 0x1a8]
je 0x14006eed4
mov esi, dword [0x1400fc280]
jmp 0x14006ef6e
mov byte [rsp + 0x4b3], 0
mov dword [rsp + 0x4af], 0x314d4f43
mov esi, dword [0x1400fc280]
jmp 0x14006ee00
test edx, edx
jne 0x14006ed5d
lea rdx, [0x1400b989c]
lea rcx, [rsp + 0x4af]
call fcn.14002da1c
test eax, eax
jne 0x14006ed5d
mov dword [rsp + 0x4af], 0x4e4f43
jmp 0x14006ed5d
test byte [r12 + 0x24d], 8
jne 0x14006f3db
test rsi, rsi
je 0x14006f4fc
jmp 0x14006f3e4
test rsi, rsi
je 0x14006f6aa
mov r15d, ebp
cmp r15d, 0xff
jle 0x14006f409
mov eax, reloc.LMGR10.dll_Ordinal_43
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
movsxd r8, ebp
lea rcx, [rsp + 0x2ad]
mov rdx, rsi
mov qword [rsp + 0x40], r8
call fcn.14009ef60
mov rax, qword [rsp + 0x40]
lea rdx, [rsp + 0x2ad]
mov byte [rsp + rax + 0x2ad], 0
jmp 0x14006f640
test r15d, r15d
jg 0x14006f44a
mov dword [rsp + 0x40], 0
jmp 0x14006f460
movsxd r15, r15d
xor ebp, ebp
mov eax, 1
cmp byte [rdx + r15], 0x5c
cmovne ebp, eax
mov dword [rsp + 0x40], ebp
cmp qword [rsp + 0x48], 3
je 0x14006f54e
mov eax, dword [rsp + 0x40]
add eax, dword [rsp + 0x5c0]
add eax, r15d
cmp eax, 0x100
jle 0x14006f49a
mov eax, reloc.LMGR10.dll_Ordinal_43
add rsp, 0x5c8
pop rbp
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
movsxd r15, r15d
lea rcx, [rsp + 0x4af]
mov r8, r15
call fcn.14009ef60
cmp dword [rsp + 0x40], 0
je 0x14006f4bd
mov byte [rsp + r15 + 0x4af], 0x5c
mov ebp, dword [rsp + 0x40]
movsxd r8, dword [rsp + 0x5c0]
mov rdx, qword [rsp + 0x5b8]
lea rcx, [rsp + rbp + 0x4af]
add rcx, r15
call fcn.14009ef60
movsxd rax, dword [rsp + 0x5c0]
add rax, rbp
add rax, r15
mov byte [rsp + rax + 0x4af], 0
jmp 0x14006ebae
mov rcx, qword [rsp + 0x5b8]
mov edx, 0x101
lea r8, [rsp + 0x2ad]
lea r9, [rsp + 0x5b0]
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x14006f544
mov eax, eax
cmp rax, 0x101
jae 0x14006f544
mov dword [rsp + 0x5c0], eax
lea rdx, [rsp + 0x2ad]
mov qword [rsp + 0x5b8], rdx
xor edx, edx
xor r15d, r15d
jmp 0x14006f440
test byte [r12 + 0x245], 0x20
jne 0x14006f46c
test rsi, rsi
je 0x14006f5bf
mov rcx, rdx
lea rbp, [rsp + 0x1ac]
lea rdx, [0x1400b9910]
xor r8d, r8d
mov r9, rbp
call qword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test byte [r12 + 0x24d], 8
lea rcx, [rsp + 0x1ae]
lea rdx, [rsp + 0x4af]
cmove rcx, rbp
test cl, 3
je 0x14006f5b5
mov al, byte [rcx]
inc rcx
test al, al
mov byte [rdx], al
je 0x14006f5ba
inc rdx
test cl, 3
jne 0x14006f5a2
call fcn.14009efc0
jmp 0x14006ebae
test byte [r12 + 0x24d], 8
je 0x14006f5db
mov byte [rsp + 0x40], 0x2e
lea rdx, [rsp + 0x40]
mov byte [rsp + 0x41], 0
jmp 0x14006f562
lea rcx, str.FORT_TMPDIR
call fcn.14003fb28
test rax, rax
je 0x14006f61b
mov rcx, rax
lea rdx, [rsp + 0x40]
test cl, 3
je 0x14006f60c
mov al, byte [rcx]
inc rcx
test al, al
mov byte [rdx], al
je 0x14006f611
inc rdx
test cl, 3
jne 0x14006f5f9
call fcn.14009efc0
lea rdx, [rsp + 0x40]
jmp 0x14006f562
mov ecx, 0x100
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_GetTempPathA]
test eax, eax
lea rdx, [rsp + 0x40]
mov eax, 0
cmove rdx, rax
jmp 0x14006f562
cmp byte [rsp + 0x2ad], 0x20
jne 0x14006f662
test r15d, r15d
jle 0x14006f65a
inc rdx
dec r15d
cmp byte [rdx], 0x20
je 0x14006f64a
movsxd r15, r15d
mov qword [rsp + 0x40], r15
xor r9d, r9d
xor eax, eax
test r15d, r15d
jle 0x14006f440
mov r8, qword [rsp + 0x40]
mov r11, qword [rsp + 0x40]
lea rbp, [rdx + r8]
movsx r10d, byte [rax + rbp - 1]
cmp r10d, 0x20
je 0x14006f693
test r10d, r10d
jne 0x14006f43b
lea r15d, [r8 - 1]
sub r15d, r9d
inc r9
dec rax
cmp r9, r11
jb 0x14006f67e
jmp 0x14006f43b
cmp qword [rsp + 0x48], 3
je 0x14006f6bf
mov r8, qword [rsp + 0x5b8]
jmp 0x14006eb86
test byte [r12 + 0x245], 0x20
je 0x14006f4fc
mov r8, qword [rsp + 0x5b8]
jmp 0x14006eb86
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, [0x1400b2c80]
xor r14d, r14d
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006e9f2
movzx eax, byte [r12 + 0x24d]
test al, 4
je 0x14006f721
test byte [r12 + 0x244], 1
je 0x14006e915
lea rcx, str.FOR_READ
call fcn.14003fb28
mov r8, rax
mov qword [rsp + 0x5b8], r8
test r8, r8
jne 0x14006e9f2
mov ecx, 0xfffffff6
call qword [sym.imp.KERNEL32.dll_GetStdHandle]
lea r8, [0x1400b2c80]
xor r14d, r14d
mov qword [r12 + 0x178], rax
mov qword [rsp + 0x5b8], r8
jmp 0x14006e9f2
test byte [r12 + 0x245], 0x20
jne 0x14006e8c0
lea rdx, str.SCRATCH
lea rcx, [rsp + 0x3ae]
call fcn.14002d710
mov dword [rsp + 0x5c0], 7
lea r8, [rsp + 0x3ae]
mov qword [rsp + 0x5b8], r8
mov eax, 7
jmp 0x14006eb04
test byte [r12 + 0x244], 1
jne 0x14006e98e
jmp 0x14006e934
test byte [r12 + 0x244], 1
jne 0x14006e9b0
jmp 0x14006e932