Function at 0x1400b9948
Capabilities:
Query environment variable
Read file on windows

Disassembly:
push r13
push r14
push r15
mov eax, 0x2770
call fcn.1400f0b10
sub rsp, rax
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rsp + 0x2798], rbx
mov qword [rsp + 0x27a0], rdi
mov qword [rsp + 0x27a8], r12
mov rax, qword [0x1401412b0]
xor rax, rsp
mov qword [rsp + 0x2760], rax
mov r12b, cl
xor edi, edi
test dl, dl
je 0x1400b99b2
cmp word [0x14015765e], di
je 0x1400b9a17
cmp qword [0x14019f3b8], rdi
je 0x1400b9a17
mov word [0x14015765e], di
jmp 0x1400b9a17
mov cl, 1
call fcn.1400bfd9c
mov dword [0x14015a7a8], 3
mov qword [0x140149d30], rdi
mov cl, byte [0x140148c34]
test cl, cl
jne 0x1400b9b11
xor r8d, r8d
lea rdx, [0x140160ab8]
lea rcx, [0x14016e0b0]
call fcn.14003ebe4
cmp byte [0x14016f132], dil
je 0x1400b9a17
mov eax, dword [0x14015a7a4]
mov r14d, 4
cmp qword [0x140160ae8], 1
cmova eax, r14d
mov dword [0x14015a7a4], eax
jmp 0x1400b9a1d
mov r14d, 4
mov cl, byte [0x140148c34]
test cl, cl
jne 0x1400b9b17
cmp word [0x14015fab2], di
jne 0x1400b9b17
mov r12b, dil
mov ebx, 0x800
mov r8d, ebx
lea rdx, [0x14015fab2]
mov ecx, dword [0x14015ca54]
call fcn.1400bf974
mov dword [rsp + 0x20], ebx
lea r13, [0x14010f128]
mov r9, r13
lea r8, [rsp + 0x1760]
lea rdx, str.DefFolder
lea rcx, [0x14010f9c0]
call fcn.14009e864
cmp word [rsp + 0x1760], di
jne 0x1400b9aaa
cmp byte [0x14016f132], dil
je 0x1400b9ae8
mov edx, ebx
lea rcx, [rsp + 0x1760]
call fcn.1400395cc
cmp word [rsp + 0x1760], di
je 0x1400b9ae8
mov rdx, rbx
lea rcx, [rsp + 0x1760]
call fcn.140076b90
mov r8, rbx
lea rdx, [0x14015fab2]
lea rcx, [rsp + 0x1760]
call fcn.14008d22c
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x14015fab2]
call fcn.14008d254
cmp word [0x140155658], di
setne r8b
mov r9d, dword [0x14015ca54]
mov rdx, rbx
lea rcx, [0x14015fab2]
call fcn.1400c34f4
mov cl, byte [0x140148c34]
jmp 0x1400b9b23
mov r14d, 4
lea r13, [0x14010f128]
mov ebx, 0x800
mov eax, dword [0x14015a7a4]
mov edx, 2
test eax, eax
cmove eax, edx
mov dword [0x14015a7a4], eax
test cl, cl
je 0x1400b9c9d
mov r15d, dword [0x14016b2d4]
cmp r15d, 1
jbe 0x1400b9b8d
cmp dword [0x14015a774], 3
je 0x1400ba0d8
lea ecx, [rdx + 0x63]
call fcn.140087094
mov rbx, rax
mov ecx, 0x1fd
call fcn.140087094
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140148b90]
call int.1400c5f20
jmp 0x1400ba0d8
mov r8, rbx
lea rdx, [0x14015fab2]
lea rcx, [0x14016b2d0]
call fcn.140005240
mov r8, rbx
lea rdx, [0x140158670]
lea rcx, [0x14016b2d0]
call fcn.140005618
cmp word [0x140158670], di
je 0x1400b9bd1
mov rdx, rbx
lea rcx, [0x140158670]
call fcn.140076b90
mov byte [0x14015a818], dil
lea rdx, [rsp + 0x110]
lea rcx, [0x14016b2d0]
call fcn.140005638
mov eax, dword [rsp + 0x258]
mov dword [0x14015ca54], eax
mov qword [rsp + 0x1320], rdi
mov qword [rsp + 0x1328], rdi
mov qword [rsp + 0x1330], rdi
xor r8d, r8d
lea rdx, [rsp + 0x310]
lea rcx, [0x14015fab2]
call fcn.14006975c
test al, al
je 0x1400b9c37
cmp qword [rsp + 0x1310], 0x18
je 0x1400b9c58
cmp dword [rsp + 0x258], edi
jne 0x1400b9c51
cmp byte [rsp + 0x190], dil
mov byte [0x14015a800], 1
jne 0x1400b9c58
mov byte [0x14015a800], dil
test r15d, r15d
jne 0x1400b9c66
cmp dword [rsp + 0x2e0], edi
je 0x1400b9c74
movzx eax, byte [rsp + 0x252]
mov dword [0x14015a794], eax
cmp qword [rsp + 0x248], rdi
je 0x1400b9c96
mov r8, rbx
lea rdx, [0x14010f558]
lea rcx, [0x140155658]
call fcn.14008d254
jmp 0x1400b9c9d
mov word [0x140155658], di
mov rcx, qword [0x140148b90]
call qword [sym.imp.USER32.dll_IsWindowVisible]
neg eax
sbb rcx, rcx
and rcx, qword [0x140148b90]
xor r8d, r8d
mov dl, r12b
call fcn.1400bcce8
test al, al
je 0x1400ba0b9
mov al, byte [0x14019f3d7]
neg al
sbb ecx, ecx
and ecx, dword [0x14019f3d8]
mov dword [0x14015a788], ecx
mov rcx, qword [0x14019f3b8]
test rcx, rcx
je 0x1400b9cf2
call fcn.1400c3e1c
jmp 0x1400b9d16
cmp byte [0x140148c34], dil
je 0x1400b9d16
cmp qword [rsp + 0x248], rdi
je 0x1400b9d16
cmp word [0x140155658], 0x2a
jne 0x1400b9d16
mov word [0x140155658], di
cmp qword [0x140160ae8], rdi
jne 0x1400b9d53
mov ecx, 0x65
call fcn.140087094
mov rbx, rax
mov ecx, 0x14b
call fcn.140087094
mov rdx, rax
mov r9d, 0x30
mov r8, rbx
mov rcx, qword [0x140148b90]
call int.1400c5f20
jmp 0x1400ba0b9
cmp word [0x14015765e], di
je 0x1400b9e44
cmp dword [0x140158660], edi
jne 0x1400b9e44
lea rdx, [0x140113ad8]
lea rcx, [0x14015765e]
call fcn.14006918c
mov r12, rax
test rax, rax
je 0x1400b9e44
mov r9, rax
mov edx, 1
mov r8d, 0x400
lea rcx, [rsp + 0x1360]
call fcn.1400fbd84
mov r15, rax
mov rcx, r12
call fcn.1400f7dac
mov eax, 0x3ff
cmp r15, rax
cmovb rax, r15
cmp rax, 0x400
jae 0x1400b9e3e
mov byte [rsp + rax + 0x1360], dil
mov dword [rsp + 0x40], 0x30c
test r15, r15
je 0x1400b9e00
lea r8, [rsp + 0x40]
mov edx, r15d
lea rcx, [rsp + 0x1360]
call qword [sym.imp.ADVAPI32.dll_IsTextUnicode]
test eax, eax
je 0x1400b9e00
mov dword [0x140158660], 3
jmp 0x1400b9e44
cmp r15, 3
jbe 0x1400b9e44
cmp byte [rsp + 0x1360], 0xef
jne 0x1400b9e44
cmp byte [rsp + 0x1361], 0xbb
jne 0x1400b9e44
cmp byte [rsp + 0x1362], 0xbf
jne 0x1400b9e44
lea rcx, [rsp + 0x1360]
call fcn.14008fd44
test al, al
je 0x1400b9e44
mov dword [0x140158660], r14d
jmp 0x1400b9e44
call fcn.1400f08ec
nop
lea rcx, [rsp + 0x50]
call fcn.14008d288
nop
lea rcx, [0x140160ab8]
call fcn.14008d4c8
mov r15d, 0x25
lea rcx, [0x140160ab8]
call fcn.14008d338
mov r14, rax
test rax, rax
je 0x1400b9f7b
mov r9, rbx
lea r8, [rsp + 0x1760]
mov rdx, rax
lea rcx, [0x14016e0b0]
call fcn.14003f320
cmp word [r14], 0x40
jne 0x1400b9f00
lea rcx, [rsp + 0x1760]
call fcn.140068258
test al, al
jne 0x1400b9f00
lea rdx, [r14 + 2]
mov r9, rbx
lea r8, [rsp + 0x1760]
lea rcx, [0x14016e0b0]
call fcn.14003f320
mov byte [rsp + 0x38], 1
mov byte [rsp + 0x30], 1
mov byte [rsp + 0x28], 1
mov eax, dword [0x140158664]
mov dword [rsp + 0x20], eax
xor r9d, r9d
xor r8d, r8d
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x1760]
call fcn.140069240
test al, al
je 0x1400b9f00
jmp 0x1400b9e61
mov edx, r15d
mov rcx, r14
call fcn.1400f1ce0
test rax, rax
je 0x1400b9f67
mov edx, r15d
lea rcx, [rax + 2]
call fcn.1400f1ce0
test rax, rax
je 0x1400b9f67
lea rcx, [rsp + 0x1760]
call fcn.140068258
test al, al
jne 0x1400b9f67
mov r8d, ebx
lea rdx, [rsp + 0x310]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
dec eax
cmp eax, 0x7ff
ja 0x1400b9f67
mov r8, rbx
lea rdx, [rsp + 0x310]
lea rcx, [rsp + 0x1760]
call fcn.14008d254
lea rdx, [rsp + 0x1760]
lea rcx, [rsp + 0x50]
call fcn.14008d2c4
jmp 0x1400b9efb
lea rdx, [rsp + 0x50]
lea rcx, [0x140160ab8]
call fcn.1400b98e4
nop
lea rcx, [rsp + 0x50]
call fcn.140004190
nop
jmp 0x1400b9fa8
cmp byte [0x14015ea65], dil
jne 0x1400b9fce
mov r9, rbx
lea r8, [0x14015fab2]
lea rdx, [0x14015fab2]
lea rcx, [0x14016e0b0]
call fcn.14003f320
mov al, byte [0x140159770]
mov byte [0x14016dca0], al
lea rcx, [0x14016dc70]
call fcn.1400a707c
cmp byte [0x14015ea81], dil
je 0x1400b9ff6
call fcn.1400ba988
jmp 0x1400ba008
mov dl, byte [0x14015ea63]
lea rcx, [0x14016b2d0]
call fcn.1400042ec
cmp qword [0x14019f3b8], rdi
je 0x1400ba01d
lea rcx, [0x14015765e]
call fcn.140067f70
cmp dword [0x140148c38], 1
je 0x1400ba0b9
cmp byte [0x140148c34], dil
je 0x1400ba041
lea rcx, [0x14016e0b0]
call fcn.14004299c
jmp 0x1400ba0b9
cmp byte [0x14015a7fe], dil
je 0x1400ba056
lea rcx, [0x140154618]
call fcn.1400acf84
mov r8, rbx
lea rdx, [rsp + 0x1760]
lea rcx, [0x14016e0b0]
call fcn.14003eb5c
lea rax, [rsp + 0x1760]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], di
jne 0x1400ba079
lea rdx, [0x14015fab2]
lea rcx, [rsp + 0x1760]
call fcn.1400902f8
test eax, eax
jne 0x1400ba0aa
lea rcx, [0x14015fab2]
call fcn.140078548
mov r13, rax
mov rdx, r13
lea rcx, [0x14016e0b0]
call fcn.140041dd0
mov rcx, qword [0x14019f3b8]
call fcn.1400f0c2c
mov byte [0x14016dca0], dil
lea rcx, [0x14016dc70]
call fcn.1400a707c
mov rcx, qword [rsp + 0x2760]
xor rcx, rsp
call fcn.1400f0b80
lea r11, [rsp + 0x2770]
mov rbx, qword [r11 + 0x28]
mov rdi, qword [r11 + 0x30]
mov r12, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r13
ret