Function at 0x1800829bc
Capabilities:
Read file on windows

Disassembly:
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x1180
call fcn.1800b3cb0
sub rsp, rax
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov qword [rsp + 0x11b8], rbx
mov qword [rsp + 0x11c0], rbp
mov qword [rsp + 0x11c8], rsi
mov rax, qword [0x180101090]
xor rax, rsp
mov qword [rsp + 0x1170], rax
mov rbx, rcx
xor r12d, r12d
mov dword [rsp + 0x50], r12d
lea r14, [0x180108a88]
cmp dword [0x180106a44], r12d
je 0x180082a34
mov dword [0x180106a44], r12d
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov qword [rsp + 0x110], 7
mov qword [rsp + 0x108], r12
mov word [rsp + 0xf8], r12w
xor eax, eax
or rcx, 0xffffffffffffffff
lea rbp, [0x180108d50]
mov rdi, rbp
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbp
lea rcx, [rsp + 0xf0]
call fcn.18000f510
nop
lea rsi, [rsp + 0xf8]
mov rcx, qword [rsp + 0xf8]
mov rdx, qword [rsp + 0x110]
mov r13d, 8
cmp rdx, r13
cmovae rsi, rcx
cmp rsi, r12
je 0x180082ada
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x180082ada
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
mov rdi, qword [rsp + 0x108]
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180082af7
call fcn.18009a80c
mov rdx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0x108]
mov rcx, qword [rsp + 0xf8]
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x60], xmm0
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rsi, [rax + rdi*2]
cmp rsi, r12
je 0x180082b58
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x180082b58
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180082b75
call fcn.18009a80c
mov rdx, qword [rsp + 0x110]
mov rdi, qword [rsp + 0x108]
mov rcx, qword [rsp + 0xf8]
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0xd0], xmm0
lea rsi, [rsp + 0xf8]
cmp rdx, r13
cmovae rsi, rcx
cmp rsi, r12
je 0x180082bd5
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
cmp rax, rsi
ja 0x180082bd5
lea rax, [rsp + 0xf8]
cmp rdx, r13
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x180082bda
call fcn.18009a80c
lea rax, [rsp + 0xf0]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rax, [fcn.18009a62c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xe0]
call fcn.1800149b0
mov edx, dword [0x18010e3e4]
lea r15, [0x18010d9f0]
test dl, 1
jne 0x180082ca0
or edx, 1
mov dword [0x18010e3e4], edx
mov rcx, r13
call fcn.18009a960
cmp rax, r12
je 0x180082c4f
mov qword [rax], r15
jmp 0x180082c52
mov rax, r12
mov qword [0x18010d9f0], rax
mov rcx, r15
call fcn.18005673c
mov qword [0x18010da20], rax
mov byte [rax + 0x69], 1
mov rax, qword [0x18010da20]
mov qword [rax + 8], rax
mov rax, qword [0x18010da20]
mov qword [rax], rax
mov rax, qword [0x18010da20]
mov qword [rax + 0x10], rax
mov qword [0x18010da28], r12
lea rcx, [0x1800c9df4]
call fcn.18009a3f8
nop
mov dword [rsp + 0x98], r12d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x9c]
call fcn.18009e990
lea r8, [rsp + 0x98]
xor edx, edx
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp eax, r12d
jne 0x180082d17
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
lea r8d, [rsi - 8]
lea rdx, str.default
mov rcx, rbx
call fcn.18000f0f0
nop
cmp qword [rsp + 0x110], r13
jb 0x180082d0f
mov rcx, qword [rsp + 0xf8]
call fcn.18009a864
mov rax, rbx
jmp 0x180083062
mov qword [rsp + 0x60], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea r8, [rsp + 0xf0]
lea rdx, [rsp + 0x40]
mov rcx, r15
call fcn.180083308
mov rbp, qword [0x18010da20]
mov rdi, qword [rsp + 0x40]
cmp rdi, r12
je 0x180082d55
cmp rdi, qword [0x18010d9f0]
je 0x180082d5a
call fcn.18009a80c
mov rsi, qword [rsp + 0x48]
cmp rsi, rbp
je 0x180082e09
cmp rdi, r12
jne 0x180082d77
call fcn.18009a80c
mov r11, r12
jmp 0x180082d7a
mov r11, qword [rdi]
cmp rsi, qword [r11 + 0x30]
jne 0x180082d85
call fcn.18009a80c
mov rax, qword [rsi + 0x40]
cmp rax, qword [rsp + 0xac]
jne 0x180082e09
cmp rdi, r12
jne 0x180082da2
call fcn.18009a80c
mov rdx, r12
jmp 0x180082da5
mov rdx, qword [rdi]
cmp rsi, qword [rdx + 0x30]
jne 0x180082db0
call fcn.18009a80c
lea rdx, [rsi + 0x48]
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasb al, byte [rdi]
not rcx
lea r8, [rcx - 1]
mov rcx, rbx
call fcn.18000f0f0
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0x110], r13
jb 0x180082e01
mov rcx, qword [rsp + 0xf8]
call fcn.18009a864
mov rax, rbx
jmp 0x180083062
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
lea rcx, [rsp + 0xf8]
cmp qword [rsp + 0x110], r13
cmovae rcx, qword [rsp + 0xf8]
mov qword [rsp + 0x30], r12
mov dword [rsp + 0x28], r12d
mov r8d, 3
mov dword [rsp + 0x20], r8d
xor r9d, r9d
mov edx, 0x80000000
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x60], rax
cmp rax, r12
je 0x18008300e
cmp rax, 0xffffffffffffffff
je 0x18008300e
mov byte [rsp + 0x170], r12b
xor edx, edx
mov r8d, 0xfff
lea rcx, [rsp + 0x171]
call fcn.18009e990
mov qword [rsp + 0x20], r12
lea r9, [rsp + 0x50]
mov esi, 0x1000
mov r8d, esi
lea rdx, [rsp + 0x170]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov r8d, esi
lea rdx, [rsp + 0x170]
lea rcx, [rsp + 0x70]
call fcn.180081da0
nop
mov r9d, 0xc
mov r8, r13
lea rdx, [rsp + 0x118]
mov rcx, rax
call fcn.18000cbb0
nop
cmp qword [rsp + 0x90], 0x10
jb 0x180082eee
mov rcx, qword [rsp + 0x78]
call fcn.18009a864
mov esi, 0xf
mov qword [rsp + 0x90], rsi
mov qword [rsp + 0x88], r12
mov byte [rsp + 0x78], r12b
mov qword [rsp + 0x40], r14
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
xor edx, edx
lea r8d, [rsi + 0x15]
lea rcx, [rsp + 0x144]
call fcn.18009e990
mov r11, qword [rsp + 0xac]
mov qword [rsp + 0x140], r11
lea rdx, [rsp + 0x120]
cmp qword [rsp + 0x138], 0x10
cmovae rdx, qword [rsp + 0x120]
lea r8d, [rsi + 0x11]
lea rcx, [rsp + 0x148]
call qword [sym.imp.KERNEL32.dll_lstrcpynA]
lea rdx, [rsp + 0xf0]
mov rcx, r15
call fcn.180083094
mov rcx, rax
lea rdx, [rsp + 0x140]
lea r8d, [rsi + 0x19]
call fcn.18009ab10
nop
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0x118]
mov rcx, rbx
call fcn.18000d880
nop
cmp qword [rsp + 0x138], 0x10
jb 0x180082fd0
mov rcx, qword [rsp + 0x120]
call fcn.18009a864
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], r12
mov byte [rsp + 0x120], r12b
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r13
jb 0x180083009
mov rcx, qword [rsp + 0xf8]
call fcn.18009a864
mov rax, rbx
jmp 0x180083062
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r12
mov byte [rbx + 8], r12b
lea r8d, [rsi - 8]
lea rdx, str.default
mov rcx, rbx
call fcn.18000f0f0
nop
cmp rdi, 0xffffffffffffffff
je 0x180083048
cmp rdi, r12
je 0x180083048
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x110], r13
jb 0x18008305f
mov rcx, qword [rsp + 0xf8]
call fcn.18009a864
mov rax, rbx
mov rcx, qword [rsp + 0x1170]
xor rcx, rsp
call fcn.180099fe0
lea r11, [rsp + 0x1180]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret