Function at 0x140001050
Capabilities:
Check if file exists
Get file attributes
Set current directory

Disassembly:
mov qword [rsp + 0x10], rdx
mov dword [rsp + 8], ecx
push rdi
sub rsp, 0x390
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov rax, qword [0x140024008]
xor rax, rsp
mov qword [rsp + 0x380], rax
movzx eax, byte [0x140019310]
mov byte [rsp + 0x270], al
lea rax, [rsp + 0x271]
mov rdi, rax
xor eax, eax
mov ecx, 0x103
rep stosb byte [rdi], al
lea rdx, [0x140019311]
lea rcx, [rsp + 0xd0]
call fcn.1400025e0
nop
lea rdx, [0x140019312]
lea rcx, [rsp + 0x110]
call fcn.1400025e0
nop
lea rcx, [rsp + 0xf0]
call fcn.140002630
nop
mov byte [rsp + 0x20], 1
mov r8d, 0x104
lea rdx, [rsp + 0x270]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea rdx, str.bfx_
lea rcx, [rsp + 0x270]
call fcn.140003630
test rax, rax
je 0x140001138
mov eax, dword [0x140024bd8]
and eax, 2
test eax, eax
je 0x140001133
mov ecx, 2
call fcn.140008564
lea rdx, str.lib64_not_needed_n
mov rcx, rax
call fcn.140003730
mov byte [rsp + 0x20], 0
mov eax, dword [0x140024bd8]
and eax, 1
test eax, eax
je 0x140001166
mov ecx, 2
call fcn.140008564
lea r8, [rsp + 0x270]
lea rdx, str.exe_path_s_n
mov rcx, rax
call fcn.140003730
lea rcx, [rsp + 0x270]
call fcn.140009c80
mov dword [rsp + 0x24], eax
cmp dword [rsp + 0x24], 0
jle 0x140001489
lea rdx, [0x140019313]
lea rcx, [rsp + 0xd0]
call fcn.1400019d0
movzx eax, al
test eax, eax
jne 0x1400011c9
movzx eax, byte [rsp + 0x20]
test eax, eax
je 0x140001489
lea rdx, [0x140019319]
lea rcx, [rsp + 0x110]
call fcn.1400019d0
movzx eax, al
test eax, eax
je 0x140001489
movsxd rax, dword [rsp + 0x24]
movsx eax, byte [rsp + rax + 0x270]
cmp eax, 0x5c
jne 0x14000147a
movsxd rax, dword [rsp + 0x24]
mov qword [rsp + 0x30], rax
lea rdx, [rsp + 0x270]
lea rcx, [rsp + 0x1b0]
call fcn.1400025e0
mov qword [rsp + 0x28], rax
mov rax, qword [rsp + 0x28]
mov qword [rsp + 0x38], rax
mov rax, qword [rsp + 0x30]
mov r9, rax
xor r8d, r8d
lea rdx, [rsp + 0x190]
mov rcx, qword [rsp + 0x38]
call fcn.140003660
mov qword [rsp + 0x40], rax
mov rax, qword [rsp + 0x40]
mov qword [rsp + 0x48], rax
lea r8, str.pylib
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x170]
call fcn.140001aa0
mov qword [rsp + 0x50], rax
mov rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0xf0]
call fcn.140002720
lea rcx, [rsp + 0x170]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x190]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x1b0]
call fcn.1400026d0
lea rdx, [0x14001931a]
lea rcx, [rsp + 0xd0]
call fcn.1400019d0
movzx eax, al
test eax, eax
je 0x14000131d
lea rcx, [rsp + 0xf0]
call fcn.140003390
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14000131d
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0xd0]
call fcn.1400027b0
mov eax, dword [0x140024bd8]
and eax, 2
test eax, eax
je 0x14000131d
lea rcx, [rsp + 0xd0]
call fcn.140003390
mov qword [rsp + 0x58], rax
mov ecx, 2
call fcn.140008564
mov rcx, qword [rsp + 0x58]
mov r8, rcx
lea rdx, str.set_pylib_path_to__s_n
mov rcx, rax
call fcn.140003730
movsxd rax, dword [rsp + 0x24]
mov qword [rsp + 0x68], rax
lea rdx, [rsp + 0x270]
lea rcx, [rsp + 0x210]
call fcn.1400025e0
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x68]
mov r9, rax
xor r8d, r8d
lea rdx, [rsp + 0x1f0]
mov rcx, qword [rsp + 0x70]
call fcn.140003660
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x80], rax
lea r8, str.lib64
mov rdx, qword [rsp + 0x80]
lea rcx, [rsp + 0x1d0]
call fcn.140001aa0
mov qword [rsp + 0x88], rax
mov rdx, qword [rsp + 0x88]
lea rcx, [rsp + 0xf0]
call fcn.140002720
lea rcx, [rsp + 0x1d0]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x1f0]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x210]
call fcn.1400026d0
movzx eax, byte [rsp + 0x20]
test eax, eax
je 0x14000147a
lea rdx, [0x14001931b]
lea rcx, [rsp + 0x110]
call fcn.1400019d0
movzx eax, al
test eax, eax
je 0x14000147a
lea rcx, [rsp + 0xf0]
call fcn.140003390
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x14000147a
lea rdx, [rsp + 0xf0]
lea rcx, [rsp + 0x110]
call fcn.1400027b0
mov eax, dword [0x140024bd8]
and eax, 2
test eax, eax
je 0x14000147a
lea rcx, [rsp + 0x110]
call fcn.140003390
mov qword [rsp + 0x90], rax
mov ecx, 2
call fcn.140008564
mov rcx, qword [rsp + 0x90]
mov r8, rcx
lea rdx, str.set_lib64_path_to__s_n
mov rcx, rax
call fcn.140003730
mov eax, dword [rsp + 0x24]
dec eax
mov dword [rsp + 0x24], eax
jmp 0x140001177
cmp dword [rsp + 0x24], 0
jne 0x1400014b3
mov ecx, 2
call fcn.140008564
lea rdx, str.path_navigation_error_n
mov rcx, rax
call fcn.140003730
mov ecx, 1
call fcn.14000a004
lea rcx, [rsp + 0xd0]
call fcn.140003390
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x140001510
lea rcx, [rsp + 0xd0]
call fcn.140003390
mov qword [rsp + 0x98], rax
mov ecx, 2
call fcn.140008564
mov rcx, qword [rsp + 0x98]
mov r8, rcx
lea rdx, str.could_not_chdir_to__s_n
mov rcx, rax
call fcn.140003730
mov ecx, 1
call fcn.14000a004
lea r8, [rsp + 0xd0]
lea rdx, str.PYTHONPATH
lea rcx, [rsp + 0x130]
call fcn.140001be0
nop
lea rdx, [0x14001931c]
lea rcx, [rsp + 0x110]
call fcn.140001a00
movzx eax, al
test eax, eax
je 0x1400015d5
lea r8, [0x14001933c]
lea rdx, [rsp + 0x130]
lea rcx, [rsp + 0x250]
call fcn.140001b00
mov qword [rsp + 0xa0], rax
mov rax, qword [rsp + 0xa0]
mov qword [rsp + 0xa8], rax
lea r8, [rsp + 0x110]
mov rdx, qword [rsp + 0xa8]
lea rcx, [rsp + 0x230]
call fcn.140001a40
mov qword [rsp + 0xb0], rax
mov rdx, qword [rsp + 0xb0]
lea rcx, [rsp + 0x130]
call fcn.140002720
lea rcx, [rsp + 0x230]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x250]
call fcn.1400026d0
lea rcx, [rsp + 0x130]
call fcn.140003390
mov rcx, rax
call fcn.14000a7f0
lea r8, [rsp + 0xd0]
lea rdx, str.PYTHONHOME
lea rcx, [rsp + 0x150]
call fcn.140001be0
lea rcx, [rsp + 0x150]
call fcn.140003390
mov rcx, rax
call fcn.14000a7f0
lea rcx, str.PYTHONDONTWRITEBYTECODE1
call fcn.14000a7f0
mov eax, dword [0x140024bd8]
and eax, 1
test eax, eax
je 0x1400016a6
lea rcx, [rsp + 0x130]
call fcn.140003390
mov qword [rsp + 0xb8], rax
mov ecx, 2
call fcn.140008564
mov rcx, qword [rsp + 0xb8]
mov r8, rcx
lea rdx, [0x1400193c4]
mov rcx, rax
call fcn.140003730
lea rcx, [rsp + 0x150]
call fcn.140003390
mov qword [rsp + 0xc0], rax
mov ecx, 2
call fcn.140008564
mov rcx, qword [rsp + 0xc0]
mov r8, rcx
lea rdx, [0x1400193d4]
mov rcx, rax
call fcn.140003730
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryA]
lea rcx, [rsp + 0xd0]
call fcn.140003390
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryA]
lea rcx, [rsp + 0x150]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x130]
call fcn.1400026d0
nop
lea rcx, [rsp + 0xf0]
call fcn.1400026d0
nop
lea rcx, [rsp + 0x110]
call fcn.1400026d0
nop
lea rcx, [rsp + 0xd0]
call fcn.1400026d0
mov rcx, qword [rsp + 0x380]
xor rcx, rsp
call fcn.1400042a0
add rsp, 0x390
pop rdi
ret