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

Disassembly:
push rbx
sub rsp, 0x460
mov rbx, rcx
mov byte [rcx + 0x288], 1
mov word [rcx + 0xbd8], 0
mov rcx, qword [rcx + 0xba8]
test rcx, rcx
je 0x140036d4e
cmp word [rcx], 0
je 0x140036d4e
cmp byte [0x14013f73b], 0
mov qword [rsp + 0x478], rbp
jne 0x140036737
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140036737
cmp qword [0x14013f6b0], 0
jne 0x140036737
mov r9, qword [rbx + 0xba8]
lea r8, str.Script_file_not_found:_n_s
lea rcx, [rsp + 0x30]
mov edx, 0x204
call fcn.1400e0640
xor ebp, ebp
lea rcx, [rsp + 0x30]
xorpd xmm3, xmm3
lea edx, [rbp + 0x10]
xor r8d, r8d
mov qword [rsp + 0x20], rbp
call fcn.1400e9900
mov rbp, qword [rsp + 0x478]
xor eax, eax
add rsp, 0x460
pop rbx
ret
cmp qword [0x140141f38], 0
mov qword [rsp + 0x440], r14
lea r14, [0x1401035ac]
jne 0x140036761
call fcn.1400dd320
mov qword [0x140141f38], rax
test rax, rax
je 0x1400367bf
mov rdx, qword [0x140141f40]
cmp qword [rdx + 0x10], 0x28
jae 0x140036784
call fcn.1400dd320
mov rdx, qword [0x140141f40]
mov qword [rdx + 0x18], rax
test rax, rax
je 0x1400367bf
mov rcx, qword [rdx + 8]
add qword [rdx + 0x10], 0xffffffffffffffd8
lea rax, [rcx + 0x28]
mov qword [0x140141f48], rcx
mov qword [rdx + 8], rax
test rcx, rcx
je 0x1400367bf
xor ebp, ebp
lea rax, vtable.Label.0
mov qword [rcx + 8], r14
mov qword [rcx], rax
mov qword [rcx + 0x10], rbp
mov qword [rcx + 0x18], rbp
mov qword [rcx + 0x20], rbp
jmp 0x1400367c3
xor ebp, ebp
mov ecx, ebp
mov qword [rbx + 0x6d0], rcx
test rcx, rcx
je 0x140036d46
cmp byte [0x14013f73b], 0
lea rdx, [0x14011ce24]
jne 0x1400367ea
mov rdx, qword [rbx + 0xba8]
xor r9d, r9d
xor r8d, r8d
mov rcx, rbx
call fcn.14003a040
cmp eax, 1
jne 0x140036d46
xor r9d, r9d
xor r8d, r8d
mov dl, 0x68
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call fcn.1400430e0
test eax, eax
je 0x140036d46
mov rdx, qword [rbx + 0x658]
mov rcx, rbx
call fcn.14004e300
test eax, eax
je 0x140036d46
mov rdx, qword [rbx + 0x658]
mov rcx, rbx
mov qword [rsp + 0x480], rsi
call fcn.14004e430
cmp qword [rbx + 0x668], 0
je 0x140036888
mov rax, qword [rbx + 0x658]
mov rcx, qword [rbx + 0x670]
mov qword [rcx + 0x20], rax
mov rcx, qword [rbx + 0x658]
mov rax, qword [rbx + 0x670]
mov qword [rcx + 0x18], rax
mov rax, qword [rbx + 0x668]
mov qword [rbx + 0x658], rax
cmp dword [rbx + 0x690], 0
mov qword [rsp + 0x458], rdi
mov esi, ebp
mov qword [rsp + 0x450], r12
jle 0x140036921
mov r12, rbp
nop word [rax + rax]
mov rax, qword [rbx + 0x688]
mov rdi, qword [r12 + rax]
cmp byte [rdi + 0x79], 0
jne 0x140036913
test byte [rdi + 0x78], 4
jne 0x140036913
mov r8, qword [rdi + 0x38]
lea r9, [rdi + 0x5c]
mov rdx, rdi
mov rcx, rbx
call fcn.140060480
mov r8, qword [rdi + 0x48]
lea r9, [rdi + 0x68]
mov rdx, rdi
mov rcx, rbx
call fcn.140060480
mov r8, qword [rdi + 0x40]
lea r9, [rdi + 0x64]
mov rdx, rdi
mov rcx, rbx
call fcn.140060480
mov r8, qword [rdi + 0x50]
lea r9, [rdi + 0x70]
mov rdx, rdi
mov rcx, rbx
call fcn.140060480
inc esi
add r12, 8
cmp esi, dword [rbx + 0x690]
jl 0x1400368b0
cmp qword [rbx + 0x268], 0
je 0x14003694f
mov rcx, rbx
call fcn.140049840
test eax, eax
je 0x140036d3e
mov rcx, qword [rbx + 0x268]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov qword [rbx + 0x268], rbp
cmp dword [0x14013f870], 0
je 0x140036960
mov rcx, rbx
call fcn.140060580
mov rcx, qword [rbx + 0xbe0]
test rcx, rcx
je 0x1400369a9
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
xor eax, eax
mov r12, qword [rsp + 0x450]
mov rdi, qword [rsp + 0x458]
mov rsi, qword [rsp + 0x480]
mov r14, qword [rsp + 0x440]
mov rbp, qword [rsp + 0x478]
add rsp, 0x460
pop rbx
ret
mov rcx, qword [0x140140478]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
inc dword [rbx + 0x284]
xor r9d, r9d
xor r8d, r8d
mov dl, 0x68
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call fcn.1400430e0
test eax, eax
je 0x140036d3e
xor r9d, r9d
xor r8d, r8d
mov dl, 0x68
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call fcn.1400430e0
test eax, eax
je 0x140036d3e
mov rcx, qword [rbx + 0x6d0]
mov rax, qword [rbx + 0x660]
xor r9d, r9d
mov qword [rcx + 0x10], rax
mov rdx, qword [rbx + 0x658]
xor r8d, r8d
mov rcx, rbx
mov qword [rsp + 0x20], rbp
call fcn.14004e4c0
test rax, rax
je 0x140036d3e
mov rdx, qword [rbx + 0x658]
mov rcx, rbx
call fcn.14004e870
test rax, rax
je 0x140036d3e
lea rdx, str.ErrorLevel
mov r9d, 3
xor r8d, r8d
mov rcx, rbx
call fcn.14004d300
mov rbx, rax
mov qword [0x140140268], rax
test rax, rax
je 0x140036d3e
movzx eax, byte [rax + 0x23]
mov qword [rsp + 0x448], r13
test al, al
jne 0x140036a9f
mov rcx, qword [rbx + 0x10]
lea rdx, [0x140103674]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
jmp 0x140036cd9
lea r13, [0x140103674]
cmp qword [rbx + 8], r13
jne 0x140036ab5
mov r12, qword [rbx + 0x10]
shr r12, 1
jmp 0x140036abb
mov r12d, 1
lea rcx, [r12 + 1]
lea rsi, [rcx + rcx]
cmp al, 2
jne 0x140036ad8
mov rdx, r12
mov rcx, r13
call fcn.140006bc0
jmp 0x140036cd9
mov r9, qword [0x14013b0d0]
cmp rsi, r9
jbe 0x140036b05
cmp rsi, qword [rbx + 0x18]
jbe 0x140036b05
lea rdx, [0x140124720]
lea rcx, [0x140143150]
mov r8, r14
call fcn.14005f7b0
jmp 0x140036cd9
cmp rcx, 2
jae 0x140036b1f
xor r8d, r8d
mov rcx, rbx
lea edx, [r8 + 3]
call fcn.1400e74d0
jmp 0x140036cd9
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x140036b3c
mov rcx, qword [rbx]
and al, 0x3d
mov byte [rbx + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov r9, qword [0x14013b0d0]
mov rcx, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rsi, rcx
jbe 0x140036cb3
movzx r8d, byte [rbx + 0x20]
movzx eax, r8b
cmp r8b, 1
jbe 0x140036b75
cmp al, 2
je 0x140036bb2
mov rdi, qword [rsp + 0x470]
mov rax, qword [rsp + 0x470]
jmp 0x140036ca7
mov edi, 0x80
cmp rsi, rdi
ja 0x140036bb2
cmp rsi, 8
ja 0x140036b8c
mov edi, 8
jmp 0x140036b98
mov eax, reloc.WSOCK32.dll_recv
cmp rsi, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400dd290
test rax, rax
je 0x140036cd9
mov byte [rbx + 0x20], 1
jmp 0x140036ca7
cmp rsi, 0x20
jae 0x140036bc2
mov edi, SafeArrayAllocDescriptor
jmp 0x140036c6c
mov edi, 0x208
cmp rsi, rdi
jb 0x140036c6c
cmp rsi, 0x50000
jae 0x140036c28
pxor xmm0, xmm0
cvtsi2sd xmm0, rsi
test rsi, rsi
jns 0x140036bef
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor eax, eax
comisd xmm0, xmm1
jbe 0x140036c1e
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x140036c1e
movabs rdx, 0x8000000000000000
mov rax, rdx
cvttsd2si rdi, xmm0
add rdi, rax
jmp 0x140036c6c
cmp rsi, 0x320000
jae 0x140036c3a
lea rdi, [rsi + 0x8000]
jmp 0x140036c6c
cmp rsi, 0xc80000
jae 0x140036c65
movabs rax, 0x47ae147ae147ae15
mov rdi, rsi
mul rsi
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rsi
jmp 0x140036c6c
lea rdi, [rsi + 0x20000]
cmp rdi, r9
cmova rdi, r9
cmp r8b, 2
jne 0x140036c8d
test rcx, rcx
je 0x140036c8d
mov rcx, qword [rbx + 8]
mov sil, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x140036c90
xor sil, sil
test rdi, rdi
js 0x140036d05
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x140036d05
mov byte [rbx + 0x20], 2
and byte [rbx + 0x21], 0x7f
mov qword [rbx + 8], rax
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx + 8]
cmp rcx, r13
je 0x140036cc9
lea r8, [r12 + r12]
mov rdx, r13
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rbx + 8]
lea rcx, [r12 + r12]
mov word [rcx + rax], bp
mov qword [rbx + 0x10], rcx
lea rcx, [rsp + 0x470]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [rsp + 0x470]
call fcn.14002f2f0
mov r13, qword [rsp + 0x448]
mov eax, 1
jmp 0x140036978
test sil, sil
je 0x140036d1b
lea rax, [0x140141fa8]
mov qword [rbx + 0x18], rbp
mov qword [rbx + 8], rax
jmp 0x140036d22
mov rax, qword [rbx + 8]
mov word [rax], bp
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov r8, r14
mov qword [rbx + 0x10], rbp
call fcn.14005f7b0
jmp 0x140036cd9
or eax, 0xffffffff
jmp 0x140036978
or eax, 0xffffffff
jmp 0x140036990
or eax, 0xffffffff
add rsp, 0x460
pop rbx
ret