Function at 0x140082030
Capabilities:
Read file on windows

Disassembly:
mov qword [rsp + 0x18], rbx
mov qword [rsp + 0x20], rsi
push rdi
push r14
push r15
mov eax, 0x2120
call fcn.140102250
sub rsp, rax
mov rax, qword [0x14026eff8]
xor rax, rsp
mov qword [rsp + 0x2110], rax
mov rbx, rdx
mov r14, rcx
mov qword [rsp + 0x68], rcx
xor edx, edx
lea rcx, [rsp + 0x30]
call fcn.140011a20
nop
cmp qword [rbx + 0x10], 0
je 0x1400824dd
xor esi, esi
mov qword [rsp + 0x48], rsi
cmp qword [rbx + 0x18], 8
jb 0x140082092
mov rbx, qword [rbx]
lea r8, [0x14013ef10]
mov rdx, rbx
lea rcx, [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__wfopen_s]
test eax, eax
je 0x1400820da
movzx ecx, byte [rsp + 0x30]
mov byte [r14], cl
mov rcx, qword [rsp + 0x38]
mov qword [r14 + 8], rcx
mov byte [rsp + 0x30], sil
mov qword [rsp + 0x38], rsi
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.140013d50
mov rax, r14
jmp 0x140082509
cmp qword [rsp + 0x48], rsi
jne 0x140082110
movzx eax, byte [rsp + 0x30]
mov byte [r14], al
mov rax, qword [rsp + 0x38]
mov qword [r14 + 8], rax
mov byte [rsp + 0x30], sil
mov qword [rsp + 0x38], rsi
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.140013d50
mov rax, r14
jmp 0x140082509
xor edx, edx
mov r8d, 0x2000
lea rcx, [rsp + 0x110]
call sub.VCRUNTIME140.dll_memset
mov qword [rsp + 0xc8], rsi
mov qword [rsp + 0xd8], rsi
mov qword [rsp + 0xe0], SafeArrayPutElement
mov byte [rsp + 0xc8], sil
nop dword [rax]
mov r9, qword [rsp + 0x48]
mov edx, 1
mov r8d, 0x2000
lea rcx, [rsp + 0x110]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov rdi, rax
test rax, rax
je 0x1400821f3
mov rdx, qword [rsp + 0xd8]
mov r8, qword [rsp + 0xe0]
mov rcx, r8
sub rcx, rdx
cmp rax, rcx
ja 0x1400821ce
lea rcx, [rax + rdx]
mov qword [rsp + 0xd8], rcx
lea rbx, [rsp + 0xc8]
cmp r8, 0x10
cmovae rbx, qword [rsp + 0xc8]
add rbx, rdx
mov r8, rax
lea rdx, [rsp + 0x110]
mov rcx, rbx
call sub.VCRUNTIME140.dll_memmove
mov byte [rbx + rdi], 0
jmp 0x140082150
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x110]
xor r8d, r8d
mov rdx, rdi
lea rcx, [rsp + 0xc8]
call fcn.14000ad00
jmp 0x140082150
mov rcx, qword [rsp + 0x48]
call qword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
lea r8, [rsp + 0xc8]
cmp qword [rsp + 0xe0], 0x10
cmovae r8, qword [rsp + 0xc8]
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
mov rbx, 0xffffffffffffffff
mov r9d, ebx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r15d, eax
test eax, eax
jg 0x1400822d1
movzx eax, byte [rsp + 0x30]
mov byte [r14], al
mov rax, qword [rsp + 0x38]
mov qword [r14 + 8], rax
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x38], rsi
mov rdx, qword [rsp + 0xe0]
cmp rdx, 0x10
jb 0x1400822a1
inc rdx
mov rcx, qword [rsp + 0xc8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008229c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400824c9
call fcn.140101b3c
mov qword [rsp + 0xd8], rsi
mov qword [rsp + 0xe0], SafeArrayPutElement
mov byte [rsp + 0xc8], 0
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.140013d50
mov rax, r14
jmp 0x140082509
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rsi
add eax, 1
movsxd rdi, eax
je 0x1400822f9
lea r8, [rsp + 0x40]
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.140079ab0
lea r8, [rdi + rdi]
xor edx, edx
mov rcx, qword [rsp + 0x50]
call sub.VCRUNTIME140.dll_memset
lea r8, [rsp + 0xc8]
cmp qword [rsp + 0xe0], 0x10
cmovae r8, qword [rsp + 0xc8]
mov dword [rsp + 0x28], r15d
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
mov r9d, ebx
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
nop
lea rax, [rsp + 0x88]
mov qword [rsp + 0x70], rax
mov qword [rsp + 0xc0], rsi
mov qword [rsp + 0xe8], rsi
mov qword [rsp + 0xf8], rsi
mov qword [rsp + 0x100], 7
mov word [rsp + 0xe8], si
mov rdx, qword [rsp + 0x50]
inc rbx
cmp word [rdx + rbx*2], 0
jne 0x140082381
mov r8, rbx
lea rcx, [rsp + 0xe8]
call fcn.140021fb0
nop
mov byte [rsp + 0x20], 0
mov r9b, 1
lea r8, [rsp + 0x88]
lea rdx, [rsp + 0xe8]
lea rcx, [rsp + 0x78]
call fcn.14007b1f0
movzx edx, byte [rsp + 0x30]
movzx ecx, byte [rax]
mov byte [rsp + 0x30], cl
mov byte [rax], dl
lea rcx, [rax + 8]
mov rax, qword [rsp + 0x38]
mov r8, qword [rcx]
mov qword [rsp + 0x38], r8
mov qword [rcx], rax
call fcn.140013d50
nop
mov rdx, qword [rsp + 0x100]
cmp rdx, 8
jb 0x140082432
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0xe8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008242c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008242c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140101b3c
nop
jmp 0x14008243b
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x14008248f
mov rax, qword [rsp + 0x60]
sub rax, rcx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14008247c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x14008247c
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140101b3c
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x50], xmm0
mov qword [rsp + 0x60], rsi
mov rdx, qword [rsp + 0xe0]
cmp rdx, 0x10
jb 0x1400824d6
inc rdx
mov rcx, qword [rsp + 0xc8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1400824d0
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1400824d0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140101b3c
nop
jmp 0x1400824df
xor esi, esi
movzx eax, byte [rsp + 0x30]
mov byte [r14], al
mov rax, qword [rsp + 0x38]
mov qword [r14 + 8], rax
mov byte [rsp + 0x30], 0
mov qword [rsp + 0x38], rsi
xor edx, edx
lea rcx, [rsp + 0x38]
call fcn.140013d50
mov rax, r14
mov rcx, qword [rsp + 0x2110]
xor rcx, rsp
call fcn.140102140
lea r11, [rsp + 0x2120]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rdi
ret