Function at 0x4aa97c
Capabilities:
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x2d8
mov qword [rsp + 0x328], rdx
mov rbx, rcx
mov rbp, r8
lea rsi, [rsp + 0x70]
mov dword [rsp + 0x4c], 0
mov rdx, qword [rbp]
mov rax, qword [rbp + 8]
sub rax, rdx
sar rax, 3
cmp dword [rsp + 0x4c], eax
jae 0x4aad2c
mov r15d, dword [rsp + 0x4c]
lea r12, [rsp + 0x60]
mov qword [rsp + 0x60], 0
lea rdi, [rsp + 0x8b]
mov r9, r12
mov r8, rdi
mov rcx, qword [rdx + r15*8]
mov edx, 0x105
lea r13, [r15*8]
add rcx, 4
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp qword [rsp + 0x60], 0
je 0x4aad23
mov rax, qword [rbp]
xor r9d, r9d
mov r8d, 1
mov edx, 0x80000000
mov rcx, qword [rax + r15*8]
mov dword [rsp + 0x28], pe_nt_image_headers64
mov qword [rsp + 0x30], 0
mov dword [rsp + 0x20], 3
add rcx, 4
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x4aabe8
mov rax, qword [rbp]
mov r9, r12
mov r8, rdi
mov edx, 0x105
mov rcx, qword [rax + r15*8]
add rcx, 4
call qword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp qword [rsp + 0x60], 0
je 0x4aad23
lea r14, [rsp + 0x78]
lea r12, [rsp + 0x190]
xor r15d, r15d
mov rcx, r14
call fcn.004cf720
mov rdi, qword [rbp]
lea rax, [rsp + 0x68]
lea r8, [0x005369e4]
mov rcx, rax
mov qword [rsp + 0x50], rax
add rdi, r13
mov rdx, rdi
call fcn.004a8ef9
mov rax, qword [rsp + 0x68]
mov rdx, r12
lea rcx, [rax + 4]
call qword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov r13, rax
cmp rax, 0xffffffffffffffff
je 0x4aab61
mov rax, qword [sym.imp.KERNEL32.dll_FindNextFileA]
lea r15, [rsp + 0x1bc]
mov qword [rsp + 0x58], rax
lea rdx, [0x005369e7]
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4aab44
lea rdx, [0x005369e9]
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4aab44
mov rdx, rdi
mov rcx, rsi
call fcn.004cebf6
mov edx, 0x5c
mov rcx, rsi
call fcn.004cee1e
mov rdx, r15
mov rcx, rsi
call fcn.004cedda
mov rcx, r14
mov rdx, rsi
call fcn.005188a0
mov rcx, rsi
call fcn.004cea4a
mov rax, qword [rsp + 0x58]
mov rdx, r12
mov rcx, r13
call rax
test eax, eax
jne 0x4aaae8
mov rcx, r13
mov r15b, 1
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x50]
call fcn.004cea4a
test r15b, r15b
je 0x4aabdb
mov rdx, qword [rsp + 0x60]
mov rcx, r12
call fcn.004cec4e
mov rdx, qword [rsp + 0x328]
mov rcx, rsi
call fcn.004cebf6
mov rdx, r12
mov rcx, rsi
call fcn.004cedc2
mov rcx, r12
call fcn.004cea4a
mov rdx, rsi
mov rcx, rbx
call fcn.004a926a
lea r8, [0x005369ec]
mov rdx, rsi
mov rcx, r12
call fcn.004a8ef9
mov r8, r14
mov rdx, r12
mov rcx, rbx
call fcn.004aa97c
mov rcx, r12
call fcn.004cea4a
mov rcx, rsi
call fcn.004cea4a
mov rcx, r14
call fcn.004aa958
jmp 0x4aad23
xor eax, eax
lea rdi, [rsp + 0x190]
mov ecx, 8
lea r12, [rsp + 0x190]
lea r15, [rsp + 0x198]
rep stosd dword [rdi], eax
mov rcx, r12
call fcn.004cebac
mov rcx, r15
call fcn.004cebac
mov rcx, qword [rbx + 0x18]
mov rdi, qword [rbx + 0x20]
sub rdi, rcx
call fcn.004d20e2
sar rdi, 5
shr eax, 5
cmp edi, eax
jne 0x4aac5c
mov rdx, qword [rbx + 0x20]
sub rdx, qword [rbx + 0x18]
lea rcx, [rbx + 0x18]
mov eax, 1
sar rdx, 5
mov r8d, 0x20
add edx, edx
cmove edx, eax
shl edx, 5
call fcn.004cf756
mov rdi, qword [rbx + 0x20]
mov rdx, r12
mov rcx, rdi
call fcn.004cebf6
mov rdx, r15
lea rcx, [rdi + 8]
call fcn.004cebf6
mov eax, dword [rsp + 0x1a0]
mov rcx, r15
mov dword [rdi + 0x10], eax
mov rax, qword [rsp + 0x1a8]
mov qword [rdi + 0x18], rax
add qword [rbx + 0x20], 0x20
call fcn.004cea4a
mov rcx, r12
call fcn.004cea4a
mov r15, qword [rbx + 0x20]
mov r8, qword [rsp + 0x60]
mov rcx, r12
mov rdx, qword [rsp + 0x328]
call fcn.004a8ef9
mov rdx, r12
lea rcx, [r15 - 0x20]
call fcn.004cef0e
mov rcx, r12
call fcn.004cea4a
mov rdx, qword [rbp]
lea rcx, [r15 - 0x18]
add rdx, r13
cmp rcx, rdx
je 0x4aace4
call fcn.004ceeb2
mov dword [r15 - 0x10], 0
mov rdx, r12
mov rcx, r14
mov qword [r15 - 8], r14
mov dword [rsp + 0x190], 0
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov edx, eax
cmp edx, 0xffffffff
je 0x4aad23
mov eax, dword [rsp + 0x190]
shl rax, 0x20
add rax, rdx
mov dword [r15 - 0x10], eax
add dword [rbx + 0x2c], eax
inc dword [rsp + 0x4c]
jmp 0x4aa9aa
mov rax, qword [rbx + 0x20]
cmp qword [rbx + 0x18], rax
setne al
add rsp, 0x2d8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret