Function at 0x4a9d6c
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 0x4aa11c
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 0x4aa113
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 0x4a9fd8
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 0x4aa113
lea r14, [rsp + 0x78]
lea r12, [rsp + 0x190]
xor r15d, r15d
mov rcx, r14
call fcn.004ceac0
mov rdi, qword [rbp]
lea rax, [rsp + 0x68]
lea r8, [0x005359a4]
mov rcx, rax
mov qword [rsp + 0x50], rax
add rdi, r13
mov rdx, rdi
call fcn.004a82e9
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 0x4a9f51
mov rax, qword [sym.imp.KERNEL32.dll_FindNextFileA]
lea r15, [rsp + 0x1bc]
mov qword [rsp + 0x58], rax
lea rdx, [0x005359a7]
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a9f34
lea rdx, [0x005359a9]
mov rcx, r15
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x4a9f34
mov rdx, rdi
mov rcx, rsi
call fcn.004cdf96
mov edx, 0x5c
mov rcx, rsi
call fcn.004ce1be
mov rdx, r15
mov rcx, rsi
call fcn.004ce17a
mov rcx, r14
mov rdx, rsi
call fcn.005178a0
mov rcx, rsi
call fcn.004cddea
mov rax, qword [rsp + 0x58]
mov rdx, r12
mov rcx, r13
call rax
test eax, eax
jne 0x4a9ed8
mov rcx, r13
mov r15b, 1
call qword [sym.imp.KERNEL32.dll_FindClose]
mov rcx, qword [rsp + 0x50]
call fcn.004cddea
test r15b, r15b
je 0x4a9fcb
mov rdx, qword [rsp + 0x60]
mov rcx, r12
call fcn.004cdfee
mov rdx, qword [rsp + 0x328]
mov rcx, rsi
call fcn.004cdf96
mov rdx, r12
mov rcx, rsi
call fcn.004ce162
mov rcx, r12
call fcn.004cddea
mov rdx, rsi
mov rcx, rbx
call fcn.004a865a
lea r8, [0x005359ac]
mov rdx, rsi
mov rcx, r12
call fcn.004a82e9
mov r8, r14
mov rdx, r12
mov rcx, rbx
call fcn.004a9d6c
mov rcx, r12
call fcn.004cddea
mov rcx, rsi
call fcn.004cddea
mov rcx, r14
call fcn.004a9d48
jmp 0x4aa113
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.004cdf4c
mov rcx, r15
call fcn.004cdf4c
mov rcx, qword [rbx + 0x18]
mov rdi, qword [rbx + 0x20]
sub rdi, rcx
call fcn.004d1482
sar rdi, 5
shr eax, 5
cmp edi, eax
jne 0x4aa04c
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.004ceaf6
mov rdi, qword [rbx + 0x20]
mov rdx, r12
mov rcx, rdi
call fcn.004cdf96
mov rdx, r15
lea rcx, [rdi + 8]
call fcn.004cdf96
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.004cddea
mov rcx, r12
call fcn.004cddea
mov r15, qword [rbx + 0x20]
mov r8, qword [rsp + 0x60]
mov rcx, r12
mov rdx, qword [rsp + 0x328]
call fcn.004a82e9
mov rdx, r12
lea rcx, [r15 - 0x20]
call fcn.004ce2ae
mov rcx, r12
call fcn.004cddea
mov rdx, qword [rbp]
lea rcx, [r15 - 0x18]
add rdx, r13
cmp rcx, rdx
je 0x4aa0d4
call fcn.004ce252
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 0x4aa113
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 0x4a9d9a
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