Function at 0x140009e50
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, 0xb8
mov rdi, rcx
mov dword [rbp - 0x1d], 1
lea rcx, [0x14003443c]
mov dword [rbp - 0x19], 1
mov r12d, edx
mov dword [rbp - 0x29], 0x3b
call fcn.140012534
mov r9, qword [rdi + 0x90]
xor r11d, r11d
mov dword [rbp - 0x25], r11d
mov r13d, 1
mov dword [rbp - 0x3d], r13d
mov ebx, r11d
mov dword [rbp - 0x49], ebx
mov r15, rax
mov dword [rbp - 0x4d], r13d
mov r14d, r11d
test r9, r9
je 0x14000a168
mov qword [rbp - 0x59], r9
movzx esi, word [r9]
cmp si, 0x22
jne 0x14001b958
add r9, 2
mov qword [rbp - 0x59], r9
mov rax, r9
test rax, rax
je 0x14000a168
movzx eax, word [r9]
test ax, ax
je 0x14000a0b2
cmp ax, 0x20
jbe 0x14000a55f
cmp word [r9], si
je 0x14000a0b2
mov r8d, 8
lea rdx, str.usebackq
mov rcx, r9
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14000a983
mov rcx, qword [rbp - 0x59]
lea rdx, str.useback
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14001b96b
mov rcx, qword [rbp - 0x59]
lea rdx, str.eol
mov r8d, 4
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14000a93b
mov rcx, qword [rbp - 0x59]
lea rdx, str.delims
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
je 0x14000a525
mov rcx, qword [rbp - 0x59]
lea rdx, str.skip
mov r8d, 5
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x59]
test eax, eax
je 0x14000a954
mov r8d, 7
lea rdx, str.tokens
call qword [sym.imp.msvcrt.dll__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x14001b982
mov r9, qword [rbp - 0x59]
xor eax, eax
add r9, 0xe
mov dword [rbp - 0x4d], eax
mov qword [rbp - 0x59], r9
mov edi, eax
movzx eax, word [r9]
test ax, ax
je 0x14000a09e
cmp ax, si
je 0x14000a09e
cmp ax, 0x2a
je 0x14000a8f4
xor r8d, r8d
lea rdx, [rbp - 0x59]
mov rcx, r9
call qword [sym.imp.msvcrt.dll_wcstol]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x14001b982
mov r9, qword [rbp - 0x59]
cmp word [r9], 0x2d
je 0x14000a60f
mov edx, eax
cmp edx, 0x20
jge 0x14000a086
cmp ebx, edx
jg 0x14000a086
mov r12d, dword [rbp - 0x4d]
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 0x14000a06b
mov dword [rbp - 0x4d], r12d
mov r12d, dword [rbp + 0x6f]
movzx eax, word [r9]
cmp ax, 0x2c
je 0x14000a5a4
cmp ax, 0x2a
je 0x14000a5ac
cmp edi, r13d
jle 0x14000a517
mov r13d, edi
mov dword [rbp - 0x3d], edi
jmp 0x14000a517
cmp r13d, 1
jle 0x14000a639
mov rcx, qword [0x140045b00]
lea eax, [r12 + 1]
add eax, r13d
movsxd rbx, eax
lea rdx, [rbx + rbx]
call fcn.14000b6b0
mov rcx, qword [0x140045af8]
lea rdx, [rbx*8]
mov qword [0x140045b00], rax
call fcn.14000b6b0
mov r8, qword [0x140045b00]
mov qword [0x140045af8], rax
test r8, r8
je 0x14001b99f
test rax, rax
je 0x14001b99f
mov rdi, qword [rbp + 0x67]
lea ecx, [r12 + 1]
movsxd rdx, ecx
mov r9d, 1
xor r11d, r11d
lea rcx, [rax + rdx*8]
lea r10, [r8 + rdx*2]
movzx eax, r9w
lea rcx, [rcx + 8]
add ax, word [rdi + 0x88]
inc r9d
mov word [r10], ax
lea r10, [r10 + 2]
mov qword [rcx - 8], r11
cmp r9d, r13d
jl 0x14000a12f
lea eax, [r9 + r12]
movsxd rcx, eax
mov rax, qword [0x140045b00]
mov word [rax + rcx*2], r11w
mov ebx, dword [rbp - 0x49]
mov r13, qword [rdi + 0x78]
test r14d, r14d
mov ecx, 0x27
mov qword [rbp - 0x31], r13
mov r8d, ecx
mov r9d, 0x60
cmove r9w, cx
mov eax, 0x22
cmove r8w, ax
mov dword [rbp - 0x41], r9d
mov dword [rbp - 0x45], r8d
test r13, r13
je 0x14000a5de
movzx eax, word [r13]
movzx edx, ax
cmp ax, r8w
jne 0x14000a5d4
mov dword [rbp - 0x21], r11d
test dx, dx
je 0x14000a47f
movsxd rax, r12d
mov qword [rbp + 7], rax
cmp byte [0x140045b08], 0
mov edx, 0xa
jne 0x14000a47b
cmp dword [0x140045af4], 0
jne 0x14001b9b1
cmp dword [0x140041924], 0
jne 0x14001b9d9
mov qword [rbp - 0x59], r11
mov esi, ebx
mov qword [rbp - 1], r11
mov r12, 0xffffffffffffffff
mov dword [rbp + 0x7f], ebx
nop word [rax + rax]
inc r12
cmp word [r13 + r12*2], 0
jne 0x14000a210
movzx ecx, word [r13]
mov qword [rbp - 9], r12
cmp cx, r9w
je 0x14000a78c
cmp cx, r8w
jne 0x14000a645
cmp r12d, 1
jle 0x14000a645
movsxd rax, r12d
cmp word [r13 + rax*2 - 2], r8w
jne 0x14000a645
sub r12d, 2
mov word [r13 + rax*2 - 2], dx
add r13, 2
movsxd rax, r12d
mov qword [rbp - 0x31], r13
mov qword [rbp - 9], r12
mov qword [rbp - 0x59], r13
lea rdi, [rax*2 + 2]
add rdi, r13
mov qword [rbp - 0x11], rdi
cmp qword [rbp - 0x59], rdi
jae 0x14000a450
mov r12d, dword [rbp - 0x3d]
mov r13, qword [rbp + 7]
cmp byte [0x140045b08], 0
jne 0x14000a448
cmp dword [0x140041924], 0
jne 0x14001ba51
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
mov qword [rbp - 0x59], rax
test rax, rax
je 0x14000a448
xor r11d, r11d
cmp rax, rbx
jbe 0x14000a2e2
cmp word [rax - 2], 0xd
jne 0x14000a2e2
mov word [rax - 2], r11w
mov rax, qword [rbp - 0x59]
mov word [rax], r11w
add qword [rbp - 0x59], 2
test esi, esi
jne 0x14000a931
cmp r12d, 1
jg 0x14000a579
movzx eax, word [rbx]
mov rdx, r11
mov qword [rbp - 0x39], rdx
mov esi, r11d
mov r14d, r11d
test ax, ax
je 0x14000a436
mov ecx, 1
mov dword [rbp + 0x77], ecx
movzx edx, ax
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
jne 0x14000a5be
mov rdx, qword [rbp - 0x39]
xor r11d, r11d
mov ecx, dword [rbp + 0x77]
test esi, esi
je 0x14000a4c5
mov eax, dword [rbp - 0x25]
mov rdi, rbx
test eax, eax
jne 0x14000a3ed
movzx eax, word [rbx]
test ax, ax
je 0x14000a3cf
movzx edx, ax
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
nop dword [rax + rax]
test rax, rax
jne 0x14000a385
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x14000a361
mov rdx, qword [rbp - 0x39]
cmp rdi, rbx
je 0x14000a4d6
cmp esi, 0x20
jge 0x14000a4d6
mov ecx, dword [rbp - 0x4d]
mov eax, esi
inc esi
bt ecx, eax
jae 0x14000a4d6
mov rax, qword [0x140045af8]
lea rcx, [rdx + r13]
inc r14d
mov qword [rax + rcx*8], rdi
mov ecx, dword [rbp + 0x77]
inc ecx
inc rdx
mov dword [rbp + 0x77], ecx
mov qword [rbp - 0x39], rdx
xor r11d, r11d
movzx eax, word [rbx]
test ax, ax
je 0x14000a407
mov word [rbx], r11w
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x14000a31e
jmp 0x14000a407
cmp ecx, eax
jne 0x14000a359
mov rax, qword [0x140045af8]
lea r8, [rdx + r13]
inc r14d
mov qword [rax + r8*8], rbx
test r14d, r14d
je 0x14000a432
mov rax, qword [rbp + 0x67]
mov edx, dword [rbp - 0x1d]
mov rcx, qword [rax + 0x80]
call fcn.14000aa14
mov ecx, dword [rbp - 0x21]
mov dword [rbp - 0x19], eax
call fcn.14000a9ec
mov dword [rbp - 0x21], eax
xor eax, eax
mov dword [rbp - 0x1d], eax
mov rdi, qword [rbp - 0x11]
mov esi, dword [rbp + 0x7f]
mov edx, 0xa
cmp qword [rbp - 0x59], rdi
jb 0x14000a290
mov r12, qword [rbp - 9]
mov r13, qword [rbp - 0x31]
mov rcx, qword [rbp - 1]
test rcx, rcx
jne 0x14000a605
movsxd rax, r12d
xor r11d, r11d
lea r13, [r13 + rax*2]
add r13, 2
mov qword [rbp - 0x31], r13
cmp word [r13], r11w
jne 0x14001ba60
mov r12d, dword [rbp + 0x6f]
cmp dword [rbp - 0x3d], 1
jle 0x14000a4ad
mov r8, qword [0x140045b00]
test r8, r8
je 0x14000a4ad
cmp word [r8], 0
je 0x14000a4ad
mov rax, qword [0x140045af8]
movsxd rcx, r12d
mov word [r8 + rcx*2 + 2], r11w
mov qword [rax + rcx*8 + 8], r11
mov eax, dword [rbp - 0x19]
add rsp, 0xb8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov eax, dword [rbp - 0x29]
cmp word [rbx], ax
jne 0x14000a34b
jmp 0x14000a407
mov ecx, dword [rbp + 0x77]
jmp 0x14000a3cc
cmp word [rax + 2], si
je 0x14000a54a
movzx ebx, word [rax]
xor ecx, ecx
mov word [rax], cx
mov rcx, r15
call fcn.14000ff70
mov rcx, rdi
call fcn.140012534
mov r15, rax
mov rax, qword [rbp - 0x59]
mov word [rax], bx
mov r9, qword [rbp - 0x59]
test bx, bx
je 0x14000a517
add r9, 2
mov qword [rbp - 0x59], r9
test r9, r9
jne 0x140009ef4
jmp 0x14000a0b2
mov rdi, qword [rbp - 0x59]
add rdi, 0xe
mov rax, rdi
mov qword [rbp - 0x59], rax
movzx ecx, word [rdi]
test cx, cx
je 0x14000a4e4
mov rdx, rdi
cmp cx, si
je 0x14000a4e4
cmp cx, 0x20
je 0x14000a4de
lea rax, [rdx + 2]
mov qword [rbp - 0x59], rax
mov rdx, rax
movzx ecx, word [rax]
test cx, cx
jne 0x14000a53f
jmp 0x14000a4e4
add r9, 2
mov qword [rbp - 0x59], r9
movzx eax, word [r9]
test ax, ax
jne 0x140009f01
jmp 0x140009f0b
mov eax, dword [rbp + 0x6f]
lea r8d, [r12 - 1]
inc eax
shl r8, 3
movsxd rcx, eax
xor edx, edx
mov rax, qword [0x140045af8]
lea rcx, [rax + rcx*8]
call sub.msvcrt.dll_memset
xor r11d, r11d
jmp 0x14000a2fd
add r9, 2
mov qword [rbp - 0x59], r9
movzx eax, word [r9]
test ax, ax
jne 0x14000a012
jmp 0x14000a09e
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x14000a31e
jmp 0x14000a339
cmp ax, r9w
je 0x14000a1b3
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.14000d3f0
mov r8d, dword [rbp - 0x45]
mov r13, rax
mov r9d, dword [rbp - 0x41]
xor r11d, r11d
mov qword [rbp - 0x31], rax
movzx edx, word [rax]
jmp 0x14000a1b3
call fcn.14000ff70
jmp 0x14000a45d
lea rcx, [r9 + 2]
xor r8d, r8d
lea rdx, [rbp - 0x59]
call qword [sym.imp.msvcrt.dll_wcstol]
nop dword [rax + rax]
mov edx, eax
test eax, eax
jle 0x14001b982
mov r9, qword [rbp - 0x59]
jmp 0x14000a056
mov rdi, qword [rbp + 0x67]
xor r11d, r11d
jmp 0x14000a165
cmp cx, 0x22
je 0x14000a99a
mov qword [rsp + 0x30], r11
xor r9d, r9d
mov dword [rsp + 0x28], r11d
mov edx, 0x80000000
mov rcx, r13
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 5]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
nop dword [rax + rax]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14001baea
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]
nop dword [rax + rax]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov esi, eax
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
nop dword [rax + rax]
lea ecx, [rsi*2 + 4]
call fcn.14000cd90
mov qword [rbp - 1], rax
mov r14, rax
mov rcx, rdi
test rax, rax
je 0x14001bb0e
lea rdx, [rax + rsi]
mov dword [rbp - 0x51], 0xffffffff
xor eax, eax
lea r9, [rbp - 0x51]
mov r8d, esi
mov qword [rsp + 0x20], rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_ReadFile]
nop dword [rax + rax]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
test ebx, ebx
je 0x14001ba3e
mov ebx, dword [rbp - 0x51]
cmp ebx, esi
jne 0x14000a450
mov ecx, dword [0x140041928]
call fcn.140010460
xor ebx, ebx
test eax, eax
je 0x14001ba4a
lea edx, [rbx + 1]
mov r8d, esi
mov r9d, esi
add r8, r14
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], r14
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
nop dword [rax + rax]
mov eax, eax
mov qword [rbp - 0x59], r14
lea rdi, [r14 + rax*2]
mov qword [rbp - 0x11], rdi
cmp rdi, r14
je 0x14000a916
cmp word [rdi - 2], 0xa
jne 0x14000a916
mov esi, dword [rbp + 0x7f]
mov edx, 0xa
mov word [rdi], bx
jmp 0x14000a27e
cmp r12d, 1
jle 0x14000a22f
movsxd rax, r12d
cmp word [r13 + rax*2 - 2], r9w
jne 0x14000a22f
add r13, 2
lea rdx, [0x140034150]
sub r12d, 2
mov qword [rbp - 0x31], r13
movsxd rax, r12d
mov rcx, r13
mov qword [rbp - 9], r12
mov word [r13 + rax*2], r11w
call qword [sym.imp.msvcrt.dll__wpopen]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x14001bae3
xor eax, eax
mov rcx, r14
mov esi, eax
mov ebx, eax
mov edi, eax
call qword [sym.imp.msvcrt.dll_feof]
nop dword [rax + rax]
test eax, eax
jne 0x14000a890
mov rcx, r14
call qword [sym.imp.msvcrt.dll_ferror]
nop dword [rax + rax]
test eax, eax
jne 0x14000a890
mov rax, rsi
sub rax, rbx
cmp rax, 0x200
jae 0x14000a843
add rsi, 0x100
test rdi, rdi
jne 0x14000a906
mov ecx, esi
call fcn.14000cd90
mov rdi, rax
test rax, rax
je 0x14001baae
mov edx, esi
mov byte [rdi + rbx], 0
lea rcx, [rdi + rbx]
sub edx, ebx
mov r8, r14
call qword [sym.imp.msvcrt.dll_fgets]
nop dword [rax + rax]
test rax, rax
je 0x14000a890
mov rbx, 0xffffffffffffffff
nop word [rax + rax]
inc rbx
cmp byte [rdi + rbx], 0
jne 0x14000a870
mov rcx, r14
call qword [sym.imp.msvcrt.dll_feof]
nop dword [rax + rax]
test eax, eax
je 0x14000a7ff
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
nop dword [rax + rax]
lea rdx, [rbx*2 + 4]
mov rcx, rdi
call fcn.14000af74
cmp qword [0x140045b00], 0
mov r14, rax
mov qword [rbp - 1], rax
je 0x14001bac7
cmp qword [0x140045af8], 0
je 0x14001bac7
test rax, rax
je 0x14001bac7
lea rcx, [rax + rbx]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_memmove
mov dword [rbp - 0x51], ebx
mov esi, ebx
jmp 0x14000a71c
add r9, 2
inc edi
mov qword [rbp - 0x59], r9
mov dword [rbp - 0x25], edi
jmp 0x14000a09e
mov rdx, rsi
mov rcx, rdi
call fcn.14000af74
jmp 0x14000a837
mov esi, dword [rbp + 0x7f]
mov edx, 0xa
mov word [rdi], dx
add rdi, 2
mov qword [rbp - 0x11], rdi
mov word [rdi], bx
jmp 0x14000a27e
dec esi
mov dword [rbp + 0x7f], esi
jmp 0x14000a439
mov r9, qword [rbp - 0x59]
movzx eax, word [r9 + 8]
add r9, 0xa
mov qword [rbp - 0x59], r9
mov dword [rbp - 0x29], eax
jmp 0x14000a517
add rcx, 0xa
lea rdx, [rbp - 0x59]
xor r8d, r8d
mov qword [rbp - 0x59], rcx
call qword [sym.imp.msvcrt.dll_wcstol]
nop dword [rax + rax]
mov dword [rbp - 0x49], eax
test eax, eax
jle 0x14001b982
mov r9, qword [rbp - 0x59]
jmp 0x14000a517
mov r9, qword [rbp - 0x59]
mov r14d, 1
add r9, 0x10
mov qword [rbp - 0x59], r9
jmp 0x14000a517
add r13, 2
dec r12d
mov rcx, r13
mov qword [rbp - 0x31], r13
mov qword [rbp - 9], r12
call fcn.140012378
mov qword [rbp - 0x59], rax
cmp word [rax], 0x22
jne 0x14000a64f
mov word [rax], r11w
mov rax, qword [rbp - 0x59]
sub rax, 2
mov qword [rbp - 0x59], rax
cmp rax, r13
jb 0x14000a64f
cmp word [rax], 0x20
jne 0x14000a64f
jmp 0x14000a9bf
cmp si, 0x27
je 0x140009ee0
movzx esi, r11w
jmp 0x140009ee8
mov r9, qword [rbp - 0x59]
mov r14d, 1
add r9, 0xe
mov qword [rbp - 0x59], r9
jmp 0x14000a517
mov r8, qword [rbp - 0x59]
mov edx, 1
mov ecx, 0x234a
call fcn.140003278
mov eax, 1
jmp 0x14000a4b0
xor edx, edx
mov ecx, 0x2374
call fcn.140003278
call fcn.14002e8dc
int3
mov rax, qword [0x1400587e8]
mov qword [0x140045b00], rax
mov rax, qword [0x1400587e0]
mov qword [0x140045af8], rax
mov dword [0x140045af4], r11d
jmp 0x14000a1e6
cmp qword [0x140045b10], 0
je 0x14001ba90
mov edx, 0x237b
xor ecx, ecx
lea r8d, [rdx - 0x53]
call fcn.14002ee48
cmp eax, 1
je 0x14001ba70
mov rcx, qword [0x140041930]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop dword [rax + rax]
mov rcx, qword [0x140041930]
xor eax, eax
mov dword [0x140041924], eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov r8d, dword [rbp - 0x45]
xor r11d, r11d
mov r9d, dword [rbp - 0x41]
lea edx, [r11 + 0xa]
jmp 0x14000a1f3
xor eax, eax
mov ebx, eax
mov dword [rbp - 0x51], eax
jmp 0x14000a71c
mov edx, ebx
jmp 0x14000a73c
call fcn.14002e904
mov edx, 0xa
jmp 0x14000a2aa
mov r8d, dword [rbp - 0x45]
mov r9d, dword [rbp - 0x41]
mov ebx, dword [rbp - 0x49]
jmp 0x14000a1c7
mov rbx, qword [0x140045b10]
test rbx, rbx
je 0x14001ba90
mov rcx, rbx
call fcn.1400096b4
mov rbx, qword [rbx + 0x1d0]
test rbx, rbx
jne 0x14001ba7c
call fcn.14002e974
mov edx, 1
lea rcx, [0x14004fe50]
call qword [sym.imp.msvcrt.dll_longjmp]
nop dword [rax + rax]
int3
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
nop dword [rax + rax]
mov eax, 8
jmp 0x14000a4b0
mov r8, r13
mov edx, 1
mov ecx, 0x2374
call fcn.140003278
mov eax, 8
jmp 0x14000a4b0
mov ecx, 0x2331
jmp 0x14001baef
mov ecx, 0x2363
mov edx, 1
mov r8, r13
call fcn.140003278
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
nop
jmp 0x14000a4b0
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov eax, 8
jmp 0x14000a4b0