Function at 0x18005ce30
Capabilities:
Get file size

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x2e0
mov qword [rsp + 0xc0], 0xfffffffffffffffe
mov rax, qword [0x1800f7050]
xor rax, rsp
mov qword [rsp + 0x2d0], rax
mov rbx, r8
mov r12, rdx
mov rsi, rcx
test rdx, rdx
je 0x18005d50e
cmp word [rdx], 0
je 0x18005d50e
test rbx, rbx
jne 0x18005ce8b
mov eax, 0x80070057
jmp 0x18005d513
mov qword [rsp + 0xc8], rbx
mov rax, qword [r8]
mov rcx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
xor r13d, r13d
mov qword [rsp + 0x40], r13
mov rax, qword [rbx]
lea r8, [rsp + 0x40]
lea rdx, [0x1800d86c8]
mov rcx, rbx
call qword [rax]
mov edi, eax
test eax, eax
js 0x18005d4f0
cmp eax, 1
je 0x18005d4f0
cmp qword [rsp + 0x40], r13
jne 0x18005cee6
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, 0x80004005
jmp 0x18005d513
mov rcx, rsi
call fcn.18005dd70
mov rcx, qword [rsi + 0x80]
test rcx, rcx
je 0x18005cf06
call fcn.1800626bc
mov qword [rsi + 0x80], r13
mov edx, 0xc0000000
mov r14d, 0x80000000
cmp dword [rsi + 0x24], 0
cmovne edx, r14d
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x20000000
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
mov qword [rsp + 0x90], rax
cmp rax, 0xffffffffffffffff
jne 0x18005d015
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [rsi + 0x24], 0
jne 0x18005cfe7
cmp eax, 5
je 0x18005cf80
cmp eax, 0x20
je 0x18005cf80
cmp eax, 0xa7
je 0x18005cf80
cmp eax, 0x21
je 0x18005cf80
cmp eax, 0x13
jne 0x18005cfe7
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], r13d
mov dword [rsp + 0x20], 3
xor r9d, r9d
lea r8d, [r9 + 1]
mov edx, r14d
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rbp, rax
mov qword [rsp + 0x90], rax
cmp rax, 0xffffffffffffffff
jne 0x18005cfde
call fcn.1800030e0
mov edi, eax
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005cfce
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 0x10]
mov eax, edi
jmp 0x18005d513
mov dword [rsi + 0x24], 1
jmp 0x18005d015
test eax, eax
jle 0x18005cff4
movzx edi, ax
or edi, 0x80070000
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d005
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov rdx, qword [rbx]
mov rcx, rbx
call qword [rdx + 0x10]
mov eax, edi
jmp 0x18005d513
mov qword [rsp + 0x58], r13
lea rdx, [rsp + 0x58]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x18005d064
call fcn.1800030e0
mov edi, eax
cmp rbp, 0xffffffffffffffff
je 0x18005d043
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d054
mov rdx, qword [rcx]
call qword [rdx + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
cmp rbp, 0xffffffffffffffff
je 0x18005d4bd
lea r8, [rsp + 0x58]
mov rdx, rbp
mov rcx, rsi
call fcn.18005d540
mov edi, eax
test eax, eax
js 0x18005d4c2
cmp eax, 1
je 0x18005d4c2
mov rax, qword [rsp + 0x58]
cqo
and edx, 0x1ff
add rax, rdx
and eax, 0x1ff
cmp rax, rdx
je 0x18005d0d9
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d0c6
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, 0xe0035003
jmp 0x18005d513
cmp dword [rsi + 0x24], 0
jne 0x18005d14d
mov qword [rsp + 0xb8], 7
mov qword [rsp + 0xb0], r13
mov word [rsp + 0xa0], r13w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, r12
lea rcx, [rsp + 0x98]
call fcn.180002750
nop
lea rcx, [rsi + 0x2c8]
lea rdx, [rsp + 0x98]
call fcn.180013750
nop
cmp qword [rsp + 0xb8], 8
jb 0x18005d14d
mov rcx, qword [rsp + 0xa0]
call fcn.1800620e0
mov qword [rsp + 0x90], 0xffffffffffffffff
mov qword [rsp + 0x48], rbp
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x50], rax
lea rcx, [rsi + 0x90]
lea rdx, [rsp + 0x48]
call fcn.18004ef70
mov rdx, r12
lea rcx, [rsi + 0xc0]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsi + 0xc0]
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
mov word [rax], r13w
mov byte [rsp + 0xd0], 0
xor edx, edx
mov r8d, 0x1ff
lea rcx, [rsp + 0xd1]
call fcn.1800644c0
lea rdx, [rsp + 0xd0]
mov rcx, rsi
call fcn.18005de80
mov edi, eax
test eax, eax
js 0x18005d49f
cmp eax, 1
je 0x18005d49f
cmp dword [rsp + 0xdc], 0x100
je 0x18005d20b
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d1f8
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, 0xe0035001
jmp 0x18005d513
mov dword [rsp + 0x48], r13d
movzx eax, byte [rsp + 0x10f]
mov byte [rsp + 0x48], al
movzx eax, byte [rsp + 0x10e]
mov byte [rsp + 0x49], al
movzx eax, byte [rsp + 0x10d]
mov byte [rsp + 0x4a], al
movzx eax, byte [rsp + 0x10c]
mov byte [rsp + 0x4b], al
mov eax, dword [rsp + 0x48]
cmp eax, 2
jne 0x18005d251
mov dword [rsi + 0x68], eax
jmp 0x18005d2e2
cmp eax, 3
jne 0x18005d47e
mov dword [rsi + 0x68], eax
mov qword [rsp + 0x48], r13
movzx eax, byte [rsp + 0xe7]
mov byte [rsp + 0x48], al
movzx eax, byte [rsp + 0xe6]
mov byte [rsp + 0x49], al
movzx eax, byte [rsp + 0xe5]
mov byte [rsp + 0x4a], al
movzx eax, byte [rsp + 0xe4]
mov byte [rsp + 0x4b], al
movzx eax, byte [rsp + 0xe3]
mov byte [rsp + 0x4c], al
movzx eax, byte [rsp + 0xe2]
mov byte [rsp + 0x4d], al
movzx eax, byte [rsp + 0xe1]
mov byte [rsp + 0x4e], al
movzx eax, byte [rsp + 0xe0]
mov byte [rsp + 0x4f], al
mov rdx, qword [rsp + 0x48]
mov rcx, rsi
call fcn.18005d680
mov edi, eax
test eax, eax
js 0x18005d45d
cmp eax, 1
je 0x18005d45d
mov ecx, 8
call fcn.180062408
test rax, rax
je 0x18005d2fb
lea rcx, [rsp + 0x60]
mov qword [rax], rcx
jmp 0x18005d2fe
mov rax, r13
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x88], r13
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.180003820
mov edi, eax
test eax, eax
js 0x18005d40d
cmp eax, 1
je 0x18005d40d
xor r9d, r9d
mov r8, qword [rsp + 0x40]
lea rdx, [rsp + 0x60]
mov rcx, rsi
call fcn.1800034b0
mov edi, eax
test eax, eax
js 0x18005d3bd
cmp eax, 1
je 0x18005d3bd
mov rcx, rsi
call fcn.18005dc80
mov edi, eax
test eax, eax
jne 0x18005d36d
mov dword [rsi + 0x28], 1
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x18005d37c
call fcn.1800620e0
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x88], r13
mov rcx, qword [rsp + 0x60]
call fcn.1800620e0
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d3ad
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x18005d3cc
call fcn.1800620e0
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x88], r13
mov rcx, qword [rsp + 0x60]
call fcn.1800620e0
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d3fd
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov rcx, qword [rsp + 0x78]
test rcx, rcx
je 0x18005d41c
call fcn.1800620e0
mov qword [rsp + 0x78], r13
mov qword [rsp + 0x80], r13
mov qword [rsp + 0x88], r13
mov rcx, qword [rsp + 0x60]
call fcn.1800620e0
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d44d
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d46e
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d48f
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, 0xe0035002
jmp 0x18005d513
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d4b0
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov edi, 0x80070057
cmp rbp, 0xffffffffffffffff
je 0x18005d4d2
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d4e3
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov rcx, qword [rsp + 0x40]
test rcx, rcx
je 0x18005d501
mov rax, qword [rcx]
call qword [rax + 0x10]
nop
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 0x10]
mov eax, edi
jmp 0x18005d513
mov eax, 0x80070057
mov rcx, qword [rsp + 0x2d0]
xor rcx, rsp
call fcn.180062100
add rsp, 0x2e0
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret