Function at 0x140038cc0
Capabilities:
Check if file exists
Encode data using xor
Generate random numbers using a mersenne twister
Get file attributes
Set current directory

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rbp
push rsi
push rdi
push r12
push r14
push r15
mov eax, 0x10060
call fcn.1400ed080
sub rsp, rax
mov rdi, rcx
mov byte [rcx + 0x290], 1
mov word [rcx + 0xbe0], 0
mov rcx, qword [rcx + 0xbb0]
test rcx, rcx
je 0x140039407
cmp word [rcx], 0
je 0x140039407
cmp byte [0x140127b73], 0
jne 0x140038d68
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x140038d68
cmp qword [0x140127b10], 0
jne 0x140038d68
mov r9, qword [rdi + 0xbb0]
lea r8, str.Script_file_not_found:_n_s
mov edx, 0x8018
lea rcx, [rsp + 0x30]
call fcn.1400ce4e0
xor ebp, ebp
lea rcx, [rsp + 0x30]
xorps xmm3, xmm3
mov qword [rsp + 0x20], rbp
xor r8d, r8d
lea edx, [rbp + 0x10]
call fcn.1400d5ab0
xor eax, eax
jmp 0x14003940c
xor ebp, ebp
cmp qword [0x140129f28], rbp
jne 0x140038d88
call fcn.1400cad50
mov qword [0x140129f28], rax
test rax, rax
je 0x140039400
mov rdx, qword [0x140129f20]
cmp qword [rdx + 0x10], 0x28
jae 0x140038daf
call fcn.1400cad50
mov rdx, qword [0x140129f20]
mov qword [rdx + 0x18], rax
test rax, rax
je 0x140039400
mov rcx, qword [rdx + 8]
add qword [rdx + 0x10], 0xffffffffffffffd8
mov qword [0x140129f18], rcx
lea rax, [rcx + 0x28]
mov qword [rdx + 8], rax
test rcx, rcx
je 0x140039400
cmp byte [0x140127b73], bpl
lea rax, vtable.Label.0
lea r12, [0x1400ef7d4]
mov qword [rcx], rax
mov qword [rcx + 8], r12
lea rdx, [0x1401094f4]
mov qword [rcx + 0x10], rbp
mov qword [rcx + 0x18], rbp
mov qword [rcx + 0x20], rbp
mov qword [rdi + 0x6d8], rcx
jne 0x140038e0f
mov rdx, qword [rdi + 0xbb0]
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call fcn.140039db0
cmp eax, 1
jne 0x140039407
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov dl, 0x68
mov rcx, rdi
call fcn.140043670
test eax, eax
je 0x140039407
mov rax, qword [rdi + 0x668]
mov rcx, rdi
mov qword [rax + 0x10], 1
mov rdx, qword [rdi + 0x660]
call fcn.14004fbc0
test eax, eax
je 0x140039407
mov rdx, qword [rdi + 0x660]
mov rcx, rdi
call fcn.14004fcf0
cmp qword [rdi + 0x670], rbp
je 0x140038eb3
mov rax, qword [rdi + 0x660]
mov rcx, qword [rdi + 0x678]
mov qword [rcx + 0x20], rax
mov rcx, qword [rdi + 0x660]
mov rax, qword [rdi + 0x678]
mov qword [rcx + 0x18], rax
mov rax, qword [rdi + 0x670]
mov qword [rdi + 0x660], rax
mov esi, ebp
cmp dword [rdi + 0x698], ebp
jle 0x140038f31
mov r14, rbp
mov rax, qword [rdi + 0x690]
mov rbx, qword [r14 + rax]
cmp byte [rbx + 0x79], bpl
jne 0x140038f23
test byte [rbx + 0x78], 4
jne 0x140038f23
mov r8, qword [rbx + 0x38]
lea r9, [rbx + 0x5c]
mov rdx, rbx
mov rcx, rdi
call fcn.140060a40
mov r8, qword [rbx + 0x48]
lea r9, [rbx + 0x68]
mov rdx, rbx
mov rcx, rdi
call fcn.140060a40
mov r8, qword [rbx + 0x40]
lea r9, [rbx + 0x64]
mov rdx, rbx
mov rcx, rdi
call fcn.140060a40
mov r8, qword [rbx + 0x50]
lea r9, [rbx + 0x70]
mov rdx, rbx
mov rcx, rdi
call fcn.140060a40
inc esi
add r14, 8
cmp esi, dword [rdi + 0x698]
jl 0x140038ec0
cmp qword [rdi + 0x270], rbp
je 0x140038f5e
mov rcx, rdi
call fcn.14004b620
test eax, eax
je 0x140039407
mov rcx, qword [rdi + 0x270]
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov qword [rdi + 0x270], rbp
cmp dword [0x1401288b0], ebp
je 0x140038f6e
mov rcx, rdi
call fcn.140060be0
mov rcx, qword [rdi + 0xbe8]
test rcx, rcx
je 0x140038f8b
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
xor eax, eax
jmp 0x14003940c
mov rcx, qword [0x140127ab0]
call qword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
inc dword [rdi + 0x28c]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rbp
mov dl, 0x68
mov rcx, rdi
call fcn.140043670
test eax, eax
je 0x140039407
xor r9d, r9d
mov qword [rsp + 0x20], rbp
xor r8d, r8d
mov dl, 0x68
mov rcx, rdi
call fcn.140043670
test eax, eax
je 0x140039407
mov rax, qword [rdi + 0x668]
mov rcx, qword [rax + 0x18]
mov qword [rcx + 0x10], 1
mov rax, qword [rdi + 0x668]
mov qword [rax + 0x10], 1
mov rcx, qword [rdi + 0x6d8]
mov rax, qword [rdi + 0x668]
mov qword [rcx + 0x10], rax
mov rbx, qword [rdi + 0x660]
test rbx, rbx
je 0x1400391e3
lea r15, [0x140000000]
movzx ecx, byte [rbx]
mov qword [rbx + 0x30], rbp
lea eax, [rcx - 9]
cmp al, 0x17
jbe 0x14003913b
lea eax, [rcx - 0x69]
cmp al, 2
jbe 0x14003913b
cmp cl, 0x71
je 0x14003913b
cmp cl, 0x75
jne 0x1400390e4
movzx eax, byte [rbx + 1]
mov r14, rbx
mov rsi, qword [rbx + 0x20]
mov qword [rbx + 0x10], rax
mov byte [rbx + 1], bpl
cmp byte [rsi], 0x77
jne 0x140039266
mov qword [rsi + 0x30], rbx
mov rbx, qword [rsi + 0x20]
movzx eax, byte [rbx]
cmp al, 0x76
jne 0x1400390cc
nop dword [rax]
movzx eax, byte [rbx + 1]
mov r9, rsi
mov rdx, qword [rbx + 0x20]
mov r8d, 2
mov rcx, rdi
mov qword [rbx + 0x10], rax
mov byte [rbx + 1], bpl
mov qword [rbx + 0x30], rsi
mov qword [rsp + 0x20], rbp
call fcn.14004fd80
test rax, rax
je 0x140039407
mov qword [rbx + 0x28], rax
mov rbx, rax
cmp byte [rax], 0x76
je 0x140039080
mov rbx, qword [rax + 0x20]
mov qword [r14 + 0x28], rbx
jmp 0x1400391da
cmp al, 0x78
jne 0x14003924c
mov rax, rbx
mov rbx, qword [rbx + 0x20]
mov qword [r14 + 0x28], rbx
jmp 0x1400391da
lea eax, [rcx - 0x21]
cmp eax, 0x57
ja case.0x140039102.41
cdqe
movzx eax, byte [r15 + rax + 0x3944c]
mov ecx, dword [r15 + rax*4 + 0x39428]
add rcx, r15
jmp rcx
mov rdx, qword [rbx + 0x20]
mov r9, rbx
mov r8d, 2
mov qword [rsp + 0x20], rbp
mov rcx, rdi
call fcn.14004fd80
test rax, rax
je 0x140039407
mov rcx, qword [rax + 0x20]
mov qword [rbx + 0x28], rcx
mov rbx, rax
mov rbx, qword [rbx + 0x20]
jmp 0x1400391da
cmp cl, 0x6a
jne 0x140039143
dec byte [rbx + 1]
mov rax, qword [rbx + 0x10]
mov r9, rbx
mov rdx, qword [rbx + 0x20]
mov qword [rsp + 0x20], rax
mov r8d, 3
mov rcx, rdi
call fcn.14004fd80
mov rdx, rax
test rax, rax
je 0x140039407
mov qword [rbx + 0x28], rax
movzx r8d, byte [rax]
mov ecx, r8d
sub ecx, 0x21
je 0x1400391b2
sub ecx, 0x51
je 0x140039190
cmp ecx, 1
jne 0x140039195
movzx eax, byte [rbx]
sub al, 0x71
cmp al, cl
jmp 0x1400391b9
cmp byte [rbx], 0x71
je 0x1400391bb
cmp r8b, 0x6c
jne 0x1400391d7
movzx eax, byte [rbx]
sub al, 0x69
cmp al, 1
ja 0x1400391d7
mov rax, qword [rbx + 0x30]
mov rbx, qword [rdx + 0x20]
mov qword [rdx + 0x30], rax
jmp 0x1400391da
movzx eax, byte [rbx]
sub al, 9
cmp al, 0x17
ja 0x140039195
mov rax, qword [rbx + 0x30]
mov r9, rdx
mov qword [rdx + 0x30], rax
mov rbx, rdx
mov rdx, qword [rdx + 0x20]
mov qword [rsp + 0x20], rbp
jmp 0x140039153
mov rbx, rdx
test rbx, rbx
jne 0x140039023
cmp qword [rdi + 0x668], rbp
je 0x140039407
mov rdx, qword [rdi + 0x660]
mov rcx, rdi
call fcn.140050180
test rax, rax
je 0x140039407
lea rax, [rsp + 0x10090]
xor r8d, r8d
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x10098]
lea rdx, str.ErrorLevel
mov dword [rsp + 0x20], 3
mov rcx, rdi
call fcn.14004ecb0
test rax, rax
je 0x140039336
mov qword [0x140127a38], rax
jmp 0x140039372
mov r9, r12
lea rdx, str.Expected_Case_Default
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, [0x140109798]
xor r8d, r8d
mov rcx, r14
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, [0x14010cbc8]
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.Break_Continue_must_be_enclosed_by_a_Loop.
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.Case_Default_must_be_enclosed_by_a_Switch.
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.ELSE_with_no_matching_IF
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.UNTIL_with_no_matching_LOOP
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.CATCH_with_no_matching_TRY
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
mov r9, r12
lea rdx, str.FINALLY_with_no_matching_TRY_or_CATCH
xor r8d, r8d
mov rcx, rbx
call fcn.14005f950
jmp 0x140039407
cmp byte [rsp + 0x10090], bpl
lea rdx, str.ErrorLevel
mov r9d, dword [rsp + 0x10098]
mov rcx, rdi
setne bpl
xor r8d, r8d
inc ebp
mov dword [rsp + 0x20], ebp
call fcn.14004f1f0
mov qword [0x140127a38], rax
test rax, rax
je 0x140039407
xor r9d, r9d
mov byte [rsp + 0x20], 1
lea rdx, [0x1400ef8b4]
mov rcx, rax
lea r8, [r9 - 1]
call fcn.1400d3520
lea rcx, [rsp + 0x10090]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [rsp + 0x10090]
lea r8, [0x14012bf44]
mov dword [0x14012bf40], eax
mov edx, 1
nop dword [rax]
nop dword [rax + rax]
mov ecx, dword [r8 - 4]
lea r8, [r8 + 4]
shr ecx, 0x1e
xor ecx, dword [r8 - 8]
imul eax, ecx, 0x6c078965
add eax, edx
inc edx
mov dword [r8 - 4], eax
cmp edx, 0x270
jl 0x1400393c0
mov dword [0x140126a28], 1
mov eax, 1
mov dword [0x14012bf38], 1
jmp 0x14003940c
mov qword [rdi + 0x6d8], rbp
mov eax, 0xffffffff
lea r11, [rsp + 0x10060]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret