Function at 0x18002d558
Capabilities:
Read file on windows

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x150
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rbp
mov rax, qword [0x1800764a0]
xor rax, rsp
mov qword [rsp + 0x140], rax
mov r13, rdx
mov rbx, rcx
xor r14d, r14d
mov dword [rsp + 0x50], r14d
mov eax, dword [0x18007afe8]
lea r12, [0x18007aec0]
test al, 1
jne 0x18002d61c
or eax, 1
mov dword [0x18007afe8], eax
lea ecx, [r14 + 8]
call fcn.18004116c
cmp rax, r14
je 0x18002d5cb
mov qword [rax], r12
jmp 0x18002d5ce
mov rax, r14
mov qword [0x18007aec0], rax
mov rcx, r12
call fcn.180031750
mov qword [0x18007aef0], rax
mov byte [rax + 0x71], 1
mov rax, qword [0x18007aef0]
mov qword [rax + 8], rax
mov rax, qword [0x18007aef0]
mov qword [rax], rax
mov rax, qword [0x18007aef0]
mov qword [rax + 0x10], rax
mov qword [0x18007aef8], r14
lea rcx, [0x18005ce48]
call fcn.180041354
nop
lea rbp, [0x18007afc0]
cmp byte [0x180078896], r14b
je 0x18002d63c
mov byte [0x180078896], r14b
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [rsp + 0x58], r14d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0x5c]
call fcn.1800432e0
lea r8, [rsp + 0x58]
xor edx, edx
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
cmp dword [rsp + 0x58], 0xffffffff
je 0x18002dbe5
test byte [rsp + 0x58], 0x10
jne 0x18002dbe5
cmp dword [rsp + 0x74], r14d
ja 0x18002dbbd
cmp dword [rsp + 0x78], 0xa00000
ja 0x18002dbbd
mov qword [rsp + 0xd8], 7
mov qword [rsp + 0xd0], r14
mov word [rsp + 0xc0], r14w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r13
lea rcx, [rsp + 0xb8]
call fcn.18000a4d0
nop
lea rsi, [rsp + 0xc0]
mov rcx, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0xd8]
cmp rdx, 8
cmovae rsi, rcx
cmp rsi, r14
je 0x18002d72c
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
cmp rax, rsi
ja 0x18002d72c
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
mov rdi, qword [rsp + 0xd0]
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18002d749
call fcn.180041018
mov rdx, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc0]
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x80], xmm0
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
lea rsi, [rax + rdi*2]
cmp rsi, r14
je 0x18002d7b0
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
cmp rax, rsi
ja 0x18002d7b0
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18002d7cd
call fcn.180041018
mov rdx, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xd0]
mov rcx, qword [rsp + 0xc0]
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x90], xmm0
lea rsi, [rsp + 0xc0]
cmp rdx, 8
cmovae rsi, rcx
cmp rsi, r14
je 0x18002d830
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
cmp rax, rsi
ja 0x18002d830
lea rax, [rsp + 0xc0]
cmp rdx, 8
cmovae rax, rcx
lea rax, [rax + rdi*2]
cmp rsi, rax
jbe 0x18002d835
call fcn.180041018
lea rax, [rsp + 0xb8]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rsi
movaps xmm0, xmmword [rsp + 0x40]
movdqa xmmword [rsp + 0x40], xmm0
lea rax, [fcn.180041588]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x80]
lea r8, [rsp + 0x90]
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0xa8]
call fcn.18000f400
mov qword [rsp + 0x80], rbp
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea r8, [rsp + 0xb8]
lea rdx, [rsp + 0x40]
mov rcx, r12
call fcn.18002fd98
mov r12, qword [0x18007aef0]
mov rbp, qword [rsp + 0x40]
cmp rbp, r14
je 0x18002d8c1
cmp rbp, qword [0x18007aec0]
je 0x18002d8c6
call fcn.180041018
mov esi, 0xf
mov rdi, qword [rsp + 0x48]
cmp rdi, r12
je 0x18002d9e5
cmp rbp, r14
jne 0x18002d8e8
call fcn.180041018
mov r11, r14
jmp 0x18002d8ec
mov r11, qword [rbp]
cmp rdi, qword [r11 + 0x30]
jne 0x18002d8f7
call fcn.180041018
mov rax, qword [rdi + 0x40]
mov qword [rsp + 0xe0], rax
mov qword [rsp + 0x108], rsi
mov qword [rsp + 0x100], r14
mov byte [rsp + 0xf0], r14b
lea rdx, [rdi + 0x48]
or r12, 0xffffffffffffffff
mov r9, r12
xor r8d, r8d
lea rcx, [rsp + 0xe8]
call fcn.180001a10
nop
mov rax, qword [rsp + 0xe0]
cmp rax, qword [rsp + 0x6c]
jne 0x18002d9cb
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
mov r9, r12
xor r8d, r8d
lea rdx, [rsp + 0xe8]
mov rcx, rbx
call fcn.180001a10
nop
cmp qword [rsp + 0x108], 0x10
jb 0x18002d985
mov rcx, qword [rsp + 0xf0]
call fcn.180041070
mov qword [rsp + 0x108], rsi
mov qword [rsp + 0x100], r14
mov byte [rsp + 0xf0], r14b
lea rcx, [0x18007afc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0xd8], 8
jb 0x18002d9c3
mov rcx, qword [rsp + 0xc0]
call fcn.180041070
mov rax, rbx
jmp 0x18002dc0b
cmp qword [rsp + 0x108], 0x10
jb 0x18002d9e9
mov rcx, qword [rsp + 0xf0]
call fcn.180041070
jmp 0x18002d9e9
or r12, 0xffffffffffffffff
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], r14
mov byte [rsp + 0x120], r14b
mov rax, qword [rsp + 0x6c]
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 7]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
mov qword [rsp + 0x40], rax
cmp rax, r14
je 0x18002db2b
cmp rax, r12
je 0x18002db2b
mov ecx, dword [rsp + 0x78]
call fcn.180042600
mov rbp, rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x50]
mov r8d, dword [rsp + 0x78]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, r14d
je 0x18002db23
mov ecx, dword [rsp + 0x78]
cmp dword [rsp + 0x50], ecx
jne 0x18002db23
mov r8, rcx
mov qword [rsp + 0x100], rsi
mov qword [rsp + 0xf8], r14
mov byte [rsp + 0xe8], r14b
mov rdx, rbp
lea rcx, [rsp + 0xe0]
call fcn.180001c90
nop
mov r9, r12
xor r8d, r8d
lea rdx, [rsp + 0xe0]
lea rcx, [rsp + 0x118]
call fcn.180001a10
nop
cmp qword [rsp + 0x100], 0x10
jb 0x18002daed
mov rcx, qword [rsp + 0xe8]
call fcn.180041070
lea rdx, [rsp + 0xb8]
lea rcx, [0x18007aec0]
call fcn.18002f97c
mov rcx, qword [rsp + 0x110]
mov qword [rax], rcx
lea rcx, [rax + 8]
mov r9, r12
xor r8d, r8d
lea rdx, [rsp + 0x118]
call fcn.180001a10
mov rcx, rbp
call fcn.1800425c0
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
mov r9, r12
xor r8d, r8d
lea rdx, [rsp + 0x118]
mov rcx, rbx
call fcn.180001a10
nop
cmp rdi, r12
je 0x18002db62
cmp rdi, r14
je 0x18002db62
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rsp + 0x138], 0x10
jb 0x18002db7a
mov rcx, qword [rsp + 0x120]
call fcn.180041070
mov qword [rsp + 0x138], rsi
mov qword [rsp + 0x130], r14
mov byte [rsp + 0x120], r14b
lea rcx, [0x18007afc0]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop
cmp qword [rsp + 0xd8], 8
jb 0x18002dbb8
mov rcx, qword [rsp + 0xc0]
call fcn.180041070
mov rax, rbx
jmp 0x18002dc0b
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
xor r8d, r8d
lea rdx, [0x1800602d8]
mov rcx, rbx
call fcn.180001c90
mov rax, rbx
jmp 0x18002dc0b
mov esi, 0xf
mov qword [rbx + 0x20], rsi
mov qword [rbx + 0x18], r14
mov byte [rbx + 8], r14b
xor r8d, r8d
lea rdx, [0x1800602d8]
mov rcx, rbx
call fcn.180001c90
mov rax, rbx
mov rcx, qword [rsp + 0x140]
xor rcx, rsp
call fcn.180040bb0
lea r11, [rsp + 0x150]
mov rbx, qword [r11 + 0x40]
mov rbp, qword [r11 + 0x48]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret