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

Disassembly:
push rbx
push rsi
push rdi
mov eax, 0x10060
call fcn.1400daca0
sub rsp, rax
mov word [rcx + 0x78c], 0
mov rsi, rdx
lea rdi, [rcx + 0x750]
mov rbx, rcx
test rdx, rdx
jne 0x14004700f
mov rsi, qword [rdi]
cmp dword [rcx + 0x788], 0
mov qword [rsp + 0x10088], rbp
mov qword [rsp + 0x10090], r14
mov qword [rsp + 0x10098], r15
jne 0x140047141
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140047141
cmp byte [0x140127cbf], 0
jne 0x140047090
lea r9, str.Script_file_not_found.
mov qword [rsp + 0x20], rsi
lea r8, str._s_n_s
mov edx, 0x8018
lea rcx, [rsp + 0x30]
call fcn.14009d690
xor edi, edi
lea rcx, [rsp + 0x30]
xorps xmm3, xmm3
mov qword [rsp + 0x20], rdi
xor r8d, r8d
lea edx, [rdi + 0x10]
call fcn.1400a44b0
jmp 0x1400472af
mov rcx, qword [rbx + 0x6b0]
lea rdx, str.Script_file_not_found.
mov qword [0x140125ef8], rdi
test rcx, rcx
je 0x1400470f7
cmp byte [0x140127cbc], 0
lea r8, [0x1400fcb50]
je 0x1400470da
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x28], rdi
mov qword [rsp + 0x20], rcx
lea rcx, [0x140127530]
call fcn.14000f6a0
jmp 0x1400472af
mov eax, dword [rcx + 4]
movzx r9d, word [rcx + 2]
lea rcx, [0x140127530]
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x1400472af
cmp byte [0x140127cbc], 0
mov rcx, rbx
jne 0x140047126
mov eax, dword [rbx + 0x2d4]
lea r8, [0x1400fcb50]
movzx r9d, word [rbx + 0x2d0]
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x1400472af
xor edi, edi
lea r9, [0x1400fcb50]
mov qword [rsp + 0x28], rdi
xor r8d, r8d
mov qword [rsp + 0x20], rdi
jmp 0x1400472aa
cmp dword [rbx + 0x788], 2
lea rax, [0x140100cac]
mov r14d, dword [0x140125ee4]
lea rdx, [rsp + 0x10080]
cmove rsi, rax
mov rcx, rbx
xor edi, edi
mov r8, rsi
xor r9d, r9d
mov qword [rsp + 0x10080], rdi
mov byte [rsp + 0x20], dil
call fcn.1400477f0
mov rsi, qword [rsp + 0x10080]
mov ebp, eax
cmp eax, 3
jne 0x14004719e
mov r8d, r14d
mov rdx, rsi
mov rcx, rbx
call fcn.140047f80
mov ebp, eax
test rsi, rsi
je 0x1400471b0
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [rax]
test ebp, ebp
je 0x1400472af
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_SetDllDirectoryW]
test eax, eax
jne 0x1400472d7
mov rcx, qword [rbx + 0x6b0]
test rcx, rcx
je 0x140047250
cmp byte [0x140127cbc], dil
lea rdx, str.An_internal_function_call_failed.
je 0x140047209
mov qword [rsp + 0x28], rdi
lea r8, [0x1400fcb50]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
lea rcx, [0x140127530]
call fcn.14000f6a0
jmp 0x1400472af
cmp byte [0x140127cbf], dil
je 0x140047233
mov eax, dword [rcx + 4]
lea r8, [0x1400fcb50]
movzx r9d, word [rcx + 2]
lea rcx, [0x140127530]
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x1400472af
mov qword [rsp + 0x28], rdi
lea r9, [0x1400fcb50]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
lea rcx, [0x140127530]
jmp 0x1400472aa
cmp byte [0x140127cbf], dil
je 0x14004728c
cmp byte [0x140127cbc], dil
jne 0x14004728c
mov eax, dword [rbx + 0x2d4]
lea r8, [0x1400fcb50]
movzx r9d, word [rbx + 0x2d0]
lea rdx, str.An_internal_function_call_failed.
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x1400472af
mov qword [rsp + 0x28], rdi
lea r9, [0x1400fcb50]
mov qword [rsp + 0x20], rdi
lea rdx, str.An_internal_function_call_failed.
xor r8d, r8d
mov rcx, rbx
call fcn.140010690
mov eax, 0xffffffff
mov r15, qword [rsp + 0x10098]
mov r14, qword [rsp + 0x10090]
mov rbp, qword [rsp + 0x10088]
add rsp, 0x10060
pop rdi
pop rsi
pop rbx
ret
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.140057bf0
test eax, eax
je 0x1400472af
lea rdx, [rbx + 0x40]
mov rcx, rbx
call fcn.140057ce0
test eax, eax
je 0x1400472af
lea rdx, [rbx + 0x20]
mov rcx, rbx
call fcn.140057ce0
test eax, eax
je 0x1400472af
mov rcx, rbx
call fcn.140061a70
test eax, eax
je 0x1400472af
mov esi, edi
cmp dword [rbx + 0x48], edi
jle 0x140047340
mov r14, rdi
nop dword [rax]
mov rax, qword [rbx + 0x40]
mov rdx, qword [r14 + rax]
call fcn.140061700
test eax, eax
je 0x1400472af
inc esi
add r14, 8
cmp esi, dword [rbx + 0x48]
jl 0x140047320
mov esi, edi
cmp dword [rbx + 0x28], edi
jle 0x140047370
mov r14, rdi
nop word [rax + rax]
mov rax, qword [rbx + 0x20]
mov rdx, qword [r14 + rax]
call fcn.140061700
test eax, eax
je 0x1400472af
inc esi
add r14, 8
cmp esi, dword [rbx + 0x28]
jl 0x140047350
mov rcx, qword [rbx + 0x40]
call fcn.1400c1574
mov rcx, qword [rbx + 0x2b8]
test rcx, rcx
je 0x140047464
mov rax, qword [rcx + 0x18]
cmp dword [rax + 4], edi
je 0x140047457
mov r8, qword [rax + 8]
mov rsi, qword [rax + 0x18]
test r8, r8
je 0x140047457
lea rdx, str.Line
mov rcx, r8
call fcn.140005550
lea rcx, [0x1400fcb50]
test rax, rax
je 0x1400473f2
mov edx, dword [rax + 8]
test edx, edx
je 0x1400473d8
cmp edx, 6
je 0x1400473d3
mov rdx, qword [rax]
jmp 0x1400473df
mov rdx, rcx
jmp 0x1400473df
mov rdx, qword [rax]
add rdx, 0x10
mov rax, rdx
mov dword [rbx + 0x2d4], edx
sar rax, 0x20
mov dword [rbx + 0x2d0], eax
test rsi, rsi
mov qword [rbx + 0x6b0], rdi
cmovne rcx, rsi
cmp byte [0x140127cbf], dil
je 0x14004743b
cmp byte [0x140127cbc], dil
jne 0x14004743b
mov eax, dword [rbx + 0x2d4]
lea rdx, str.Unknown_class.
movzx r9d, word [rbx + 0x2d0]
mov r8, rcx
mov rcx, rbx
mov dword [rsp + 0x20], eax
call fcn.14000f540
jmp 0x1400472af
mov qword [rsp + 0x28], rdi
lea rdx, str.Unknown_class.
mov qword [rsp + 0x20], rdi
mov r9, rcx
xor r8d, r8d
jmp 0x1400472a7
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov qword [rbx + 0x2b8], rdi
mov rcx, qword [rbx + 0x758]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov rdx, qword [rbx + 0x758]
lea rcx, vtable.CKuStringT_wchar_t__class_CKuStringUtilW_.0
call fcn.140062bf0
xor r9d, r9d
mov byte [rsp + 0x28], dil
xor r8d, r8d
mov qword [rsp + 0x20], rdi
mov dl, 7
mov rcx, rbx
call fcn.140050c30
test eax, eax
je 0x1400472af
mov rdx, qword [rbx]
mov rcx, rbx
call fcn.140057d60
test rax, rax
je 0x1400472af
cmp byte [rbx + 0x794], dil
sete dil
mov eax, edi
jmp 0x1400472b4