Function at 0x140009710
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, [0x1400324c4]
mov dword [rbp - 0x19], 1
mov r12d, edx
mov dword [rbp - 0x29], 0x3b
call fcn.1400117c0
mov r9, qword [rdi + 0x90]
xor r10d, r10d
mov dword [rbp - 0x25], r10d
mov r13d, 1
mov dword [rbp - 0x3d], r13d
mov ebx, r10d
mov dword [rbp - 0x49], ebx
mov r15, rax
mov dword [rbp - 0x4d], r13d
mov r14d, r10d
test r9, r9
je 0x140009a01
mov qword [rbp - 0x59], r9
movzx esi, word [r9]
cmp si, 0x22
jne 0x14001b37e
add r9, 2
mov qword [rbp - 0x59], r9
mov rax, r9
test rax, rax
je 0x140009a01
movzx eax, word [r9]
test ax, ax
je 0x140009944
cmp ax, 0x20
jbe 0x140009dfc
cmp word [r9], si
je 0x140009944
mov r8d, 8
lea rdx, str.usebackq
mov rcx, r9
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14000a1a1
mov rcx, qword [rbp - 0x59]
lea rdx, str.useback
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14001b391
mov rcx, qword [rbp - 0x59]
lea rdx, str.eol
mov r8d, 4
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x14000a15f
mov rcx, qword [rbp - 0x59]
lea rdx, str.delims
mov r8d, 7
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
je 0x140009dc2
mov rcx, qword [rbp - 0x59]
lea rdx, str.skip
mov r8d, 5
call qword [sym.imp.msvcrt.dll__wcsnicmp]
mov rcx, qword [rbp - 0x59]
test eax, eax
je 0x14000a178
mov r8d, 7
lea rdx, str.tokens
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x14001b3a8
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 0x140009930
cmp ax, si
je 0x140009930
cmp ax, 0x2a
je 0x14000a118
xor r8d, r8d
lea rdx, [rbp - 0x59]
mov rcx, r9
call qword [sym.imp.msvcrt.dll_wcstol]
mov ebx, eax
test eax, eax
jle 0x14001b3a8
mov r9, qword [rbp - 0x59]
cmp word [r9], 0x2d
je 0x140009e68
mov edx, eax
cmp edx, 0x20
jge 0x140009918
cmp ebx, edx
jg 0x140009918
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 0x1400098fd
mov dword [rbp - 0x4d], r12d
mov r12d, dword [rbp + 0x6f]
movzx eax, word [r9]
cmp ax, 0x2c
je 0x140009e44
cmp ax, 0x2a
je 0x140009e4c
cmp edi, r13d
jle 0x140009db4
mov r13d, edi
mov dword [rbp - 0x3d], edi
jmp 0x140009db4
cmp r13d, 1
jle 0x140009e8c
mov rcx, qword [0x140043a80]
lea eax, [r12 + 1]
add eax, r13d
movsxd rbx, eax
lea rdx, [rbx + rbx]
call fcn.14000ae50
mov rcx, qword [0x140043a78]
lea rdx, [rbx*8]
mov qword [0x140043a80], rax
call fcn.14000ae50
mov rdx, qword [0x140043a80]
mov r9, rax
mov qword [0x140043a78], rax
test rdx, rdx
je 0x14001b3c5
test rax, rax
je 0x14001b3c5
mov rdi, qword [rbp + 0x67]
mov r8d, 1
xor r10d, r10d
cmp r13d, r8d
jle 0x1400099eb
lea eax, [r12 + 1]
cdqe
lea rcx, [r9 + rax*8]
lea r9, [rdx + rax*2]
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], r10
cmp r8d, r13d
jl 0x1400099c8
lea eax, [r8 + r12]
movsxd rcx, eax
mov rax, qword [0x140043a80]
mov word [rax + rcx*2], r10w
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 0x140009fbb
movzx eax, word [r13]
movzx edx, ax
cmp ax, r9w
je 0x140009a52
cmp ax, r8w
jne 0x140009fbb
mov dword [rbp - 0x21], r10d
test dx, dx
je 0x140009d08
movsxd rax, r12d
mov qword [rbp + 7], rax
cmp byte [0x140043a88], 0
mov edx, 0xa
jne 0x140009d04
call fcn.140008d20
cmp dword [0x14003f8a4], 0
jne 0x14001b3d7
mov qword [rbp - 0x59], r10
mov esi, ebx
mov qword [rbp - 1], r10
mov r12, 0xffffffffffffffff
mov dword [rbp + 0x7f], ebx
nop
inc r12
cmp word [r13 + r12*2], 0
jne 0x140009aa0
movzx ecx, word [r13]
mov qword [rbp - 9], r12
cmp cx, r9w
je 0x140009fe2
cmp cx, r8w
jne 0x140009e98
cmp r12d, 1
jle 0x140009e98
movsxd rax, r12d
cmp word [r13 + rax*2 - 2], r8w
jne 0x140009e98
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 0x140009cd9
mov r12d, dword [rbp - 0x3d]
mov r13, qword [rbp + 7]
cmp byte [0x140043a88], 0
jne 0x140009cd1
cmp dword [0x14003f8a4], 0
jne 0x14001b426
mov rbx, qword [rbp - 0x59]
mov rcx, rbx
call qword [sym.imp.msvcrt.dll_wcschr]
mov qword [rbp - 0x59], rax
test rax, rax
je 0x140009cd1
xor r10d, r10d
cmp rax, rbx
jbe 0x140009b6c
cmp word [rax - 2], 0xd
jne 0x140009b6c
mov word [rax - 2], r10w
mov rax, qword [rbp - 0x59]
mov word [rax], r10w
add qword [rbp - 0x59], 2
test esi, esi
jne 0x14000a155
cmp r12d, 1
jg 0x140009e16
movzx eax, word [rbx]
mov rdx, r10
mov qword [rbp - 0x39], rdx
mov esi, r10d
mov r14d, r10d
test ax, ax
je 0x140009cbf
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 0x140009d65
mov rdx, qword [rbp - 0x39]
xor r10d, r10d
mov ecx, dword [rbp + 0x77]
test esi, esi
je 0x140009d4c
mov eax, dword [rbp - 0x25]
mov rdi, rbx
test eax, eax
jne 0x140009c76
movzx eax, word [rbx]
test ax, ax
je 0x140009c58
nop word [rax + rax]
movzx edx, ax
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcschr]
test rax, rax
jne 0x140009c0e
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140009bf0
mov rdx, qword [rbp - 0x39]
cmp rdi, rbx
je 0x140009d5d
cmp esi, 0x20
jge 0x140009d5d
mov ecx, dword [rbp - 0x4d]
mov eax, esi
inc esi
bt ecx, eax
jae 0x140009d5d
mov rax, qword [0x140043a78]
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 r10d, r10d
movzx eax, word [rbx]
test ax, ax
je 0x140009c90
mov word [rbx], r10w
add rbx, 2
movzx eax, word [rbx]
test ax, ax
jne 0x140009ba8
jmp 0x140009c90
cmp ecx, eax
jne 0x140009bdd
mov rax, qword [0x140043a78]
lea r8, [rdx + r13]
inc r14d
mov qword [rax + r8*8], rbx
test r14d, r14d
je 0x140009cbb
mov rax, qword [rbp + 0x67]
mov edx, dword [rbp - 0x1d]
mov rcx, qword [rax + 0x80]
call fcn.14000a230
mov ecx, dword [rbp - 0x21]
mov dword [rbp - 0x19], eax
call fcn.14000a208
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 0x140009b20
mov r12, qword [rbp - 9]
mov r13, qword [rbp - 0x31]
mov rcx, qword [rbp - 1]
test rcx, rcx
jne 0x140009e5e
movsxd rax, r12d
xor r10d, r10d
lea r13, [r13 + rax*2]
add r13, 2
mov qword [rbp - 0x31], r13
cmp word [r13], r10w
jne 0x14001b435
mov r12d, dword [rbp + 0x6f]
cmp dword [rbp - 0x3d], 1
jle 0x140009d35
mov rdx, qword [0x140043a80]
test rdx, rdx
je 0x140009d35
cmp word [rdx], 0
je 0x140009d35
mov rax, qword [0x140043a78]
movsxd rcx, r12d
mov word [rdx + rcx*2 + 2], r10w
mov qword [rax + rcx*8 + 8], r10
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 0x140009bcf
jmp 0x140009c90
mov ecx, dword [rbp + 0x77]
jmp 0x140009c55
movzx eax, word [rbx + 2]
add rbx, 2
test ax, ax
jne 0x140009ba8
jmp 0x140009bbd
cmp word [rax + 2], si
je 0x140009de7
movzx ebx, word [rax]
xor ecx, ecx
mov word [rax], cx
mov rcx, r15
call fcn.14000f5b0
mov rcx, rdi
call fcn.1400117c0
mov r15, rax
mov rax, qword [rbp - 0x59]
mov word [rax], bx
mov r9, qword [rbp - 0x59]
test bx, bx
je 0x140009db4
add r9, 2
mov qword [rbp - 0x59], r9
test r9, r9
jne 0x1400097b4
jmp 0x140009944
mov rdi, qword [rbp - 0x59]
add rdi, 0xe
mov rax, rdi
mov qword [rbp - 0x59], rax
movzx ecx, word [rdi]
test cx, cx
je 0x140009d81
mov rdx, rdi
cmp cx, si
je 0x140009d81
cmp cx, 0x20
je 0x140009d7b
lea rax, [rdx + 2]
mov qword [rbp - 0x59], rax
mov rdx, rax
movzx ecx, word [rax]
test cx, cx
jne 0x140009ddc
jmp 0x140009d81
add r9, 2
mov qword [rbp - 0x59], r9
movzx eax, word [r9]
test ax, ax
jne 0x1400097c1
jmp 0x1400097cb
mov eax, dword [rbp + 0x6f]
xor edx, edx
inc eax
movsxd rcx, eax
mov rax, qword [0x140043a78]
lea rcx, [rax + rcx*8]
lea eax, [r12 - 1]
mov r8d, eax
shl r8, 3
call sub.msvcrt.dll_memset
xor r10d, r10d
jmp 0x140009b87
add r9, 2
mov qword [rbp - 0x59], r9
movzx eax, word [r9]
test ax, ax
jne 0x1400098ae
jmp 0x140009930
call fcn.14000f5b0
jmp 0x140009ce6
lea rcx, [r9 + 2]
xor r8d, r8d
lea rdx, [rbp - 0x59]
call qword [sym.imp.msvcrt.dll_wcstol]
mov edx, eax
test eax, eax
jle 0x14001b3a8
mov r9, qword [rbp - 0x59]
jmp 0x1400098e8
mov rdi, qword [rbp + 0x67]
xor r10d, r10d
jmp 0x1400099fe
cmp cx, 0x22
je 0x14000a1b8
mov qword [rsp + 0x30], r10
xor r9d, r9d
mov dword [rsp + 0x28], r10d
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]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x14001b4da
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 esi, eax
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_SetFilePointer]
lea ecx, [rsi*2 + 4]
call fcn.14000c480
mov qword [rbp - 1], rax
mov r14, rax
mov rcx, rdi
test rax, rax
je 0x14001b4ca
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]
mov rcx, rdi
mov ebx, eax
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
test ebx, ebx
je 0x14001b413
mov ebx, dword [rbp - 0x51]
cmp ebx, esi
jne 0x140009cd9
mov ecx, dword [0x14003f8a8]
call fcn.14000f880
xor ebx, ebx
test eax, eax
je 0x14001b41f
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]
mov eax, eax
mov qword [rbp - 0x59], r14
lea rdi, [r14 + rax*2]
mov qword [rbp - 0x11], rdi
cmp rdi, r14
je 0x14000a13a
cmp word [rdi - 2], 0xa
jne 0x14000a13a
mov esi, dword [rbp + 0x7f]
mov edx, 0xa
mov word [rdi], bx
jmp 0x140009b0e
xor r8d, r8d
xor edx, edx
mov rcx, r13
call fcn.14000cef0
mov r8d, dword [rbp - 0x45]
mov r13, rax
mov r9d, dword [rbp - 0x41]
xor r10d, r10d
mov qword [rbp - 0x31], rax
movzx edx, word [rax]
jmp 0x140009a52
cmp r12d, 1
jle 0x140009abf
movsxd rax, r12d
cmp word [r13 + rax*2 - 2], r9w
jne 0x140009abf
add r13, 2
lea rdx, [0x1400321cc]
sub r12d, 2
mov qword [rbp - 0x31], r13
movsxd rax, r12d
mov rcx, r13
mov qword [rbp - 9], r12
mov word [r13 + rax*2], r10w
call qword [sym.imp.msvcrt.dll__wpopen]
mov r14, rax
test rax, rax
je 0x14001b4ac
xor eax, eax
mov rcx, r14
mov esi, eax
mov ebx, eax
mov edi, eax
call qword [sym.imp.msvcrt.dll_feof]
test eax, eax
jne 0x14000a0ba
mov rcx, r14
call qword [sym.imp.msvcrt.dll_ferror]
test eax, eax
jne 0x14000a0ba
mov rax, rsi
sub rax, rbx
cmp rax, 0x200
jae 0x14000a083
add rsi, 0x100
test rdi, rdi
jne 0x14000a12a
mov ecx, esi
call fcn.14000c480
mov rdi, rax
test rax, rax
je 0x14001b47d
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]
test rax, rax
je 0x14000a0ba
mov rbx, 0xffffffffffffffff
inc rbx
cmp byte [rdi + rbx], 0
jne 0x14000a0a4
mov rcx, r14
call qword [sym.imp.msvcrt.dll_feof]
test eax, eax
je 0x14000a045
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
lea rdx, [rbx*2 + 4]
mov rcx, rdi
call fcn.14000a754
cmp qword [0x140043a80], 0
mov r14, rax
mov qword [rbp - 1], rax
je 0x14001b490
cmp qword [0x140043a78], 0
je 0x14001b490
test rax, rax
je 0x14001b490
lea rcx, [rax + rbx]
mov r8, rbx
mov rdx, rax
call sub.msvcrt.dll_memmove
mov dword [rbp - 0x51], ebx
mov esi, ebx
jmp 0x140009f51
add r9, 2
inc edi
mov qword [rbp - 0x59], r9
mov dword [rbp - 0x25], edi
jmp 0x140009930
mov rdx, rsi
mov rcx, rdi
call fcn.14000a754
jmp 0x14000a077
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 0x140009b0e
dec esi
mov dword [rbp + 0x7f], esi
jmp 0x140009cc2
mov r9, qword [rbp - 0x59]
movzx eax, word [r9 + 8]
add r9, 0xa
mov qword [rbp - 0x59], r9
mov dword [rbp - 0x29], eax
jmp 0x140009db4
add rcx, 0xa
lea rdx, [rbp - 0x59]
xor r8d, r8d
mov qword [rbp - 0x59], rcx
call qword [sym.imp.msvcrt.dll_wcstol]
mov dword [rbp - 0x49], eax
test eax, eax
jle 0x14001b3a8
mov r9, qword [rbp - 0x59]
jmp 0x140009db4
mov r9, qword [rbp - 0x59]
mov r14d, 1
add r9, 0x10
mov qword [rbp - 0x59], r9
jmp 0x140009db4
add r13, 2
dec r12d
mov rcx, r13
mov qword [rbp - 0x31], r13
mov qword [rbp - 9], r12
call fcn.1400117a4
mov qword [rbp - 0x59], rax
cmp word [rax], 0x22
jne 0x140009ea2
mov word [rax], r10w
mov rax, qword [rbp - 0x59]
sub rax, 2
mov qword [rbp - 0x59], rax
cmp rax, r13
jb 0x140009ea2
cmp word [rax], 0x20
jne 0x140009ea2
jmp 0x14000a1dd
cmp si, 0x27
je 0x1400097a0
movzx esi, r10w
jmp 0x1400097a8
mov r9, qword [rbp - 0x59]
mov r14d, 1
add r9, 0xe
mov qword [rbp - 0x59], r9
jmp 0x140009db4
mov r8, qword [rbp - 0x59]
mov edx, 1
mov ecx, 0x234a
call fcn.140015118
mov eax, 1
jmp 0x140009d38
xor edx, edx
mov ecx, 0x2374
call fcn.140015118
call fcn.14002c48c
int3
cmp qword [0x140043a90], 0
je 0x14001b465
mov edx, 0x237b
xor ecx, ecx
lea r8d, [rdx - 0x53]
call fcn.14002c9ac
cmp eax, 1
je 0x14001b445
call fcn.140014794
mov r8d, dword [rbp - 0x45]
xor r10d, r10d
mov r9d, dword [rbp - 0x41]
lea edx, [r10 + 0xa]
jmp 0x140009a8a
xor eax, eax
mov ebx, eax
mov dword [rbp - 0x51], eax
jmp 0x140009f51
mov edx, ebx
jmp 0x140009f71
call fcn.14002c4b0
mov edx, 0xa
jmp 0x140009b3a
mov r8d, dword [rbp - 0x45]
mov r9d, dword [rbp - 0x41]
mov ebx, dword [rbp - 0x49]
jmp 0x140009a66
mov rbx, qword [0x140043a90]
test rbx, rbx
je 0x14001b465
mov rcx, rbx
call fcn.140008fc0
mov rbx, qword [rbx + 0x1d0]
test rbx, rbx
jne 0x14001b451
call fcn.14002c51c
mov edx, 1
lea rcx, [0x14004ddf0]
call qword [sym.imp.msvcrt.dll_longjmp]
int3
mov rcx, r14
call qword [sym.imp.msvcrt.dll__pclose]
mov eax, 8
jmp 0x140009d38
mov r8, r13
mov edx, 1
mov ecx, 0x2374
call fcn.140015118
mov eax, 8
jmp 0x140009d38
mov r8, r13
mov edx, 1
mov ecx, 0x2331
call fcn.140015118
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop
jmp 0x140009d38
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, 8
jmp 0x140009d38
mov r8, r13
mov edx, 1
mov ecx, 0x2363
call fcn.140015118
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop
jmp 0x140009d38