Function at 0x140043a38
Capabilities:
Get file size

Disassembly:
mov rax, rsp
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x138]
sub rsp, 0x210
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x1402f2208]
xor rax, rsp
mov qword [rbp + 0x108], rax
mov rdi, rcx
xor r13d, r13d
mov qword [rsp + 0x40], r13
lea rdx, [rsp + 0x40]
mov rcx, qword [rcx + 8]
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140043ec1
mov eax, dword [rdi + 0x3c]
cmp qword [rsp + 0x40], rax
jle 0x140043ec1
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rsi, 0xffffffffffffffff
mov qword [rdi + 8], rsi
mov eax, dword [rdi + 0x40]
lea rbx, [rdi + 0x10]
mov r12d, 0x8000080
and al, 1
mov edx, r12d
mov ecx, 0x88000080
cmp al, 1
cmovne edx, ecx
lea r14d, [r13 + 8]
cmp qword [rbx + 0x18], r14
jb 0x140043ae5
mov rcx, qword [rbx]
jmp 0x140043ae8
mov rcx, rbx
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], edx
mov eax, 4
mov dword [rsp + 0x20], eax
xor r9d, r9d
lea r15d, [rax + 3]
mov r8d, r15d
mov edx, eax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rdi + 8], rax
cmp rax, rsi
je 0x140043ec1
mov qword [rsp + 0x40], r13
lea rdx, [rsp + 0x40]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x140043ec1
mov eax, dword [rdi + 0x3c]
cmp qword [rsp + 0x40], rax
jle 0x140043ec1
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov qword [rdi + 8], rsi
mov qword [rbp + 0x30], r15
mov qword [rbp + 0x28], r13
mov word [rbp + 0x18], r13w
cmp qword [rbx + 0x18], r14
jb 0x140043b68
mov rdx, qword [rbx]
jmp 0x140043b6b
mov rdx, rbx
lea rcx, [rbp + 0x18]
call fcn.140031f54
nop
lea rdx, [rdi + 0x38]
lea rcx, [rbp + 0xb8]
call fcn.140040d04
nop
mov r8, rax
mov rdx, rbx
lea rcx, [rbp + 0xe0]
call fcn.140043424
nop
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x50], r13
mov word [rbp - 0x60], r13w
cmp qword [rax + 0x18], r14
jb 0x140043baf
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp - 0x60]
call fcn.140031f54
nop
cmp qword [rbp + 0xf8], r14
jb 0x140043bd1
mov rcx, qword [rbp + 0xe0]
call fcn.14005ce7c
mov qword [rbp + 0xf8], r15
mov qword [rbp + 0xf0], r13
mov word [rbp + 0xe0], r13w
cmp qword [rbp + 0xd0], r14
jb 0x140043bfc
mov rcx, qword [rbp + 0xb8]
call fcn.14005ce7c
mov qword [rbp + 0xd0], r15
mov qword [rbp + 0xc8], r13
mov word [rbp + 0xb8], r13w
lea rcx, [rbp - 0x60]
call fcn.140043740
mov r11d, dword [rdi + 0x38]
dec r11d
mov dword [rsp + 0x40], r11d
cmp r11d, 1
jb 0x140043d9e
lea rdx, [rsp + 0x40]
lea rcx, [rbp + 0x68]
call fcn.140040d04
nop
mov r8, rax
mov rdx, rbx
lea rcx, [rbp + 0x90]
call fcn.140043424
nop
mov qword [rbp + 8], r15
mov qword [rbp], r13
mov word [rbp - 0x10], r13w
cmp qword [rax + 0x18], r14
jb 0x140043c69
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.140031f54
nop
cmp qword [rbp + 0xa8], r14
jb 0x140043c8b
mov rcx, qword [rbp + 0x90]
call fcn.14005ce7c
mov qword [rbp + 0xa8], r15
mov qword [rbp + 0xa0], r13
mov word [rbp + 0x90], r13w
cmp qword [rbp + 0x80], r14
jb 0x140043cb3
mov rcx, qword [rbp + 0x68]
call fcn.14005ce7c
mov qword [rbp + 0x80], r15
mov qword [rbp + 0x78], r13
mov word [rbp + 0x68], r13w
lea rcx, [rbp - 0x10]
call fcn.1400406d0
mov esi, dword [rsp + 0x40]
test al, al
je 0x140043d80
lea eax, [rsi + 1]
mov dword [rsp + 0x40], eax
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.140040d04
nop
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x78]
call fcn.140043424
nop
mov qword [rbp + 0x58], r15
mov qword [rbp + 0x50], r13
mov word [rbp + 0x40], r13w
cmp qword [rax + 0x18], r14
jb 0x140043d16
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp + 0x40]
call fcn.140031f54
nop
cmp qword [rbp - 0x70], r14
jb 0x140043d33
mov rcx, qword [rsp + 0x78]
call fcn.14005ce7c
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x78], r13
mov word [rsp + 0x78], r13w
cmp qword [rsp + 0x68], r14
jb 0x140043d52
mov rcx, qword [rsp + 0x50]
call fcn.14005ce7c
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r13
mov word [rsp + 0x50], r13w
lea rdx, [rbp + 0x40]
lea rcx, [rbp - 0x10]
call fcn.14004384c
nop
cmp qword [rbp + 0x58], r14
jb 0x140043d80
mov rcx, qword [rbp + 0x40]
call fcn.14005ce7c
nop
cmp qword [rbp + 8], r14
jb 0x140043d8f
mov rcx, qword [rbp - 0x10]
call fcn.14005ce7c
dec esi
mov dword [rsp + 0x40], esi
cmp esi, 1
jae 0x140043c31
mov dword [rsp + 0x40], 1
lea rdx, [rsp + 0x40]
lea rcx, [rsp + 0x78]
call fcn.140042ca4
nop
mov r8, rax
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.140043424
nop
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x28], r13
mov word [rbp - 0x38], r13w
cmp qword [rax + 0x18], r14
jb 0x140043ddd
mov rax, qword [rax]
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.140031f54
nop
cmp qword [rsp + 0x68], r14
jb 0x140043dfb
mov rcx, qword [rsp + 0x50]
call fcn.14005ce7c
mov qword [rsp + 0x68], r15
mov qword [rsp + 0x60], r13
mov word [rsp + 0x50], r13w
cmp qword [rbp - 0x70], r14
jb 0x140043e1b
mov rcx, qword [rsp + 0x78]
call fcn.14005ce7c
mov qword [rbp - 0x70], r15
mov qword [rbp - 0x78], r13
mov word [rsp + 0x78], r13w
lea rdx, [rbp - 0x38]
lea rcx, [rbp + 0x18]
call fcn.14004384c
mov r11d, dword [rdi + 0x40]
and r11b, 1
cmp r11b, 1
mov eax, 0x88000080
cmovne r12d, eax
cmp qword [rbx + 0x18], r14
jb 0x140043e54
mov rbx, qword [rbx]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r12d
mov edx, 4
mov dword [rsp + 0x20], edx
xor r9d, r9d
mov r8d, r15d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rdi + 8], rax
cmp qword [rbp - 0x20], r14
jb 0x140043e89
mov rcx, qword [rbp - 0x38]
call fcn.14005ce7c
mov qword [rbp - 0x20], r15
mov qword [rbp - 0x28], r13
mov word [rbp - 0x38], r13w
cmp qword [rbp - 0x48], r14
jb 0x140043ea5
mov rcx, qword [rbp - 0x60]
call fcn.14005ce7c
mov qword [rbp - 0x48], r15
mov qword [rbp - 0x50], r13
mov word [rbp - 0x60], r13w
cmp qword [rbp + 0x30], r14
jb 0x140043ec1
mov rcx, qword [rbp + 0x18]
call fcn.14005ce7c
mov rcx, qword [rbp + 0x108]
xor rcx, rsp
call fcn.1401c0410
lea r11, [rsp + 0x210]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret