Function at 0x140026224
Capabilities:
Get file size

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x438]
sub rsp, 0x538
mov rax, qword [0x14007b108]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov rax, qword [rbp + 0x4b8]
xor r13d, r13d
mov qword [rbp - 0x58], r8
mov rdi, rcx
mov qword [rbp - 0x28], rdx
mov ebx, r13d
mov qword [rbp - 0x38], rcx
xor edx, edx
mov r8d, 0x400
mov qword [rsp + 0x70], rbx
lea rcx, [rbp + 0x20]
mov qword [rbp - 0x40], r9
mov r14, r9
mov qword [rbp - 0x10], rax
mov r12d, r13d
mov dword [rsp + 0x5c], r13d
mov dword [rbp - 0x48], r13d
mov r15d, r13d
mov esi, r13d
mov qword [rbp - 0x50], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x4c], r13d
call sub.msvcrt.dll_memset
mov dword [rsp + 0x40], r13d
xorps xmm0, xmm0
xorps xmm1, xmm1
movups xmmword [rbp - 8], xmm0
movups xmmword [rbp + 8], xmm0
movups xmmword [rbp - 0x78], xmm1
movups xmmword [rbp - 0x68], xmm1
test rdi, rdi
je 0x140026809
mov rax, qword [rbp - 0x58]
cmp rax, 0xffffffffffffffff
je 0x140026809
cmp r14, 0xffffffffffffffff
je 0x140026809
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
je 0x140026809
cmp qword [rsp + 0x50], rbx
je 0x140026809
mov rax, qword [rdi + 0x180]
lea rcx, [rsp + 0x4c]
mov qword [rbp - 0x30], rax
lea r9, [rsp + 0x68]
mov rax, qword [rdi + 0x188]
lea r8, [rsp + 0x44]
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x60]
mov rcx, rdi
mov qword [rbp - 0x80], rax
call fcn.140007b84
test eax, eax
jne 0x14002636b
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x60], rbx
je 0x1400267f3
cmp qword [rsp + 0x68], rbx
je 0x1400267f3
mov ecx, dword [rsp + 0x44]
mov r8d, dword [rbp + 0x4a0]
mov dword [rsp + 0x48], ecx
cmp ecx, r8d
jb 0x1400267f3
cmp dword [rsp + 0x4c], r8d
jb 0x1400267f3
mov rcx, rdi
call fcn.1400077c8
cmp eax, 1
je 0x1400263be
mov rcx, rdi
call fcn.1400077c8
cmp eax, 7
jne 0x1400263c3
mov dword [rsp + 0x48], r8d
mov rdi, qword [rsp + 0x50]
lea rax, [rdi - 1]
add rax, r8
cqo
idiv r8
cmp dword [rsp + 0x54], ebx
mov rcx, rax
mov eax, 4
lea edx, [rax + 4]
cmovne eax, edx
mov edx, 0xffffffff
mov dword [rsp + 0x78], eax
sub ecx, 1
je 0x140026488
mov edi, eax
mov eax, ecx
imul rdi, rax
mov qword [rbp - 0x48], rdi
cmp rdi, rdx
ja 0x140026650
cmp edi, ecx
jbe 0x1400267f3
cmp edi, 0x400
ja 0x140026423
lea r13, [rbp + 0x20]
jmp 0x14002644f
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, edi
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
nop dword [rax + rax]
mov r13, rax
test rax, rax
je 0x1400267f3
mov rax, qword [rbp - 0x80]
lea r9, [rbp - 0x78]
mov r8d, edi
mov qword [rbp - 0x60], rax
mov rdx, r13
mov dword [rsp + 0x20], 1
mov rcx, r14
call fcn.14001f03c
test eax, eax
je 0x1400267bf
mov ebx, edi
mov r15d, edi
mov rdi, qword [rsp + 0x50]
mov qword [rsp + 0x70], rbx
mov r14, r15
mov r12d, 1
test rdi, rdi
je 0x14002674b
mov ecx, dword [rsp + 0x48]
cmp rcx, rdi
cmovg ecx, edi
mov dword [rsp + 0x48], ecx
test rsi, rsi
je 0x14002650a
movabs rax, 0x6666666666666667
imul rsi
sar rdx, 0x16
mov rax, rdx
shr rax, 0x3f
add rdx, rax
lea rcx, [rdx + rdx*4]
shl rcx, 0x15
cmp rsi, rcx
jne 0x140026506
mov rcx, qword [rbp - 0x38]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x948e
call fcn.140019380
mov ecx, 0xffffffff
cmp eax, ecx
jne 0x140026506
mov ecx, 0x4d3
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
xor r12d, r12d
mov ecx, dword [rsp + 0x48]
test r12d, r12d
je 0x14002673b
mov eax, dword [rbp - 0x4c]
lea r9, [rbp - 8]
mov rdx, qword [rsp + 0x60]
mov r8d, ecx
mov rcx, qword [rbp - 0x58]
and qword [rbp - 8], 0
and qword [rbp], 0
and dword [rsp + 0x20], 0
mov dword [rbp + 0xc], eax
mov rax, qword [rbp - 0x30]
mov qword [rbp + 0x10], rax
mov dword [rbp + 8], esi
call fcn.14001f03c
test eax, eax
je 0x14002673b
mov ecx, dword [rsp + 0x48]
xor r11d, r11d
add rsi, rcx
mov dword [rsp + 0x4c], r11d
sub rdi, rcx
mov dword [rsp + 0x58], ecx
xor r8d, r8d
mov qword [rbp - 0x18], rcx
mov qword [rbp - 0x50], rsi
mov edx, ecx
test ecx, ecx
je 0x1400266c8
mov ebx, r8d
mov r12d, dword [rbp + 0x4a0]
cmp ecx, r12d
cmovb r12d, ecx
and dword [rsp + 0x44], 0
mov ecx, dword [rbp + 0x4b0]
test ecx, ecx
je 0x1400265e7
mov r9d, r11d
xor r8d, r8d
sub r9, rdx
mov r10d, r12d
add r9, rsi
add r10, r9
test ecx, ecx
je 0x1400265e7
mov rdx, qword [rbp + 0x4a8]
cmp r10, qword [rdx + 8]
mov rcx, r10
mov rax, r9
cmovae rcx, qword [rdx + 8]
cmp r9, qword [rdx]
cmovbe rax, qword [rdx]
cmp rax, rcx
jb 0x14002665a
inc r8d
add rdx, 0x10
cmp r8d, dword [rbp + 0x4b0]
jb 0x1400265b8
mov r9, qword [rsp + 0x68]
mov r8d, r12d
mov rdx, qword [rsp + 0x60]
mov eax, ebx
mov qword [rbp - 0x20], rax
add r9, rax
mov ecx, r11d
lea rax, [rsp + 0x44]
mov qword [rsp + 0x28], rax
add rdx, rcx
mov rax, qword [rbp - 0x28]
mov rcx, rax
mov dword [rsp + 0x20], r12d
mov rax, qword [rax + 0x10]
call qword [0x14006c9d0]
test eax, eax
jne 0x14002665e
mov rax, qword [rbp - 0x20]
mov r11d, dword [rsp + 0x4c]
mov rdx, qword [rsp + 0x60]
mov ecx, r11d
add rdx, rcx
mov r8d, r12d
mov rcx, qword [rsp + 0x68]
add rcx, rax
call sub.msvcrt.dll_memcpy
mov eax, r12d
jmp 0x140026662
mov edi, 0x216
jmp 0x1400267f7
mov eax, ebx
jmp 0x140026630
mov eax, dword [rsp + 0x44]
mov r11d, dword [rsp + 0x4c]
add ebx, eax
mov ecx, dword [rsp + 0x58]
add r11d, r12d
sub ecx, r12d
mov dword [rsp + 0x4c], r11d
add r14, rax
mov dword [rsp + 0x58], ecx
test rdi, rdi
jne 0x140026688
test ecx, ecx
je 0x1400266b0
mov r8d, dword [rsp + 0x5c]
mov rax, r14
sub rax, r15
cmp dword [rsp + 0x78], 4
jne 0x1400266a1
mov dword [r13 + r8*4], eax
jmp 0x1400266a6
mov qword [r13 + r8*8], rax
inc r8d
mov dword [rsp + 0x5c], r8d
test ecx, ecx
mov rdx, qword [rbp - 0x18]
jne 0x14002657e
mov dword [rsp + 0x44], ebx
mov rbx, qword [rsp + 0x70]
mov r8d, dword [rsp + 0x44]
mov eax, dword [rsp + 0x74]
and qword [rbp - 0x78], 0
and qword [rbp - 0x70], 0
mov dword [rbp - 0x64], eax
mov rax, qword [rbp - 0x80]
mov qword [rbp - 0x60], rax
mov eax, r8d
mov dword [rbp - 0x68], ebx
add rbx, rax
mov qword [rsp + 0x70], rbx
cmp rbx, qword [rsp + 0x50]
jg 0x14002672e
mov rdx, qword [rsp + 0x68]
lea r9, [rbp - 0x78]
mov rcx, qword [rbp - 0x40]
mov dword [rsp + 0x20], 1
call fcn.14001f03c
mov r12d, eax
test eax, eax
jne 0x140026491
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
jmp 0x1400267c3
mov edi, 0xdf
xor r12d, r12d
jmp 0x1400267c3
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
jmp 0x140026733
test r12d, r12d
je 0x1400267bf
test r13, r13
je 0x1400267a2
mov rax, qword [rbp - 0x80]
lea r9, [rbp - 0x78]
mov r8d, dword [rbp - 0x48]
mov rdx, r13
mov rcx, qword [rbp - 0x40]
and qword [rbp - 0x78], 0
and qword [rbp - 0x70], 0
and dword [rbp - 0x68], 0
and dword [rbp - 0x64], 0
mov qword [rbp - 0x60], rax
mov dword [rsp + 0x20], 1
call fcn.14001f03c
mov r12d, eax
test eax, eax
jne 0x1400267ad
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
jmp 0x1400267a6
mov edi, dword [rsp + 0x40]
test r12d, r12d
je 0x1400267c3
jmp 0x1400267b1
mov edi, dword [rsp + 0x40]
mov rax, qword [rbp - 0x10]
test rax, rax
je 0x1400267c3
mov qword [rax], rbx
jmp 0x1400267c3
mov edi, dword [rsp + 0x40]
test r13, r13
je 0x1400267f7
lea rax, [rbp + 0x20]
cmp r13, rax
je 0x1400267f7
call qword [sym.imp.KERNEL32.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_HeapFree]
nop dword [rax + rax]
jmp 0x1400267f7
mov edi, dword [rsp + 0x40]
test edi, edi
je 0x140026809
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
mov eax, r12d
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.140068870
add rsp, 0x538
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret