Function at 0x140017d70
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 - 0x15], 1
lea rcx, [0x140038480]
mov dword [rbp - 0x11], 1
mov dword [rbp - 0x21], 0x3b
call fcn.14000ed84
mov r9, qword [rdi + 0x90]
xor r11d, r11d
mov dword [rbp + 0x7f], r11d
mov r12d, 1
mov dword [rbp - 0x3d], r12d
mov r13, rax
mov dword [rbp - 0x39], r12d
mov esi, r11d
mov dword [rbp - 0x1d], r11d
mov r14d, r11d
test r9, r9
je 0x140018227
mov qword [rbp - 0x49], r9
movzx esi, word [r9]
cmp si, 0x22
je 0x140017e06
cmp si, 0x27
je 0x140017e06
movzx esi, r11w
jmp 0x140017e1a
lea rax, [r9 + 2]
mov qword [rbp - 0x49], rax
mov r9, rax
test rax, rax
je 0x140018224
xor r15d, r15d
nop dword [rax]
movzx eax, word [r9]
test ax, ax
je 0x140018134
nop dword [rax]
movzx ecx, ax
cmp ax, 0x20
ja 0x140017e4d
add r9, 2
mov qword [rbp - 0x49], r9
movzx eax, word [r9]
movzx ecx, ax
test ax, ax
jne 0x140017e30
cmp cx, si
je 0x140018134
mov r8d, 8
lea rdx, str.usebackq
mov rcx, r9
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x140017e8b
mov r9, qword [rbp - 0x49]
lea r14d, [rax + 1]
add r9, 0x10
mov qword [rbp - 0x49], r9
jmp 0x14001812b
mov rcx, qword [rbp - 0x49]
lea rdx, str.useback
mov r8d, 7
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x140017ec1
mov r9, qword [rbp - 0x49]
lea r14d, [rax + 1]
add r9, 0xe
mov qword [rbp - 0x49], r9
jmp 0x14001812b
mov rcx, qword [rbp - 0x49]
lea rdx, str.eol
mov r8d, 4
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x140017efb
mov r9, qword [rbp - 0x49]
movzx ebx, word [r9 + 8]
add r9, 0xa
mov qword [rbp - 0x49], r9
mov dword [rbp - 0x21], ebx
jmp 0x14001812b
mov rcx, qword [rbp - 0x49]
lea rdx, str.delims
mov r8d, 7
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x140017fb4
mov rdi, qword [rbp - 0x49]
add rdi, 0xe
mov rcx, rdi
mov qword [rbp - 0x49], rcx
movzx ebx, word [rdi]
test bx, bx
je 0x140017f7c
movzx eax, bx
mov rdx, rdi
mov r8, rdi
mov r9, rdi
movzx ebx, ax
cmp ax, si
je 0x140017f7c
cmp ax, 0x20
jne 0x140017f60
mov rdx, r8
mov ebx, 0x20
cmp word [r9 + 2], si
jne 0x140017f7c
lea rcx, [rdx + 2]
mov qword [rbp - 0x49], rcx
mov rdx, rcx
movzx eax, word [rcx]
mov r8, rcx
movzx ebx, ax
mov r9, rcx
test ax, ax
jne 0x140017f43
mov word [rcx], r15w
mov rcx, r13
call fcn.140014240
mov rcx, rdi
call fcn.14000ed84
mov r13, rax
mov rax, qword [rbp - 0x49]
mov word [rax], bx
mov r9, qword [rbp - 0x49]
test bx, bx
je 0x14001812b
add r9, 2
mov qword [rbp - 0x49], r9
jmp 0x14001812b
mov rcx, qword [rbp - 0x49]
lea rdx, str.skip
mov r8d, 5
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
mov rcx, qword [rbp - 0x49]
test eax, eax
jne 0x140018008
add rcx, 0xa
lea rdx, [rbp - 0x49]
xor r8d, r8d
mov qword [rbp - 0x49], rcx
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstol]
nop dword [rax + rax]
mov dword [rbp + 0x7f], eax
test eax, eax
jle 0x1400181fb
mov r9, qword [rbp - 0x49]
jmp 0x14001812b
mov r8d, 7
lea rdx, str.tokens
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wcsnicmp]
nop dword [rax + rax]
test eax, eax
jne 0x1400181fb
mov r9, qword [rbp - 0x49]
xor eax, eax
add r9, 0xe
mov dword [rbp - 0x39], eax
mov qword [rbp - 0x49], r9
mov r15d, eax
mov edi, eax
movzx eax, word [r9]
test ax, ax
je 0x14001811d
nop dword [rax]
cmp ax, si
je 0x14001811d
cmp ax, 0x2a
je 0x140018110
xor r8d, r8d
lea rdx, [rbp - 0x49]
mov rcx, r9
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstol]
nop dword [rax + rax]
mov ebx, eax
test eax, eax
jle 0x1400181fb
mov r9, qword [rbp - 0x49]
cmp word [r9], 0x2d
jne 0x1400180b5
lea rcx, [r9 + 2]
xor r8d, r8d
lea rdx, [rbp - 0x49]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_wcstol]
nop dword [rax + rax]
mov edx, eax
test eax, eax
jle 0x1400181fb
mov r9, qword [rbp - 0x49]
jmp 0x1400180b7
mov edx, ebx
cmp edx, 0x20
jae 0x1400180e7
cmp ebx, edx
jg 0x1400180e7
mov eax, edx
inc edi
sub eax, ebx
add edi, eax
nop dword [rax + rax]
lea ecx, [rbx - 1]
mov eax, 1
shl eax, cl
inc ebx
or r15d, eax
cmp ebx, edx
jle 0x1400180d0
mov dword [rbp - 0x39], r15d
movzx eax, word [r9]
cmp ax, 0x2c
jne 0x1400180fb
add r9, 2
mov qword [rbp - 0x49], r9
jmp 0x140018101
cmp ax, 0x2a
jne 0x14001811d
movzx eax, word [r9]
test ax, ax
jne 0x140018050
jmp 0x14001811d
add r9, 2
inc edi
mov qword [rbp - 0x49], r9
mov dword [rbp - 0x1d], edi
cmp edi, r12d
cmovg r12d, edi
xor r15d, r15d
mov dword [rbp - 0x3d], r12d
test r9, r9
jne 0x140017e20
cmp r12d, 1
jle 0x140018218
mov r15d, dword [rbp + 0x6f]
mov rcx, qword [0x14004cba0]
lea eax, [r15 + 1]
add eax, r12d
movsxd rbx, eax
lea rdx, [rbx + rbx]
call fcn.14000ef70
mov rcx, qword [0x14004cb98]
lea rdx, [rbx*8]
mov qword [0x14004cba0], rax
call fcn.14000ef70
mov r9, qword [0x14004cba0]
mov qword [0x14004cb98], rax
test r9, r9
je 0x1400189c8
test rax, rax
je 0x1400189c8
mov rdi, qword [rbp + 0x67]
lea ecx, [r15 + 1]
movsxd rdx, ecx
mov r8d, 1
xor r11d, r11d
lea rcx, [rax + rdx*8]
lea r9, [r9 + rdx*2]
nop dword [rax]
nop word [rax + rax]
movzx eax, r8w
lea rcx, [rcx + 8]
add ax, word [rdi + 0x88]
inc r8d
mov word [r9], ax
lea r9, [r9 + 2]
mov qword [rcx - 8], r11
cmp r8d, r12d
jl 0x1400181c0
mov esi, dword [rbp + 0x7f]
lea eax, [r8 + r15]
movsxd rcx, eax
mov rax, qword [0x14004cba0]
mov word [rax + rcx*2], r11w
jmp 0x140018227
mov r8, qword [rbp - 0x49]
mov edx, 1
mov ecx, 0x234a
call fcn.140002bfc
mov eax, 1
jmp 0x1400189b3
mov rdi, qword [rbp + 0x67]
xor r11d, r11d
mov esi, dword [rbp + 0x7f]
jmp 0x140018227
mov esi, r11d
mov r15, qword [rdi + 0x78]
test r14d, r14d
mov ecx, 0x27
mov qword [rbp - 0x29], r15
mov ebx, ecx
mov edi, 0x60
cmove di, cx
mov eax, 0x22
cmove bx, ax
mov dword [rbp + 3], edi
mov dword [rbp - 1], ebx
test r15, r15
je 0x140018267
movzx eax, word [r15]
movzx edx, ax
cmp ax, di
je 0x140018281
cmp ax, bx
je 0x140018281
xor r8d, r8d
xor edx, edx
mov rcx, r15
call fcn.140011180
mov r15, rax
mov qword [rbp - 0x29], rax
xor r11d, r11d
movzx edx, word [rax]
mov r14d, dword [rbp + 0x6f]
mov dword [rbp - 0x19], r11d
test dx, dx
je 0x140018982
cmp byte [0x14004cba8], 0
mov edx, 0xa
jne 0x14001897e
cmp dword [0x14004cb94], 0
je 0x1400182d0
mov rax, qword [0x14005bd98]
mov qword [0x14004cba0], rax
mov rax, qword [0x14005bd90]
mov qword [0x14004cb98], rax
mov dword [0x14004cb94], r11d
cmp dword [0x1400449b4], 0
je 0x140018335
cmp qword [0x14004cbb0], 0
je 0x1400188f4
mov edx, 0x237b
xor ecx, ecx
lea r8d, [rdx - 0x53]
call fcn.14003285c
cmp eax, 1
je 0x1400188d4
mov rcx, qword [0x1400449c0]
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_EnterCriticalSection]
nop dword [rax + rax]
mov rcx, qword [0x1400449c0]
xor eax, eax
mov dword [0x1400449b4], eax
call qword [sym.imp.api_ms_win_core_synch_l1_1_0.dll_LeaveCriticalSection]
nop dword [rax + rax]
xor r11d, r11d
lea edx, [r11 + 0xa]
mov qword [rbp - 0x31], r11
mov r12, 0xffffffffffffffff
mov qword [rbp - 0x49], r11
mov qword [rbp + 7], r11
mov dword [rbp + 0x77], esi
nop dword [rax + rax]
inc r12
cmp word [r15 + r12*2], 0
jne 0x140018350
movzx ecx, word [r15]
mov qword [rbp - 9], r12
cmp cx, di
jne 0x1400184e7
cmp r12d, 1
jle 0x1400184e7
movsxd rax, r12d
cmp word [r15 + rax*2 - 2], di
jne 0x1400184e7
add r15, 2
lea rdx, [0x140038598]
sub r12d, 2
mov qword [rbp - 0x29], r15
movsxd rax, r12d
mov rcx, r15
mov qword [rbp - 9], r12
mov word [r15 + rax*2], r11w
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__wpopen]
nop dword [rax + rax]
mov r14, rax
test rax, rax
je 0x140018944
xor eax, eax
mov rcx, r14
mov esi, eax
mov ebx, eax
mov edi, eax
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_feof]
nop dword [rax + rax]
test eax, eax
jne 0x140018480
nop
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_ferror]
nop dword [rax + rax]
test eax, eax
jne 0x140018480
mov rax, rsi
sub rax, rbx
cmp rax, 0x200
jae 0x140018431
add rsi, 0x100
test rdi, rdi
je 0x14001841e
mov rdx, rsi
mov rcx, rdi
call fcn.14000edf4
jmp 0x140018425
mov ecx, esi
call fcn.140011100
mov rdi, rax
test rax, rax
je 0x140018912
mov edx, esi
mov byte [rdi + rbx], 0
lea rcx, [rdi + rbx]
sub edx, ebx
mov r8, r14
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_fgets]
nop dword [rax + rax]
test rax, rax
je 0x140018480
mov rbx, 0xffffffffffffffff
nop dword [rax + rax]
inc rbx
cmp byte [rdi + rbx], 0
jne 0x140018460
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o_feof]
nop dword [rax + rax]
test eax, eax
je 0x1400183e0
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__pclose]
nop dword [rax + rax]
lea rdx, [rbx*2 + 4]
mov rcx, rdi
call fcn.14000edf4
cmp qword [0x14004cba0], 0
mov r14, rax
mov qword [rbp + 7], rax
je 0x14001892b
cmp qword [0x14004cb98], 0
je 0x14001892b
test rax, rax
je 0x14001892b
lea rcx, [rax + rbx]
mov r8, rbx
mov rdx, rax
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
xor r11d, r11d
mov dword [rbp - 0x41], ebx
mov esi, ebx
jmp 0x140018651
cmp cx, bx
jne 0x14001852a
cmp r12d, 1
jle 0x14001852a
movsxd rax, r12d
cmp word [r15 + rax*2 - 2], bx
jne 0x14001852a
sub r12d, 2
mov word [r15 + rax*2 - 2], dx
add r15, 2
movsxd rdi, r12d
inc rdi
mov qword [rbp - 0x29], r15
mov qword [rbp - 9], r12
mov qword [rbp - 0x49], r15
lea rdi, [r15 + rdi*2]
mov qword [rbp - 0x31], rdi
jmp 0x1400186c8
cmp cx, 0x22
jne 0x14001857b
add r15, 2
dec r12d
mov rcx, r15
mov qword [rbp - 0x29], r15
mov qword [rbp - 9], r12
call fcn.140016ca4
mov qword [rbp - 0x49], rax
cmp word [rax], 0x22
jne 0x14001857b
nop dword [rax]
nop word [rax + rax]
mov word [rax], r11w
mov rax, qword [rbp - 0x49]
sub rax, 2
mov qword [rbp - 0x49], rax
cmp rax, r15
jb 0x14001857b
cmp word [rax], 0x20
je 0x140018560
mov qword [rsp + 0x30], r11
xor r9d, r9d
mov dword [rsp + 0x28], r11d
mov edx, 0x80000000
mov rcx, r15
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 0x140018977
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.140011100
mov qword [rbp + 7], rax
mov r14, rax
mov rcx, rdi
test rax, rax
je 0x140018964
lea rdx, [rax + rsi]
mov dword [rbp - 0x41], 0xffffffff
xor eax, eax
lea r9, [rbp - 0x41]
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]
mov ecx, dword [rbp - 0x41]
test ebx, ebx
mov r11d, 0
cmove ecx, r11d
mov ebx, ecx
mov dword [rbp - 0x41], ecx
cmp ebx, esi
jne 0x1400186bd
mov ecx, dword [0x1400449b8]
mov r8d, esi
add r8, r14
call fcn.140014564
mov ecx, dword [0x1400449b8]
test eax, eax
mov edx, r11d
mov dword [rsp + 0x28], esi
setne dl
mov qword [rsp + 0x20], r14
mov r9d, esi
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_MultiByteToWideChar]
nop dword [rax + rax]
mov eax, eax
mov qword [rbp - 0x49], r14
lea rdi, [r14 + rax*2]
mov qword [rbp - 0x31], rdi
cmp rdi, r14
je 0x1400186a6
cmp word [rdi - 2], 0xa
je 0x1400186b6
mov eax, 0xa
mov word [rdi], ax
add rdi, 2
mov qword [rbp - 0x31], rdi
xor eax, eax
mov word [rdi], ax
jmp 0x1400186c1
mov rdi, qword [rbp - 0x31]
mov r14d, dword [rbp + 0x6f]
mov esi, dword [rbp + 0x77]
cmp qword [rbp - 0x49], rdi
jae 0x14001888e
cmp byte [0x14004cba8], 0
jne 0x140018886
cmp dword [0x1400449b4], 0
je 0x1400186ed
call fcn.140032318
mov rbx, qword [rbp - 0x49]
mov edx, 0xa
mov rcx, rbx
call sub.api_ms_win_crt_private_l1_1_0.dll_wcschr
mov qword [rbp - 0x49], rax
test rax, rax
je 0x140018886
xor r11d, r11d
cmp rax, rbx
jbe 0x140018723
cmp word [rax - 2], 0xd
jne 0x140018723
mov word [rax - 2], r11w
mov rax, qword [rbp - 0x49]
mov word [rax], r11w
add qword [rbp - 0x49], 2
test esi, esi
jne 0x1400188cd
mov edx, dword [rbp - 0x3d]
cmp edx, 1
jle 0x140018760
lea r8d, [rdx - 1]
xor edx, edx
lea eax, [r14 + 1]
shl r8, 3
movsxd rcx, eax
mov rax, qword [0x14004cb98]
lea rcx, [rax + rcx*8]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor r11d, r11d
movzx eax, word [rbx]
mov esi, r11d
mov r12d, r11d
mov r15, r11
test ax, ax
je 0x140018875
mov r14d, 1
nop dword [rax + rax]
movzx edx, ax
mov rcx, r13
call sub.api_ms_win_crt_private_l1_1_0.dll_wcschr
test rax, rax
je 0x14001879d
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140018780
test esi, esi
jne 0x1400187ad
mov eax, dword [rbp - 0x21]
cmp word [rbx], ax
je 0x140018846
mov eax, dword [rbp - 0x1d]
mov rdi, rbx
test eax, eax
je 0x1400187bc
cmp r14d, eax
je 0x140018831
movzx eax, word [rbx]
test ax, ax
je 0x140018812
movzx edx, ax
mov rcx, r13
call sub.api_ms_win_crt_private_l1_1_0.dll_wcschr
test rax, rax
jne 0x1400187e1
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x1400187c4
cmp rdi, rbx
je 0x140018812
cmp esi, 0x20
jge 0x140018812
mov ecx, dword [rbp - 0x39]
mov eax, esi
inc esi
bt ecx, eax
jae 0x140018812
movsxd rcx, dword [rbp + 0x6f]
inc r12d
mov rax, qword [0x14004cb98]
add rcx, r15
inc r14d
inc r15
mov qword [rax + rcx*8], rdi
movzx eax, word [rbx]
test ax, ax
je 0x140018846
xor eax, eax
mov word [rbx], ax
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x140018780
jmp 0x140018846
movsxd r8, dword [rbp + 0x6f]
mov rax, qword [0x14004cb98]
add r8, r15
inc r12d
mov qword [rax + r8*8], rbx
test r12d, r12d
je 0x140018871
mov rax, qword [rbp + 0x67]
mov edx, dword [rbp - 0x15]
mov rcx, qword [rax + 0x80]
call fcn.140017cbc
mov ecx, dword [rbp - 0x19]
mov dword [rbp - 0x11], eax
call fcn.1400189e0
mov dword [rbp - 0x19], eax
xor eax, eax
mov dword [rbp - 0x15], eax
mov rdi, qword [rbp - 0x31]
mov esi, dword [rbp + 0x77]
mov r14d, dword [rbp + 0x6f]
cmp qword [rbp - 0x49], rdi
jb 0x1400186d2
mov r15, qword [rbp - 0x29]
mov r12, qword [rbp - 9]
mov rax, qword [rbp + 7]
test rax, rax
je 0x14001889f
mov rcx, rax
call fcn.140014240
mov r14d, dword [rbp + 0x6f]
xor r11d, r11d
movsxd rax, r12d
lea r15, [r15 + rax*2]
add r15, 2
mov qword [rbp - 0x29], r15
cmp word [r15], r11w
je 0x14001897e
mov ebx, dword [rbp - 1]
mov edi, dword [rbp + 3]
mov esi, dword [rbp + 0x7f]
jmp 0x140018292
dec esi
mov dword [rbp + 0x77], esi
jmp 0x140018878
mov rbx, qword [0x14004cbb0]
test rbx, rbx
je 0x1400188f4
mov rcx, rbx
call fcn.140018ea4
mov rbx, qword [rbx + 0x1d0]
test rbx, rbx
jne 0x1400188e0
call fcn.1400323b0
mov edx, 1
lea rcx, [0x140053020]
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll_longjmp]
nop dword [rax + rax]
int3
mov rcx, r14
call qword [sym.imp.api_ms_win_crt_private_l1_1_0.dll__o__pclose]
nop dword [rax + rax]
mov eax, 8
jmp 0x1400189b3
mov r8, r15
mov edx, 1
mov ecx, 0x2374
call fcn.140002bfc
mov eax, 8
jmp 0x1400189b3
mov ecx, 0x2331
mov edx, 1
mov r8, r15
call fcn.140002bfc
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
jmp 0x1400189b3
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
nop dword [rax + rax]
mov eax, 8
jmp 0x1400189b3
mov ecx, 0x2363
jmp 0x140018949
mov r12d, dword [rbp - 0x3d]
cmp r12d, 1
jle 0x1400189b0
mov r9, qword [0x14004cba0]
test r9, r9
je 0x1400189b0
cmp word [r9], 0
je 0x1400189b0
mov rax, qword [0x14004cb98]
movsxd rcx, r14d
mov word [r9 + rcx*2 + 2], r11w
mov qword [rax + rcx*8 + 8], r11
mov eax, dword [rbp - 0x11]
add rsp, 0xa8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
xor edx, edx
mov ecx, 0x2374
call fcn.140002bfc
call fcn.1400322f0
int3