Function at 0x1801865a0
Capabilities:
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x170]
sub rsp, 0x270
mov qword [rbp - 0x80], 0xfffffffffffffffe
mov qword [rsp + 0x2c0], rbx
mov rax, qword [0x1804cc010]
xor rax, rsp
mov qword [rbp + 0x160], rax
mov qword [rbp + 0x60], r8
mov r13, rdx
mov r14, rcx
cmp qword [rdx + 0x10], 0
jne 0x1801865f4
xor al, al
jmp 0x180186f02
cmp qword [rdx + 0x30], 0
jne 0x180186605
cmp qword [rdx + 0x80], 0
je 0x1801865ed
call fcn.180188f30
cmp qword [rax], 0
je 0x1801865ed
mov rbx, qword [r14]
test rbx, rbx
je 0x1801865ed
xor esi, esi
mov qword [rbp + 0xb0], rsi
add rbx, 0xb0
mov qword [rbp + 0xb0], rbx
je 0x180186640
mov rcx, qword [rbx]
test rcx, rcx
je 0x180186640
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rax, qword [r14]
movzx edi, byte [rax + 0xe8]
test rbx, rbx
je 0x180186664
mov rcx, qword [rbx]
test rcx, rcx
je 0x18018665d
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0xb0], rsi
test dil, dil
jne 0x1801865ed
mov qword [rbp + 0x38], rsi
mov rdi, qword [r14]
add rdi, 0xb0
mov qword [rbp + 0x38], rdi
je 0x18018668c
mov rcx, qword [rdi]
test rcx, rcx
je 0x18018668c
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov rcx, qword [r14]
call fcn.18018a5c0
test rdi, rdi
je 0x1801866ae
mov rcx, qword [rdi]
test rcx, rcx
je 0x1801866a7
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, rsi
mov qword [rbp + 0x38], rsi
xor eax, eax
mov qword [rbp + 0x68], rax
mov qword [rbp + 0x70], rax
mov rax, qword [r14]
lea r12, [rax + 0xe8]
mov qword [rbp + 0x68], r12
lea r15, [rax + 0xb0]
mov qword [rbp + 0x70], r15
test r12, r12
je 0x180186719
test r15, r15
je 0x180186714
mov qword [rbp + 0xb8], rsi
mov qword [rbp + 0xb8], r15
mov rcx, qword [r15]
test rcx, rcx
je 0x1801866f8
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov byte [r12], 1
mov rcx, qword [r15]
test rcx, rcx
je 0x18018670b
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0xb8], rsi
jmp 0x180186719
mov byte [r12], 1
mov rdx, r13
lea rcx, [rbp - 0x70]
call fcn.180004ad0
nop
lea rdx, [r13 + 0x20]
lea rcx, [rbp - 0x50]
call fcn.180004ad0
nop
lea rdx, [r13 + 0x40]
lea rcx, [rbp - 0x30]
call fcn.180004ad0
nop
lea rdx, [r13 + 0x60]
lea rcx, [rbp - 0x10]
call fcn.180004ad0
nop
mov rax, qword [r13 + 0x80]
mov qword [rbp + 0x10], rax
movzx eax, byte [r13 + 0x88]
mov byte [rbp + 0x18], al
mov rax, qword [r13 + 0x90]
mov qword [rbp + 0x20], rax
mov rax, qword [r13 + 0x98]
mov qword [rbp + 0x28], rax
mov qword [rbp + 0x50], rsi
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x50], rsi
mov qword [rbp + 0x58], 7
mov word [rbp + 0x40], si
mov qword [rbp + 0xa0], rsi
mov qword [rbp + 0xa8], rsi
mov qword [rbp + 0xa0], rsi
mov qword [rbp + 0xa8], 7
mov word [rbp + 0x90], si
mov qword [rbp + 0xd0], rsi
mov qword [rbp + 0xd8], rsi
mov qword [rbp + 0xd0], rsi
mov qword [rbp + 0xd8], 7
mov word [rbp + 0xc0], si
mov qword [rbp + 0x30], rsi
mov rbx, rsi
mov qword [rbp + 0x30], rbx
cmp qword [rbp + 0x10], 0
jne 0x180186ad1
lea rax, [rbp - 0x70]
mov qword [rsp + 0x30], rax
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x28], rax
lea rax, [rbp + 0x90]
mov qword [rsp + 0x20], rax
lea r9, [rbp - 0x70]
lea r8, [rbp - 0x50]
lea rdx, [rsp + 0x60]
mov rcx, r14
call fcn.180187b00
mov rsi, rax
lea rax, [rbp + 0x40]
cmp rax, rsi
je 0x180186863
lea rcx, [rbp + 0x40]
call fcn.180004e20
movups xmm0, xmmword [rsi]
movups xmmword [rbp + 0x40], xmm0
movups xmm1, xmmword [rsi + 0x10]
movups xmmword [rbp + 0x50], xmm1
xor eax, eax
mov qword [rsi + 0x10], rax
mov qword [rsi + 0x18], 7
mov word [rsi], ax
mov rdx, qword [rsp + 0x78]
cmp rdx, 8
jb 0x1801868a8
lea rdx, [rdx*2 + 2]
mov rcx, qword [rsp + 0x60]
mov rax, rcx
cmp rdx, 0x1000
jb 0x1801868a3
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x1801868a3
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
xor eax, eax
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], 7
mov word [rsp + 0x60], ax
cmp qword [rbp + 0x50], rax
je 0x180186cbf
cmp qword [rbp + 0xa0], rax
je 0x180186cbf
cmp byte [rbp + 0x18], al
je 0x1801868e6
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x40]
call fcn.180188540
mov byte [rsp + 0x40], al
mov ecx, 0x30
call fcn.180386914
mov rbx, rax
mov qword [rsp + 0x48], rax
xor eax, eax
mov qword [rbx + 8], rax
mov qword [rbx + 0x10], rax
mov qword [rbx + 0x18], rax
mov qword [rbx + 0x20], rax
mov qword [rbx + 0x28], rax
lea rax, vtable.RC::ILibCurlDownloadDataEvent.0
mov qword [rbx], rax
lea rax, vtable.RC::RCLibCurlFileDataEvent.0
mov qword [rbx], rax
lea rcx, [rbx + 8]
lea rdx, [rbp + 0x40]
call fcn.180004ad0
nop
mov ecx, 8
call fcn.180386914
mov qword [rbp + 0x78], rax
mov rsi, 0xffffffffffffffff
mov qword [rax], rsi
lea rcx, [rbx + 0x28]
mov qword [rcx], rax
mov qword [rbp + 0x30], rbx
cmp byte [rsp + 0x40], 0
je 0x180186a6c
xor eax, eax
mov qword [rbp + 0xf0], rax
mov qword [rbp + 0xf8], rax
mov qword [rbp + 0x100], rax
mov qword [rbp + 0x108], rax
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x128], rax
mov qword [rbp + 0x130], rax
mov qword [rbp + 0x128], rax
mov qword [rbp + 0x130], 7
mov word [rbp + 0x118], ax
mov qword [rsp + 0x58], rax
lea ecx, [rsi + 9]
call fcn.180386914
mov qword [rsp + 0x48], rax
mov qword [rax], rsi
mov qword [rsp + 0x58], rax
xor eax, eax
mov qword [rsp + 0x50], rax
lea ecx, [rsi + 9]
call fcn.180386914
mov qword [rsp + 0x48], rax
mov qword [rax], rsi
mov qword [rsp + 0x50], rax
lea r8, [rbp + 0xf0]
lea rdx, [rbp + 0x40]
lea rcx, [rsp + 0x50]
call fcn.18015e700
mov byte [rsp + 0x40], al
mov rsi, qword [rsp + 0x50]
test rsi, rsi
je 0x180186a33
mov rcx, qword [rsi]
cmp rcx, 0xffffffffffffffff
je 0x180186a21
call qword [sym.imp.KERNEL32.dll_FindClose]
test eax, eax
je 0x180186a21
mov qword [rsi], 0xffffffffffffffff
mov edx, 8
mov rcx, rsi
call fcn.180386950
movzx eax, byte [rsp + 0x40]
xor esi, esi
mov qword [rsp + 0x50], rsi
test al, al
je 0x180186a4f
mov rcx, qword [r14]
mov rax, qword [rbp + 0xf0]
mov qword [rcx + 0xf8], rax
lea rcx, [rsp + 0x58]
call fcn.18015e690
nop
lea rcx, [rbp + 0x118]
call fcn.180004e20
lea rcx, [rbx + 0x28]
jmp 0x180186a6e
xor esi, esi
cmp qword [rbx + 0x18], 0
je 0x180186cb0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 4
mov r9d, 1
mov r8d, 0x40000000
lea rdx, [rbx + 8]
call fcn.180173fa0
test al, al
je 0x180186cb0
mov rcx, qword [r14]
add rcx, 0x20
lea rax, [rbp + 0x40]
cmp rcx, rax
je 0x180186acd
lea rdx, [rbp + 0x40]
cmp qword [rbp + 0x58], 8
cmovae rdx, qword [rbp + 0x40]
mov r8, qword [rbp + 0x50]
call fcn.180004ea0
mov qword [rbp + 0x10], rbx
mov rax, qword [r14]
mov rcx, qword [rbp + 0x60]
mov qword [rax + 0x60], rcx
mov rcx, qword [r14]
mov rax, qword [rbp + 0x20]
mov qword [rcx + 0xf0], rax
mov rax, qword [r14]
cmp qword [rax + 0xf8], 0
jbe 0x180186b62
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x180186b62
cmp qword [rax], 0xffffffffffffffff
je 0x180186b62
test rax, rax
je 0x180186b2c
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180186b2c
lea rdx, [rbp + 0xe0]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x180186b2c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [rbx + 0x28]
test rcx, rcx
je 0x180186b62
cmp qword [rcx], 0xffffffffffffffff
je 0x180186b62
mov qword [rbp + 0x78], rsi
mov r9d, 2
lea r8, [rbp + 0x7c]
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x78], eax
cmp eax, 0xffffffff
jne 0x180186b62
call qword [sym.imp.KERNEL32.dll_GetLastError]
xor eax, eax
mov qword [rbp + 0x80], rax
mov qword [rbp + 0x88], rax
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x80], xmm0
mov rsi, qword [r14 + 8]
test rsi, rsi
je 0x180186b9e
lock inc dword [rsi + 8]
mov rsi, qword [r14 + 8]
mov rdi, qword [rbp + 0x38]
mov r15, qword [rbp + 0x70]
mov r12, qword [rbp + 0x68]
mov rbx, qword [rbp + 0x30]
mov rax, qword [r14]
mov qword [rsp + 0x48], rax
mov qword [rbp + 0x80], rax
mov qword [rbp + 0x88], rsi
lea rdx, [rbp - 0x70]
mov rcx, r14
call fcn.180186f30
mov byte [rsp + 0x44], al
test rbx, rbx
je 0x180186c09
mov rax, qword [rbx + 0x28]
test rax, rax
je 0x180186bf0
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x180186bf0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x180186bf0
mov rax, qword [rbx + 0x28]
mov qword [rax], 0xffffffffffffffff
mov rcx, rbx
xor eax, eax
mov ebx, eax
mov qword [rbp + 0x30], rax
test rcx, rcx
je 0x180186c09
mov rax, qword [rcx]
lea edx, [rbx + 1]
call qword [rax + 8]
cmp qword [r13 + 0x80], 0
jne 0x180186ce8
mov rax, qword [rsp + 0x48]
sub rax, 0xffffffffffffff80
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0xc0]
lea r8, [rbp + 0x90]
lea rdx, [rbp + 0x140]
call fcn.180188180
nop
lea r9, [rbp + 0x40]
lea r8, [rbp + 0x140]
mov r13d, dword [rsp + 0x44]
movzx edx, r13b
mov rcx, r14
call fcn.180188390
movzx r13d, r13b
test al, al
mov r14d, 0
cmove r13d, r14d
mov rdx, qword [rbp + 0x158]
cmp rdx, 8
jb 0x180186ccc
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x140]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180186cc7
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180186cc7
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
nop
mov rsi, qword [r14]
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsi + 0xa8], eax
xor r13b, r13b
jmp 0x180186d53
call fcn.180386950
mov qword [rbp + 0x150], r14
mov qword [rbp + 0x158], 7
mov word [rbp + 0x140], r14w
jmp 0x180186ced
mov r13d, dword [rsp + 0x44]
mov rax, qword [rsp + 0x48]
mov rcx, qword [rax + 0xb8]
test rcx, rcx
je 0x180186d05
call qword [sym.imp.KERNEL32.dll_SetEvent]
nop
test rsi, rsi
je 0x180186d53
mov rdi, 0xffffffffffffffff
mov eax, edi
lock xadd dword [rsi + 8], eax
sub eax, 1
jne 0x180186d43
mov rbx, qword [rbp + 0x88]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock xadd dword [rbx + 0xc], edi
cmp edi, 1
jne 0x180186d43
mov rcx, qword [rbp + 0x88]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rbp + 0x30]
mov r12, qword [rbp + 0x68]
mov r15, qword [rbp + 0x70]
mov rdi, qword [rbp + 0x38]
test rbx, rbx
je 0x180186d67
mov rax, qword [rbx]
mov edx, 1
mov rcx, rbx
call qword [rax + 8]
nop
mov rdx, qword [rbp + 0xd8]
cmp rdx, 8
jb 0x180186db0
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0xc0]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180186dab
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180186dab
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
xor ebx, ebx
mov qword [rbp + 0xd0], rbx
mov qword [rbp + 0xd8], 7
mov word [rbp + 0xc0], bx
mov rdx, qword [rbp + 0xa8]
cmp rdx, 8
jb 0x180186e14
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x90]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180186e0f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180186e0f
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
mov qword [rbp + 0xa0], rbx
mov qword [rbp + 0xa8], 7
mov word [rbp + 0x90], bx
mov rdx, qword [rbp + 0x58]
cmp rdx, 8
jb 0x180186e70
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp + 0x40]
mov rax, rcx
cmp rdx, 0x1000
jb 0x180186e6b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x180186e6b
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.180386950
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x58], 7
mov word [rbp + 0x40], bx
lea rcx, [rbp - 0x10]
call fcn.180004e20
nop
lea rcx, [rbp - 0x30]
call fcn.180004e20
nop
lea rcx, [rbp - 0x50]
call fcn.180004e20
nop
lea rcx, [rbp - 0x70]
call fcn.180004e20
nop
test r12, r12
je 0x180186ee7
test r15, r15
je 0x180186ee2
mov qword [rbp + 0x60], rbx
mov qword [rbp + 0x60], r15
mov rcx, qword [r15]
test rcx, rcx
je 0x180186ec9
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov byte [r12], 0
mov rcx, qword [r15]
test rcx, rcx
je 0x180186edc
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0x60], rbx
jmp 0x180186ee7
mov byte [r12], 0
test rdi, rdi
je 0x180186efe
mov rcx, qword [rdi]
test rcx, rcx
je 0x180186efa
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0x38], rbx
movzx eax, r13b
mov rcx, qword [rbp + 0x160]
xor rcx, rsp
call fcn.1803868f0
mov rbx, qword [rsp + 0x2c0]
add rsp, 0x270
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret