Function at 0x45b908
Capabilities:
Read file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x280
mov qword [rsp + 0x118], 0xfffffffffffffffe
mov rax, qword [0x004bf230]
xor rax, rsp
mov qword [rsp + 0x270], rax
mov rsi, r8
mov qword [rsp + 0x68], rdx
mov rbx, rcx
mov qword [rsp + 0x150], rcx
mov qword [rsp + 0x148], r8
xor r14d, r14d
cmp qword [r8 + 0x18], r14
jne 0x45b9a4
cmp qword [rcx + 0x20], 8
jb 0x45b96d
mov rcx, qword [rcx + 8]
call fcn.00443d3c
mov r13d, 7
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r14
mov word [rbx + 8], r14w
cmp qword [rsi + 0x20], 8
jb 0x45b990
mov rcx, qword [rsi + 8]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r14
mov word [rsi + 8], r14w
xor al, al
jmp 0x45c10b
cmp qword [r8 + 0x20], 8
jb 0x45b9b5
lea r12, [r8 + 8]
mov rcx, qword [r12]
jmp 0x45b9bc
lea r12, [r8 + 8]
mov rcx, r12
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r13, rax
mov qword [rsp + 0x58], rax
cmp rax, 0xffffffffffffffff
jne 0x45baf8
cmp qword [rsi + 0x20], 8
jb 0x45ba02
mov rdx, qword [r12]
jmp 0x45ba05
mov rdx, r12
lea rax, [rsp + 0x168]
mov qword [rsp + 0x160], rax
lea rcx, [rsp + 0x160]
call fcn.00459e40
nop
mov r13d, 7
mov qword [rsp + 0x140], r13
mov qword [rsp + 0x138], r14
mov word [rsp + 0x128], r14w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdx, qword [rsp + 0x160]
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rcx, [rsp + 0x120]
call fcn.00404e54
nop
cmp qword [rsp + 0x140], 8
jb 0x45ba83
mov rcx, qword [rsp + 0x128]
call fcn.00443d3c
mov qword [rsp + 0x140], r13
mov qword [rsp + 0x138], r14
mov word [rsp + 0x128], r14w
lea rax, [rsp + 0x168]
mov rcx, qword [rsp + 0x160]
cmp rcx, rax
je 0x45bab7
call fcn.0044460c
nop
cmp qword [rbx + 0x20], 8
jb 0x45bac7
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r14
mov word [rbx + 8], r14w
cmp qword [rsi + 0x20], 8
jb 0x45bae4
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r14
mov word [r12], r14w
xor al, al
jmp 0x45c10b
mov ecx, 0x800
call fcn.004444b0
mov r14, rax
mov qword [rsp + 0x50], rax
mov edi, 0x2000
mov rcx, rdi
call fcn.004444b0
mov r15, rax
mov qword [rsp + 0x60], rax
mov rcx, rdi
call fcn.004444b0
mov rdi, rax
xor eax, eax
mov qword [rdi], rax
and qword [rsp + 0x20], rax
lea r9, [rsp + 0x40]
mov r8d, 0x7fe
mov rdx, r14
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
lea r13d, [rdx + 7]
cmp eax, edx
je 0x45c090
mov eax, dword [rsp + 0x40]
cmp eax, edx
jbe 0x45c090
mov byte [rax + r14], dl
mov eax, dword [rsp + 0x40]
inc eax
mov byte [rax + r14], dl
mov r8, r14
mov edx, 0x1000
mov rcx, rdi
call fcn.00459d70
test eax, eax
js 0x45c038
mov qword [rsp + 0x48], rdi
lea rdx, [0x0049fba8]
mov rcx, rdi
call fcn.00445330
mov r14, rax
test rax, rax
je 0x45be12
xor r15d, r15d
mov word [r14], r15w
add r14, 4
mov qword [rsp + 0xc8], r15
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], r15
mov dword [rsp + 0xe0], r15d
mov dword [rsp + 0xe8], r15d
mov dword [rsp + 0xec], r15d
mov dword [rsp + 0xf0], 1
mov dword [rsp + 0xc0], r15d
cmp qword [rbx + 0x20], 8
jb 0x45bc06
mov rdx, qword [rbx + 8]
jmp 0x45bc0a
lea rdx, [rbx + 8]
mov r8d, 1
lea rcx, [rsp + 0xc0]
call fcn.00403b94
cmp eax, r15d
jne 0x45bf0f
mov qword [rsp + 0x88], r15
mov qword [rsp + 0x90], r15
mov qword [rsp + 0x98], r15
mov qword [rsp + 0xa0], r15
mov qword [rsp + 0xa8], r15
mov dword [rsp + 0xb0], r15d
mov dword [rsp + 0x70], r15d
mov qword [rsp + 0xb8], r15
or r8d, 0xffffffff
mov edx, pe_nt_image_headers64
lea rcx, [rsp + 0x98]
call fcn.00406198
mov qword [rsp + 0x78], r15
mov qword [rsp + 0x80], r15
xor r9d, r9d
lea r8, [rsp + 0x70]
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0xc0]
call fcn.00403d78
cmp eax, r15d
je 0x45bd9e
mov qword [rsp + 0x100], r15
mov qword [rsp + 0x108], r15
mov qword [rsp + 0x110], r15
xor ecx, ecx
cmp dword [rsp + 0x70], ecx
jbe 0x45bd7b
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x48], rax
cmp r15d, dword [rsp + 0x70]
jae 0x45bf04
mov rdx, qword [rax]
mov r8, qword [rax + 8]
mov qword [rsp + 0x140], r13
mov qword [rsp + 0x138], rcx
mov word [rsp + 0x128], cx
sub r8, rdx
sar r8, 1
lea rcx, [rsp + 0x120]
call fcn.00404e54
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0xf8]
call fcn.0045b2a4
nop
cmp qword [rsp + 0x140], 8
jb 0x45bd45
mov rcx, qword [rsp + 0x128]
call fcn.00443d3c
mov qword [rsp + 0x140], r13
xor ecx, ecx
mov qword [rsp + 0x138], rcx
mov word [rsp + 0x128], cx
inc r15d
mov rax, qword [rsp + 0x48]
add rax, 0x10
mov qword [rsp + 0x48], rax
cmp r15d, dword [rsp + 0x70]
jb 0x45bcda
lea rdx, [rsp + 0xf8]
mov rcx, qword [rsp + 0x68]
call fcn.0045b884
nop
lea rcx, [rsp + 0xf8]
call fcn.00457188
xor r15d, r15d
mov qword [rsp + 0x48], r14
mov rcx, qword [rsp + 0x98]
cmp rcx, r15
je 0x45bdb6
call fcn.0044460c
nop
mov rcx, qword [rsp + 0x90]
call fcn.00444544
mov qword [rsp + 0x90], r15
mov rcx, qword [rsp + 0x88]
call fcn.00444544
mov qword [rsp + 0x88], r15
mov rcx, qword [rsp + 0xc8]
cmp rcx, r15
je 0x45bdf2
call fcn.0044460c
lea rdx, [0x0049fba8]
mov rcx, r14
call fcn.00445330
mov r14, rax
cmp rax, r15
jne 0x45bbae
mov r15, qword [rsp + 0x60]
xor eax, eax
mov qword [r15], rax
mov r10d, 0x1000
mov rdx, r10
mov rcx, r15
xor r14d, r14d
mov r8d, r14d
mov r9, qword [rsp + 0x48]
sub r9, r15
lea rax, [rdx + 0x7fffeffe]
cmp rax, r14
je 0x45be55
movzx eax, word [rcx + r9]
cmp ax, r14w
je 0x45be55
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x45be31
cmp rdx, r14
jne 0x45be64
sub rcx, 2
mov r8d, 0x8007007a
mov word [rcx], r14w
cmp r8d, r14d
jl 0x45bfdc
mov rdx, r10
mov rcx, rdi
mov r9d, r14d
mov r8, r15
sub r8, rdi
lea rax, [rdx + 0x7fffeffe]
cmp rax, r14
je 0x45bea4
movzx eax, word [rcx + r8]
cmp ax, r14w
je 0x45bea4
mov word [rcx], ax
add rcx, 2
sub rdx, 1
jne 0x45be80
cmp rdx, r14
jne 0x45beb3
sub rcx, 2
mov r9d, 0x8007007a
mov word [rcx], r14w
cmp r9d, r14d
jl 0x45bf80
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test al, 1
je 0x45becf
inc eax
mov r8d, 0x7fe
sub r8d, eax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x40]
mov r14, qword [rsp + 0x50]
mov rdx, r14
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor edx, edx
cmp eax, edx
je 0x45c090
jmp 0x45bb59
mov ecx, 0x80004005
call fcn.004066bc
nop
mov rcx, qword [rsp + 0x50]
call fcn.00444544
mov rcx, qword [rsp + 0x60]
call fcn.00444544
mov rcx, rdi
call fcn.00444544
nop
mov rcx, qword [rsp + 0xc8]
cmp rcx, r15
je 0x45bf3f
call fcn.0044460c
nop
cmp qword [rbx + 0x20], 8
jb 0x45bf4f
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r15
mov word [rbx + 8], r15w
cmp qword [rsi + 0x20], 8
jb 0x45bf6c
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r15
mov word [r12], r15w
xor al, al
jmp 0x45c10b
mov rcx, qword [rsp + 0x50]
call fcn.00444544
mov rcx, r15
call fcn.00444544
mov rcx, rdi
call fcn.00444544
nop
cmp qword [rbx + 0x20], 8
jb 0x45bfab
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r14
mov word [rbx + 8], r14w
cmp qword [rsi + 0x20], 8
jb 0x45bfc8
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r14
mov word [r12], r14w
xor al, al
jmp 0x45c10b
mov rcx, qword [rsp + 0x50]
call fcn.00444544
mov rcx, r15
call fcn.00444544
mov rcx, rdi
call fcn.00444544
nop
cmp qword [rbx + 0x20], 8
jb 0x45c007
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r14
mov word [rbx + 8], r14w
cmp qword [rsi + 0x20], 8
jb 0x45c024
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r14
mov word [r12], r14w
xor al, al
jmp 0x45c10b
mov rcx, r14
call fcn.00444544
mov rcx, r15
call fcn.00444544
mov rcx, rdi
call fcn.00444544
nop
cmp qword [rbx + 0x20], 8
jb 0x45c061
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
xor edi, edi
mov qword [rbx + 0x18], rdi
mov word [rbx + 8], di
cmp qword [rsi + 0x20], 8
jb 0x45c07f
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], rdi
mov word [r12], di
xor al, al
jmp 0x45c10b
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, r14
call fcn.00444544
mov rcx, r15
call fcn.00444544
mov rcx, rdi
call fcn.00444544
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx + 0x10]
sub rax, qword [rcx + 8]
sar rax, 5
xor r14d, r14d
cmp rax, r14
seta dil
cmp qword [rbx + 0x20], 8
jb 0x45c0de
mov rcx, qword [rbx + 8]
call fcn.00443d3c
mov qword [rbx + 0x20], r13
mov qword [rbx + 0x18], r14
mov word [rbx + 8], r14w
cmp qword [rsi + 0x20], 8
jb 0x45c0fb
mov rcx, qword [r12]
call fcn.00443d3c
mov qword [rsi + 0x20], r13
mov qword [rsi + 0x18], r14
mov word [r12], r14w
mov al, dil
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.00443d60
add rsp, 0x280
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret