Function at 0x1400151f4
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 [0x14006c080]
xor rax, rsp
mov qword [rbp + 0x420], rax
mov rax, qword [rbp + 0x4b8]
xor r13d, r13d
mov qword [rbp - 0x58], r8
mov rbx, rcx
mov qword [rbp - 0x28], rdx
mov r8d, 0x400
mov qword [rbp - 0x38], rcx
xor edx, edx
lea rcx, [rbp + 0x20]
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 edi, r13d
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x50], r13
mov r14, r9
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x68], r13
mov dword [rsp + 0x44], r13d
mov dword [rsp + 0x4c], r13d
mov qword [rbp - 0x40], r9
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor edx, edx
mov dword [rsp + 0x40], r13d
lea r8d, [r13 + 0x20]
lea rcx, [rbp - 8]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor edx, edx
lea r8d, [r13 + 0x20]
lea rcx, [rbp - 0x78]
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
test rbx, rbx
je 0x1400157e1
mov rax, qword [rbp - 0x58]
cmp rax, 0xffffffffffffffff
je 0x1400157e1
cmp r14, 0xffffffffffffffff
je 0x1400157e1
lea rdx, [rsp + 0x50]
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileSizeEx]
nop dword [rax + rax]
test eax, eax
je 0x1400157e1
cmp qword [rsp + 0x50], r13
je 0x1400157e1
mov rax, qword [rbx + 0x180]
lea rcx, [rsp + 0x4c]
mov qword [rbp - 0x30], rax
lea r9, [rsp + 0x68]
mov rax, qword [rbx + 0x188]
lea r8, [rsp + 0x44]
mov qword [rsp + 0x20], rcx
lea rdx, [rsp + 0x60]
mov rcx, rbx
mov qword [rbp - 0x80], rax
call 0x14000a1e8
test eax, eax
jne 0x140015343
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov dword [rsp + 0x40], eax
cmp qword [rsp + 0x60], rsi
je 0x1400157cb
cmp qword [rsp + 0x68], rsi
je 0x1400157cb
mov ecx, dword [rsp + 0x44]
mov r10d, dword [rbp + 0x4a0]
mov dword [rsp + 0x48], ecx
cmp ecx, r10d
jb 0x1400157cb
cmp dword [rsp + 0x4c], r10d
jb 0x1400157cb
mov rcx, rbx
call 0x140009e58
cmp eax, 1
je 0x140015396
mov rcx, rbx
call 0x140009e58
cmp eax, 7
jne 0x14001539b
mov dword [rsp + 0x48], r10d
mov rbx, qword [rsp + 0x50]
lea rax, [rbx - 1]
add rax, r10
cqo
idiv r10
cmp dword [rsp + 0x54], esi
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 0x140015460
mov edi, eax
mov eax, ecx
imul rdi, rax
mov qword [rbp - 0x48], rdi
cmp rdi, rdx
ja 0x140015628
cmp edi, ecx
jbe 0x1400157cb
cmp edi, 0x400
ja 0x1400153fb
lea r13, [rbp + 0x20]
jmp 0x140015427
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8d, edi
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapAlloc]
nop dword [rax + rax]
mov r13, rax
test rax, rax
je 0x1400157cb
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.1400063b8
test eax, eax
je 0x140015797
mov rbx, qword [rsp + 0x50]
mov r15d, edi
mov qword [rsp + 0x70], r15
mov edi, edi
mov r14, r15
mov r12d, 1
test rbx, rbx
je 0x140015723
mov ecx, dword [rsp + 0x48]
cmp rcx, rbx
cmovg ecx, ebx
mov dword [rsp + 0x48], ecx
test rsi, rsi
je 0x1400154e2
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 0x1400154de
mov rcx, qword [rbp - 0x38]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x948e
call fcn.1400116e0
mov ecx, 0xffffffff
cmp eax, ecx
jne 0x1400154de
mov ecx, 0x4d3
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
xor r12d, r12d
mov ecx, dword [rsp + 0x48]
test r12d, r12d
je 0x140015713
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.1400063b8
test eax, eax
je 0x140015713
mov ecx, dword [rsp + 0x48]
xor r11d, r11d
add rsi, rcx
mov dword [rsp + 0x4c], r11d
sub rbx, 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 0x1400156a0
mov edi, 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 0x1400155bf
mov r9d, r11d
xor r8d, r8d
sub r9, rdx
mov r10d, r12d
add r9, rsi
add r10, r9
test ecx, ecx
je 0x1400155bf
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 0x140015632
inc r8d
add rdx, 0x10
cmp r8d, dword [rbp + 0x4b0]
jb 0x140015590
mov r9, qword [rsp + 0x68]
mov r8d, r12d
mov rdx, qword [rsp + 0x60]
mov eax, edi
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 [0x14005b848]
test eax, eax
jne 0x140015636
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.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov eax, r12d
jmp 0x14001563a
mov ebx, 0x216
jmp 0x1400157cf
mov eax, edi
jmp 0x140015608
mov eax, dword [rsp + 0x44]
mov r11d, dword [rsp + 0x4c]
add edi, 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 rbx, rbx
jne 0x140015660
test ecx, ecx
je 0x140015688
mov r8d, dword [rsp + 0x5c]
mov rax, r14
sub rax, r15
cmp dword [rsp + 0x78], 4
jne 0x140015679
mov dword [r13 + r8*4], eax
jmp 0x14001567e
mov qword [r13 + r8*8], rax
inc r8d
mov dword [rsp + 0x5c], r8d
test ecx, ecx
mov rdx, qword [rbp - 0x18]
jne 0x140015556
mov dword [rsp + 0x44], edi
mov rdi, 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], edi
add rdi, rax
mov qword [rsp + 0x70], rdi
cmp rdi, qword [rsp + 0x50]
jg 0x140015706
mov rdx, qword [rsp + 0x68]
lea r9, [rbp - 0x78]
mov rcx, qword [rbp - 0x40]
mov dword [rsp + 0x20], 1
call fcn.1400063b8
mov r12d, eax
test eax, eax
jne 0x140015469
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14001579b
mov ebx, 0xdf
xor r12d, r12d
jmp 0x14001579b
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14001570b
test r12d, r12d
je 0x140015797
test r13, r13
je 0x14001577a
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.1400063b8
mov r12d, eax
test eax, eax
jne 0x140015785
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
nop dword [rax + rax]
mov ebx, eax
jmp 0x14001577e
mov ebx, dword [rsp + 0x40]
test r12d, r12d
je 0x14001579b
jmp 0x140015789
mov ebx, dword [rsp + 0x40]
mov rax, qword [rbp - 0x10]
test rax, rax
je 0x14001579b
mov qword [rax], rdi
jmp 0x14001579b
mov ebx, dword [rsp + 0x40]
test r13, r13
je 0x1400157cf
lea rax, [rbp + 0x20]
cmp r13, rax
je 0x1400157cf
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_GetProcessHeap]
nop dword [rax + rax]
mov r8, r13
xor edx, edx
mov rcx, rax
call qword [sym.imp.api_ms_win_core_heap_l1_1_0.dll_HeapFree]
nop dword [rax + rax]
jmp 0x1400157cf
mov ebx, dword [rsp + 0x40]
test ebx, ebx
je 0x1400157e1
mov ecx, ebx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
nop dword [rax + rax]
mov eax, r12d
mov rcx, qword [rbp + 0x420]
xor rcx, rsp
call fcn.1400582e0
add rsp, 0x538
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret