Function at 0x140002f80
Capabilities:
Read file on windows

Disassembly:
mov dword [rsp + 0x18], r8d
mov dword [rsp + 0x10], edx
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x1f]
sub rsp, 0xa8
mov rdi, rcx
mov dword [rbp - 0x19], 1
lea rcx, [0x140030478]
mov dword [rbp - 0x15], 1
mov r12d, edx
mov dword [rbp - 0x21], 0x3b
call fcn.140012d24
mov r9, qword [rdi + 0x90]
xor esi, esi
mov dword [rbp - 0x1d], esi
mov r13d, 1
mov dword [rbp - 0x2d], r13d
mov ebx, esi
mov dword [rbp - 0x39], ebx
mov r15, rax
mov dword [rbp - 0x3d], r13d
mov r14d, esi
test r9, r9
je 0x1400036f4
mov qword [rbp - 0x49], r9
movzx esi, word [r9]
cmp si, 0x22
jne 0x14001dba4
add r9, 2
mov qword [rbp - 0x49], r9
mov rax, r9
test rax, rax
je 0x1400036f2
movzx eax, word [r9]
test ax, ax
je 0x1400031b1
cmp ax, 0x20
jbe 0x14000367d
cmp word [r9], si
je 0x1400031b1
mov r8d, 8
lea rdx, str.usebackq
mov rcx, r9
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x1400039c5
mov rcx, qword [rbp - 0x49]
lea rdx, str.useback
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001dbb8
mov rcx, qword [rbp - 0x49]
lea rdx, str.eol
mov r8d, 4
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14000399a
mov rcx, qword [rbp - 0x49]
lea rdx, str.delims
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x1400035d4
mov rcx, qword [rbp - 0x49]
lea rdx, str.skip
mov r8d, 5
call qword [sym.imp.msvcrt.dll__wcsnicmp]
mov rcx, qword [rbp - 0x49]
test eax, eax
je 0x140003a07
mov r8d, 7
lea rdx, str.tokens
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x14001dbcf
mov r9, qword [rbp - 0x49]
xor eax, eax
add r9, 0xe
mov dword [rbp - 0x3d], eax
mov qword [rbp - 0x49], r9
mov edi, eax
movzx eax, word [r9]
test ax, ax
je 0x14000319d
cmp ax, si
je 0x14000319d
cmp ax, 0x2a
je 0x1400039b3
xor r8d, r8d
lea rdx, [rbp - 0x49]
mov rcx, r9
call qword [sym.imp.msvcrt.dll_wcstol]
mov ebx, eax
test eax, eax
jle 0x14001dbcf
mov r9, qword [rbp - 0x49]
cmp word [r9], 0x2d
je 0x1400036c7
mov edx, eax
cmp edx, 0x20
jge 0x140003185
cmp ebx, edx
jg 0x140003185
mov r12d, dword [rbp - 0x3d]
mov eax, edx
sub eax, ebx
inc edi
add edi, eax
lea ecx, [rbx - 1]
mov eax, 1
shl eax, cl
inc ebx
or r12d, eax
cmp ebx, edx
jle 0x14000316a
mov dword [rbp - 0x3d], r12d
mov r12d, dword [rbp + 0x6f]
movzx eax, word [r9]
cmp ax, 0x2c
je 0x140003697
cmp ax, 0x2a
je 0x14000369f
cmp edi, r13d
jle 0x140003647
mov r13d, edi
mov dword [rbp - 0x2d], edi
jmp 0x140003647
cmp r13d, 1
jle 0x1400036eb
mov rcx, qword [0x140039888]
lea eax, [r12 + 1]
add eax, r13d
movsxd rbx, eax
lea rdx, [rbx + rbx]
call fcn.14000f2e0
mov rcx, qword [0x140039880]
lea rdx, [rbx*8]
mov qword [0x140039888], rax
call fcn.14000f2e0
mov rdx, qword [0x140039888]
mov r9, rax
mov qword [0x140039880], rax
test rdx, rdx
je 0x14001dbec
test rax, rax
je 0x14001dbec
mov rdi, qword [rbp + 0x67]
mov r8d, 1
xor esi, esi
cmp r13d, r8d
jle 0x140003257
lea eax, [r12 + 1]
cdqe
lea rcx, [r9 + rax*8]
lea r9, [rdx + rax*2]
movzx eax, word [rdi + 0x88]
lea rcx, [rcx + 8]
add ax, r8w
inc r8d
mov word [r9], ax
lea r9, [r9 + 2]
mov qword [rcx - 8], rsi
cmp r8d, r13d
jl 0x140003234
mov ebx, dword [rbp - 0x39]
lea eax, [r8 + r12]
movsxd rcx, eax
mov word [rdx + rcx*2], si
mov r13, qword [rdi + 0x78]
test r14d, r14d
mov ecx, 0x27
mov qword [rbp - 0x29], r13
mov r9d, ecx
mov r10d, 0x60
cmove r10w, cx
mov eax, 0x22
cmove r9w, ax
mov dword [rbp - 0x31], r10d
mov dword [rbp - 0x35], r9d
test r13, r13
je 0x1400038a7
movzx eax, word [r13]
movzx r8d, ax
cmp ax, r10w
je 0x1400032b7
cmp ax, r9w
jne 0x1400038a7
mov dword [rbp + 0x77], esi
test r8w, r8w
je 0x14000357f
cmp byte [0x140039890], 0
mov r8d, 0xa
jne 0x14000357b
call fcn.140003ed0
cmp dword [0x140039834], 0
jne 0x14001dbfe
mov qword [rbp - 0x49], rsi
or r12, 0xffffffffffffffff
mov qword [rbp + 7], rsi
mov esi, ebx
mov dword [rbp + 0x7f], ebx
nop word [rax + rax]
inc r12
cmp word [r13 + r12*2], 0
jne 0x140003300
movzx edx, word [r13]
mov qword [rbp - 9], r12
cmp dx, r10w
je 0x140003700
cmp dx, r9w
jne 0x1400038d3
cmp r12d, 1
jle 0x1400038d3
lea eax, [r12 - 1]
movsxd rcx, eax
cmp word [r13 + rcx*2], r9w
jne 0x1400038d3
sub r12d, 2
mov word [r13 + rcx*2], r8w
add r13, 2
movsxd rax, r12d
mov qword [rbp - 0x29], r13
mov qword [rbp - 9], r12
mov qword [rbp - 0x49], r13
lea rdi, [rax*2 + 2]
add rdi, r13
mov qword [rbp - 0x11], rdi
xor r14d, r14d
cmp qword [rbp - 0x49], rdi
jae 0x140003549
mov r12d, dword [rbp - 0x2d]
mov r13d, dword [rbp + 0x77]
cmp byte [0x140039890], 0
jne 0x14000353d
cmp dword [0x140039834], 0
jne 0x14001dc4c
mov rbx, qword [rbp - 0x49]
mov edx, r8d
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_wcschr]
mov qword [rbp - 0x49], rax
test rax, rax
je 0x14000353d
cmp rax, rbx
jbe 0x1400033d4
cmp word [rax - 2], 0xd
jne 0x1400033d4
mov word [rax - 2], r14w
mov rax, qword [rbp - 0x49]
mov word [rax], r14w
add qword [rbp - 0x49], 2
test esi, esi
jne 0x1400039fd
cmp r12d, 1
jg 0x140003655
xor eax, eax
mov esi, r14d
mov qword [rbp - 1], rax
movzx eax, word [rbx]
test ax, ax
je 0x1400036b5
mov ecx, 1
mov dword [rbp + 0x77], ecx
movzx edx, ax
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x1400035be
mov ecx, dword [rbp + 0x77]
test esi, esi
je 0x1400034c9
mov eax, dword [rbp - 0x1d]
mov rdi, rbx
test eax, eax
jne 0x1400034d7
movzx eax, word [rbx]
test ax, ax
je 0x1400034f5
nop word [rax + rax]
movzx edx, ax
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x14000346e
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140003450
cmp rdi, rbx
je 0x1400034a7
cmp esi, 0x20
jge 0x1400034a7
mov ecx, dword [rbp - 0x3d]
mov eax, esi
inc esi
bt ecx, eax
jae 0x1400034a7
mov rdx, qword [rbp - 1]
inc r14d
movsxd rcx, dword [rbp + 0x6f]
mov rax, qword [0x140039880]
add rcx, rdx
inc dword [rbp + 0x77]
inc rdx
mov qword [rbp - 1], rdx
mov qword [rax + rcx*8], rdi
movzx eax, word [rbx]
mov ecx, dword [rbp + 0x77]
test ax, ax
je 0x1400034f5
xor eax, eax
mov word [rbx], ax
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x14000340c
jmp 0x1400034f5
mov eax, dword [rbp - 0x21]
cmp word [rbx], ax
jne 0x14000342c
jmp 0x1400034f5
cmp ecx, eax
jne 0x14000343a
movsxd r8, dword [rbp + 0x6f]
add r8, qword [rbp - 1]
mov rax, qword [0x140039880]
inc r14d
mov qword [rax + r8*8], rbx
test r14d, r14d
je 0x1400036b1
mov rax, qword [rbp + 0x67]
mov edx, dword [rbp - 0x19]
mov rcx, qword [rax + 0x80]
call fcn.140003aa0
mov ecx, r13d
mov dword [rbp - 0x15], eax
call fcn.140003a7c
mov rdi, qword [rbp - 0x11]
xor r14d, r14d
mov dword [rbp - 0x19], r14d
mov r13d, eax
mov esi, dword [rbp + 0x7f]
mov r8d, 0xa
cmp qword [rbp - 0x49], rdi
jb 0x140003388
mov r12, qword [rbp - 9]
mov dword [rbp + 0x77], r13d
mov r13, qword [rbp - 0x29]
mov rcx, qword [rbp + 7]
test rcx, rcx
jne 0x1400036bd
mov rdx, qword [0x140039888]
lea eax, [r12 + 1]
movsxd rcx, eax
xor esi, esi
lea r13, [r13 + rcx*2]
mov qword [rbp - 0x29], r13
cmp word [r13], si
jne 0x14001dc5c
mov r12d, dword [rbp + 0x6f]
cmp dword [rbp - 0x2d], 1
jle 0x1400035a7
test rdx, rdx
je 0x1400035a7
cmp word [rdx], 0
je 0x1400035a7
lea eax, [r12 + 1]
movsxd rcx, eax
mov rax, qword [0x140039880]
mov word [rdx + rcx*2], si
mov qword [rax + rcx*8], rsi
mov eax, dword [rbp - 0x15]
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x14000340c
jmp 0x140003421
mov rdi, qword [rbp - 0x49]
add rdi, 0xe
mov rax, rdi
mov qword [rbp - 0x49], rax
movzx ecx, word [rdi]
test cx, cx
je 0x140003614
mov rdx, rdi
cmp cx, si
je 0x140003614
cmp cx, 0x20
je 0x14000360e
lea rax, [rdx + 2]
mov qword [rbp - 0x49], rax
mov rdx, rax
movzx ecx, word [rax]
test cx, cx
jne 0x1400035ee
jmp 0x140003614
cmp word [rax + 2], si
je 0x1400035f9
movzx ebx, word [rax]
xor ecx, ecx
mov word [rax], cx
mov rcx, r15
call fcn.14000f250
mov rcx, rdi
call fcn.140012d24
mov r15, rax
mov rax, qword [rbp - 0x49]
mov word [rax], bx
mov r9, qword [rbp - 0x49]
test bx, bx
je 0x140003647
add r9, 2
mov qword [rbp - 0x49], r9
test r9, r9
jne 0x140003021
jmp 0x1400031b1
mov eax, dword [rbp + 0x6f]
lea r8d, [r12 - 1]
inc eax
shl r8, 3
movsxd rcx, eax
xor edx, edx
mov rax, qword [0x140039880]
lea rcx, [rax + rcx*8]
call sub.msvcrt.dll_memset
jmp 0x1400033ef
add r9, 2
mov qword [rbp - 0x49], r9
movzx eax, word [r9]
test ax, ax
jne 0x14000302e
jmp 0x140003038
add r9, 2
mov qword [rbp - 0x49], r9
movzx eax, word [r9]
test ax, ax
jne 0x14000311b
jmp 0x14000319d
mov rdi, qword [rbp - 0x11]
xor r14d, r14d
jmp 0x14000352a
call fcn.14000f250
jmp 0x140003556
lea rcx, [r9 + 2]
xor r8d, r8d
lea rdx, [rbp - 0x49]
call qword [sym.imp.msvcrt.dll_wcstol]
mov edx, eax
test eax, eax
jle 0x14001dbcf
mov r9, qword [rbp - 0x49]
jmp 0x140003155
mov rdi, qword [rbp + 0x67]
mov ebx, dword [rbp - 0x39]
xor esi, esi
mov rdx, qword [0x140039888]
jmp 0x140003265
cmp r12d, 1
jle 0x14000331f
lea eax, [r12 - 1]
movsxd rcx, eax
cmp word [r13 + rcx*2], r10w
jne 0x14000331f
add r13, 2
lea rdx, [0x140030674]
sub r12d, 2
mov qword [rbp - 0x29], r13
movsxd rax, r12d
xor ebx, ebx
mov rcx, r13
mov qword [rbp - 9], r12
mov word [r13 + rax*2], bx
call qword [sym.imp.msvcrt.dll__wpopen]
mov r14, rax
test rax, rax
je 0x14001dcd3
mov rcx, rax
mov esi, ebx
mov edi, ebx
call qword [sym.imp.msvcrt.dll_feof]
test eax, eax
jne 0x1400037dc
mov rcx, r14
call qword [sym.imp.msvcrt.dll_ferror]
test eax, eax
jne 0x1400037dc
mov rax, rsi
sub rax, rdi
cmp rax, 0x200
jae 0x1400037a8
add rsi, 0x100
test rbx, rbx
je 0x14000389b
mov rdx, rsi
mov rcx, rbx
call fcn.14000c780
mov rbx, rax
test rax, rax
je 0x14001dca4
mov edx, esi
mov byte [rbx + rdi], 0
lea rcx, [rbx + rdi]
sub edx, edi
mov r8, r14
call qword [sym.imp.msvcrt.dll_fgets]
test rax, rax
je 0x1400037dc
or rdi, 0xffffffffffffffff
inc rdi
cmp byte [rbx + rdi], 0
jne 0x1400037c6
mov rcx, r14
call qword [sym.imp.msvcrt.dll_feof]
test eax, eax
je 0x140003766
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
lea rdx, [rdi*2 + 4]
mov rcx, rbx
call fcn.14000c780
cmp qword [0x140039888], 0
mov r14, rax
mov qword [rbp + 7], rax
je 0x14001dcb7
cmp qword [0x140039880], 0
je 0x14001dcb7
test rax, rax
je 0x14001dcb7
lea rcx, [rax + rdi]
mov r8, rdi
mov rdx, rax
call qword [sym.imp.msvcrt.dll_memmove]
mov dword [rbp - 0x41], edi
mov ecx, dword [0x14003fbc4]
call fcn.14000f9f4
test eax, eax
je 0x14001dc43
mov edx, 1
mov r8d, edi
mov r9d, edi
add r8, r14
mov dword [rsp + 0x28], edi
mov qword [rsp + 0x20], r14
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
mov eax, eax
mov qword [rbp - 0x49], r14
lea rdi, [r14 + rax*2]
mov qword [rbp - 0x11], rdi
cmp rdi, r14
je 0x1400039dc
cmp word [rdi - 2], 0xa
jne 0x1400039dc
mov esi, dword [rbp + 0x7f]
xor r14d, r14d
mov word [rdi], r14w
mov r8d, 0xa
jmp 0x140003376
mov ecx, esi
call fcn.14000fe10
jmp 0x14000379c
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.14000d920
mov rdx, qword [0x140039888]
mov r13, rax
mov r9d, dword [rbp - 0x35]
mov r10d, dword [rbp - 0x31]
movzx r8d, word [rax]
mov qword [rbp - 0x29], rax
jmp 0x1400032b7
cmp dx, 0x22
je 0x140003a30
xor eax, eax
xor r9d, r9d
mov qword [rsp + 0x30], rax
mov edx, 0x80000000
mov dword [rsp + 0x28], eax
mov rcx, r13
mov dword [rsp + 0x20], 3
lea r8d, [rax + 5]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x14001dcea
mov r9d, 2
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov edi, eax
mov rcx, rsi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
lea ecx, [rdi*2 + 4]
call fcn.14000fe10
mov qword [rbp + 7], rax
mov r14, rax
mov rcx, rsi
test rax, rax
je 0x14001dcda
lea rdx, [rax + rdi]
mov dword [rbp - 0x41], 0xffffffff
xor eax, eax
lea r9, [rbp - 0x41]
mov r8d, edi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
mov rcx, rsi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test ebx, ebx
je 0x14001dc39
mov eax, dword [rbp - 0x41]
cmp eax, edi
je 0x140003834
jmp 0x140003549
mov r9, qword [rbp - 0x49]
movzx eax, word [r9 + 8]
add r9, 0xa
mov qword [rbp - 0x49], r9
mov dword [rbp - 0x21], eax
jmp 0x140003647
add r9, 2
inc edi
mov qword [rbp - 0x49], r9
mov dword [rbp - 0x1d], edi
jmp 0x14000319d
mov r9, qword [rbp - 0x49]
mov r14d, 1
add r9, 0x10
mov qword [rbp - 0x49], r9
jmp 0x140003647
mov esi, dword [rbp + 0x7f]
mov r8d, 0xa
mov word [rdi], r8w
add rdi, 2
xor r14d, r14d
mov qword [rbp - 0x11], rdi
mov word [rdi], r14w
jmp 0x140003376
dec esi
mov dword [rbp + 0x7f], esi
jmp 0x14000352d
add rcx, 0xa
lea rdx, [rbp - 0x49]
xor r8d, r8d
mov qword [rbp - 0x49], rcx
call qword [sym.imp.msvcrt.dll_wcstol]
mov dword [rbp - 0x39], eax
test eax, eax
jle 0x14001dbcf
mov r9, qword [rbp - 0x49]
jmp 0x140003647
add r13, 2
dec r12d
mov rcx, r13
mov qword [rbp - 0x29], r13
mov qword [rbp - 9], r12
call fcn.140012130
mov qword [rbp - 0x49], rax
cmp word [rax], 0x22
jne 0x1400038dd
xor ecx, ecx
mov word [rax], cx
mov rax, qword [rbp - 0x49]
sub rax, 2
mov qword [rbp - 0x49], rax
cmp rax, r13
jb 0x1400038dd
cmp word [rax], 0x20
jne 0x1400038dd
jmp 0x140003a57
cmp si, 0x27
je 0x14000300d
xor eax, eax
movzx esi, ax
jmp 0x140003015
mov r9, qword [rbp - 0x49]
mov r14d, 1
add r9, 0xe
mov qword [rbp - 0x49], r9
jmp 0x140003647
mov r8, qword [rbp - 0x49]
mov edx, 1
mov ecx, 0x234a
call fcn.140014d90
mov eax, 1
jmp 0x1400035aa
xor edx, edx
mov ecx, 0x2374
call fcn.140014d90
call fcn.14002ae20
int3
cmp qword [0x1400502b0], 0
je 0x14001dc8c
mov edx, 0x237b
xor ecx, ecx
lea r8d, [rdx - 0x53]
call fcn.14002b314
cmp eax, 1
je 0x14001dc6c
call fcn.14000aa60
mov r9d, dword [rbp - 0x35]
mov r8d, 0xa
mov r10d, dword [rbp - 0x31]
jmp 0x1400032e9
xor eax, eax
mov dword [rbp - 0x41], eax
jmp 0x14000398d
xor eax, eax
mov edx, eax
jmp 0x14000384c
call fcn.14002ae3c
mov r8d, 0xa
jmp 0x1400033a2
mov r9d, dword [rbp - 0x35]
mov r10d, dword [rbp - 0x31]
mov ebx, dword [rbp - 0x39]
jmp 0x1400032c4
mov rbx, qword [0x1400502b0]
test rbx, rbx
je 0x14001dc8c
mov rcx, rbx
call fcn.140007b00
mov rbx, qword [rbx + 0x1d0]
test rbx, rbx
jne 0x14001dc78
call fcn.14002aea0
mov edx, 1
lea rcx, [0x140047c50]
call qword [sym.imp.msvcrt.dll_longjmp]
int3
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
mov eax, 8
jmp 0x1400035aa
mov r8, r13
mov edx, 1
mov ecx, 0x2374
call fcn.140014d90
mov eax, 8
jmp 0x1400035aa
mov ecx, 0x2331
jmp 0x14001dcef
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x1400035aa
mov ecx, 0x2363
mov r8, r13
mov edx, 1
call fcn.140014d90
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop
jmp 0x1400035aa