Function at 0x18006e320
Capabilities:
Get file size

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x120]
sub rsp, 0x220
mov qword [rbp - 0x10], 0xfffffffffffffffe
mov qword [rsp + 0x270], rbx
mov rax, qword [0x1802247b8]
xor rax, rsp
mov qword [rbp + 0x110], rax
mov rbx, rdx
mov qword [rsp + 0x50], rdx
mov r15, rcx
xor r13d, r13d
mov dword [rcx + 0x100], r13d
xor eax, eax
mov qword [rbp - 8], rax
lea ecx, [rax + 8]
call fcn.180139f6c
mov qword [rsp + 0x30], rax
or r14, 0xffffffffffffffff
test rax, rax
je 0x18006e392
mov qword [rax], r14
jmp 0x18006e395
mov rax, r13
mov qword [rbp - 8], rax
cmp qword [rbx + 0x18], 8
jb 0x18006e3a5
mov rdx, qword [rbx]
jmp 0x18006e3a8
mov rdx, rbx
mov qword [rsp + 0x68], r13
mov qword [rsp + 0x70], r13
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r13
mov word [rsp + 0x58], r13w
cmp word [rdx], 0
jne 0x18006e3d1
mov r8, r13
jmp 0x18006e3df
mov r8, r14
inc r8
cmp word [rdx + r8*2], 0
jne 0x18006e3d4
lea rcx, [rsp + 0x58]
call fcn.180005920
nop
mov eax, 1
cmp qword [rbp - 8], 0
jne 0x18006e3fa
xor al, al
jmp 0x18006e421
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
mov r9d, eax
mov r8d, 0xc0000000
lea rdx, [rsp + 0x58]
lea rcx, [rbp - 8]
call fcn.18004f5f0
test al, al
sete bl
cmp qword [rsp + 0x70], 8
jb 0x18006e438
mov rcx, qword [rsp + 0x58]
call fcn.180139b7c
mov qword [rsp + 0x70], 7
mov qword [rsp + 0x68], r13
mov word [rsp + 0x58], r13w
test bl, bl
je 0x18006e467
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r15 + 0x100], eax
mov esi, 2
jmp 0x18006ed6e
xor eax, eax
mov qword [rbp + 0x48], rax
mov qword [rbp + 0x50], rax
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x48], xmm0
lea ecx, [rax + 0x10]
call fcn.180139f6c
mov qword [rsp + 0x30], rax
test rax, rax
je 0x18006e49e
xor ecx, ecx
mov qword [rax], rcx
mov qword [rax + 8], rcx
mov rcx, rax
call fcn.180039b50
jmp 0x18006e4a1
mov rax, r13
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.180071990
nop
mov rbx, qword [rbp - 0x80]
mov qword [rbp - 0x80], r13
mov qword [rbp + 0x50], rbx
mov r12, qword [rsp + 0x78]
mov qword [rsp + 0x78], r13
mov qword [rbp + 0x48], r12
call fcn.180039e00
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x78], xmm0
mov qword [rbp - 0x68], r13
mov qword [rbp - 0x60], r13
lea rsi, [r15 + 0xe0]
mov qword [rbp - 0x78], rsi
lea rdi, [r15 + 0xf8]
mov qword [rbp - 0x60], rdi
movdqu xmmword [rsp + 0x40], xmm0
test rbx, rbx
je 0x18006e50c
lock inc dword [rbx + 8]
mov qword [rsp + 0x48], rbx
mov qword [rsp + 0x40], r12
mov rcx, qword [rbp - 0x68]
mov qword [rsp + 0x48], rcx
mov qword [rbp - 0x68], rbx
mov rax, qword [rbp - 0x70]
mov qword [rsp + 0x40], rax
mov qword [rbp - 0x70], r12
test rcx, rcx
je 0x18006e559
lock dec dword [rcx + 8]
jne 0x18006e559
mov rbx, qword [rsp + 0x48]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x18006e559
mov rcx, qword [rsp + 0x48]
mov rax, qword [rcx]
call qword [rax + 8]
mov qword [rbp + 0x20], rdi
test rdi, rdi
je 0x18006e571
mov rcx, qword [rdi]
test rcx, rcx
je 0x18006e571
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
lea rdx, [rbp + 0x48]
mov rcx, rsi
call fcn.180070000
test rdi, rdi
je 0x18006e597
mov rcx, qword [rdi]
test rcx, rcx
je 0x18006e590
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov rdi, r13
mov qword [rbp + 0x20], r13
mov esi, 2
mov rax, qword [rbp - 8]
test rax, rax
je 0x18006ecfa
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x18006ecfa
lea rdx, [rbp + 0x68]
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp eax, 0xffffffff
jne 0x18006e5d5
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18006ecfa
mov ecx, dword [rbp + 0x68]
shl rcx, 0x20
add rcx, rbx
cmp rcx, 0x10000
jbe 0x18006ecfa
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x18006ece8
cmp qword [rcx], 0xffffffffffffffff
je 0x18006ece8
mov qword [rbp + 0x40], r13
mov r9d, esi
lea r8, [rbp + 0x44]
xor edx, edx
mov rcx, qword [rcx]
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [rbp + 0x40], eax
cmp eax, 0xffffffff
jne 0x18006e62f
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x18006ece8
mov rax, qword [rbp + 0x40]
add rax, 0xffffffffffff8000
mov qword [rsp + 0x38], rax
xor ecx, ecx
mov qword [rbp + 0x28], rcx
mov qword [rbp + 0x30], rcx
mov ecx, 0x38
call fcn.180139f6c
mov qword [rsp + 0x30], rax
test rax, rax
je 0x18006e6a0
xor ecx, ecx
mov qword [rax + 0x10], rcx
mov qword [rax + 0x18], rcx
mov qword [rax + 0x20], rcx
mov qword [rax + 0x28], rcx
mov qword [rax + 0x30], rcx
lea rcx, vtable.RC::RCInternetHandle.0
mov qword [rax], rcx
mov qword [rax + 8], r13
lea rcx, vtable.RC::RCHttpFile.0
mov qword [rax], rcx
mov dword [rax + 0x10], r13d
mov qword [rax + 0x18], r13
mov byte [rax + 0x20], 0
mov qword [rax + 0x28], r13
mov dword [rax + 0x30], r13d
jmp 0x18006e6a3
mov rax, r13
xorps xmm0, xmm0
movdqu xmmword [rbp + 0x28], xmm0
mov rdx, rax
lea rcx, [rbp + 0x28]
call fcn.180071240
nop
lea rbx, [r15 + 0x148]
mov qword [rbp + 0x38], rbx
test rbx, rbx
je 0x18006e6d7
mov rcx, qword [rbx]
test rcx, rcx
je 0x18006e6d7
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop
mov r13, qword [rbp + 0x30]
test r13, r13
je 0x18006e6f1
lock inc dword [r13 + 0xc]
mov rdi, qword [rbp + 0x20]
mov r13, qword [rbp + 0x30]
mov rbx, qword [rbp + 0x38]
mov rcx, qword [r15 + 0x158]
test rcx, rcx
je 0x18006e715
lock dec dword [rcx + 0xc]
jne 0x18006e709
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rbp + 0x38]
mov r13, qword [rbp + 0x30]
mov rdi, qword [rbp + 0x20]
mov qword [r15 + 0x158], r13
mov rax, qword [rbp + 0x28]
mov qword [r15 + 0x150], rax
test rbx, rbx
je 0x18006e740
mov rcx, qword [rbx]
test rcx, rcx
je 0x18006e73a
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebx, ebx
mov qword [rbp + 0x38], rbx
mov r9, qword [rsp + 0x38]
mov r8, r12
mov r12, qword [rbp + 0x28]
mov rdx, r12
mov rcx, r15
call fcn.18006f8c0
test al, al
je 0x18006ecba
mov rcx, r12
call fcn.18007dd40
mov qword [rsp + 0x30], rax
cmp qword [rbp + 0x40], rax
ja 0x18006ecba
mov rdx, qword [r15 + 0xa8]
lea rcx, [rdx - 1]
cmp rcx, 0xfffffffffffffffd
ja 0x18006e790
cmp rax, rdx
jne 0x18006ecba
mov r8, r12
lea rdx, [rbp - 8]
mov rcx, r15
call fcn.18006f690
lea ecx, [rax - 1]
test ecx, 0xfffffffb
je 0x18006ecba
add eax, 0xfffffffe
cmp eax, 1
jbe 0x18006ecb8
xor eax, eax
mov qword [rbp + 0xd0], rax
mov qword [rbp + 0xd8], rax
mov qword [rbp + 0xd8], 7
mov qword [rbp + 0xd0], rax
mov word [rbp + 0xc0], ax
mov r9, r14
xor r8d, r8d
lea rdx, [r15 + 0x18]
lea rcx, [rbp + 0xc0]
call fcn.180005330
nop
xor eax, eax
mov qword [rbp + 0xe0], rax
mov qword [rbp + 0xe8], rax
mov byte [rbp + 0xf0], al
mov qword [rbp + 0xf2], rax
mov qword [rbp + 0xfa], rax
lea r8, [rbp + 0xc0]
mov rdx, r12
call fcn.18006fb90
movzx ecx, byte [rbp + 0xf0]
test al, al
mov eax, 1
cmove ecx, eax
mov byte [rbp + 0xf0], cl
mov rax, qword [rbp + 0xe0]
cmp rax, 0x8000
jae 0x18006e85a
xor ebx, ebx
jmp 0x18006ec87
cmp rax, 0xffffffffffffffff
je 0x18006e86d
sub rax, 0x8000
mov qword [rbp + 0xe0], rax
mov rax, qword [rsp + 0x38]
mov qword [rbp + 0xe8], rax
mov rax, qword [r15 + 0xd0]
mov qword [rbp - 0x58], rax
test rax, rax
je 0x18006ea9c
lea rdx, [rbp]
mov rcx, r12
call fcn.18007ddc0
nop
cmp qword [rbp + 0x10], 0
jne 0x18006ea19
mov r9d, 1
lea rdx, [0x1801acac0]
lea rcx, [r15 + 0x18]
call fcn.180027660
cmp rax, 0xffffffffffffffff
je 0x18006ea19
lea r8, [rax + 1]
mov r9, r14
lea rdx, [rbp - 0x30]
lea rcx, [r15 + 0x18]
call fcn.180023940
mov rbx, rax
lea rax, [rbp]
cmp rax, rbx
je 0x18006e914
cmp qword [rbp + 0x18], 8
jb 0x18006e8f5
mov rcx, qword [rbp]
call fcn.180139b7c
mov qword [rbp + 0x18], 7
xor eax, eax
mov qword [rbp + 0x10], rax
mov word [rbp], ax
mov rdx, rbx
lea rcx, [rbp]
call fcn.180005250
nop
cmp qword [rbp - 0x18], 8
jb 0x18006e924
mov rcx, qword [rbp - 0x30]
call fcn.180139b7c
mov qword [rbp - 0x18], 7
xor eax, eax
mov qword [rbp - 0x20], rax
mov word [rbp - 0x30], ax
mov rcx, qword [rbp + 0x10]
test rcx, rcx
je 0x18006ea19
lea rax, [rbp]
mov r10, qword [rbp]
mov r11, qword [rbp + 0x18]
cmp r11, 8
cmovae rax, r10
lea r8, [rax + rcx*2]
lea r9, [rbp]
cmovae r9, r10
cmp r9, r8
jae 0x18006ea19
mov rcx, rsi
lea rax, [0x1801acab8]
movzx edx, word [r9]
nop word [rax + rax]
cmp word [rax], dx
je 0x18006e994
add rax, 2
dec rcx
jne 0x18006e980
add r9, 2
jmp 0x18006e963
lea rax, [rbp]
cmp r11, 8
cmovae rax, r10
sub r9, rax
sar r9, 1
cmp r9, 0xffffffffffffffff
je 0x18006ea19
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea rcx, [rbp]
call fcn.180023940
mov rbx, rax
lea rax, [rbp]
cmp rax, rbx
je 0x18006e9f7
cmp qword [rbp + 0x18], 8
jb 0x18006e9d8
mov rcx, qword [rbp]
call fcn.180139b7c
mov qword [rbp + 0x18], 7
xor eax, eax
mov qword [rbp + 0x10], rax
mov word [rbp], ax
mov rdx, rbx
lea rcx, [rbp]
call fcn.180005250
nop
cmp qword [rbp - 0x38], 8
jb 0x18006ea07
mov rcx, qword [rbp - 0x50]
call fcn.180139b7c
mov qword [rbp - 0x38], 7
xor eax, eax
mov qword [rbp - 0x40], rax
mov word [rbp - 0x50], ax
mov rcx, qword [rbp - 0x58]
mov rax, qword [rcx]
mov rdx, qword [rsp + 0x38]
mov qword [rsp + 0x28], rdx
mov rdx, qword [rsp + 0x30]
mov qword [rsp + 0x20], rdx
lea r9, [rbp + 0xf2]
mov rbx, qword [rsp + 0x50]
mov r8, rbx
lea rdx, [rbp]
call qword [rax + 8]
nop
test al, al
jne 0x18006ea78
cmp qword [rbp + 0x18], 8
jb 0x18006ea5f
mov rcx, qword [rbp]
call fcn.180139b7c
mov qword [rbp + 0x18], 7
xor ebx, ebx
mov qword [rbp + 0x10], rbx
mov word [rbp], bx
mov esi, ebx
jmp 0x18006ec87
cmp qword [rbp + 0x18], 8
jb 0x18006ea88
mov rcx, qword [rbp]
call fcn.180139b7c
mov qword [rbp + 0x18], 7
xor eax, eax
mov qword [rbp + 0x10], rax
mov word [rbp], ax
jmp 0x18006eaa1
mov rbx, qword [rsp + 0x50]
xor eax, eax
mov qword [rbp + 0x58], rax
mov qword [rbp + 0x60], rax
lea rax, vtable.RC::ISimpleDownloadDataEvent.0
mov qword [rbp + 0x58], rax
lea rax, vtable.DL::TSimpleDownloadDataEvent.0
mov qword [rbp + 0x58], rax
lea rax, [rbp - 8]
mov qword [rbp + 0x60], rax
lea r9, [rbp + 0xc0]
mov r8, r12
lea rdx, [rbp + 0x58]
mov rcx, r15
call fcn.18006fca0
test al, al
je 0x18006ec6d
mov rax, qword [rbp - 8]
test rax, rax
je 0x18006eb0a
mov rcx, qword [rax]
cmp rcx, 0xffffffffffffffff
je 0x18006eb0a
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x18006eb0a
mov rax, qword [rbp - 8]
mov qword [rax], r14
cmp qword [r15 + 0xc0], 0
je 0x18006ec64
xor eax, eax
mov qword [rbp + 0x90], rax
mov qword [rbp + 0x98], rax
mov qword [rbp + 0xa0], rax
mov qword [rbp + 0xa8], rax
mov qword [rbp + 0xb0], rax
mov qword [rbp + 0xb8], rax
lea rcx, [rbp + 0x90]
call fcn.18007b3b0
nop
mov rdx, rbx
lea rcx, [rbp + 0x90]
call fcn.18007aee0
lea rdx, [rbp + 0x70]
lea rcx, [rbp + 0x90]
call fcn.18007b5f0
nop
lea rdx, [r15 + 0xb0]
mov rax, qword [rdx + 0x10]
cmp qword [rbp + 0x80], rax
jne 0x18006ebe5
cmp qword [rdx + 0x18], 8
jb 0x18006eb8f
mov rdx, qword [rdx]
lea rcx, [rbp + 0x70]
cmp qword [rbp + 0x88], 8
cmovae rcx, qword [rbp + 0x70]
call fcn.180022390
test al, al
je 0x18006ebe5
cmp qword [rbp + 0x88], 8
jb 0x18006ebbc
mov rcx, qword [rbp + 0x70]
call fcn.180139b7c
mov qword [rbp + 0x88], 7
xor ebx, ebx
mov qword [rbp + 0x80], rbx
mov word [rbp + 0x70], bx
lea rcx, [rbp + 0x90]
call fcn.18006ee20
jmp 0x18006ec66
xor ebx, ebx
mov dword [r15 + 0x100], ebx
cmp qword [rbp + 0x88], 8
jb 0x18006ec01
mov rcx, qword [rbp + 0x70]
call fcn.180139b7c
mov qword [rbp + 0x88], 7
mov qword [rbp + 0x80], rbx
mov word [rbp + 0x70], bx
mov rdx, qword [rbp + 0xa8]
test rdx, rdx
je 0x18006ec4d
mov r8, qword [rbp + 0xb0]
call fcn.180070af0
mov rcx, qword [rbp + 0xa8]
call fcn.180139b7c
xorps xmm0, xmm0
movdqu xmmword [rbp + 0xa8], xmm0
mov qword [rbp + 0xb8], rbx
lea rax, vtable.RC::RCFileHash.0
mov qword [rbp + 0x90], rax
mov byte [rbp + 0xa0], 1
jmp 0x18006ec71
xor ebx, ebx
mov esi, 1
jmp 0x18006ec71
xor ebx, ebx
mov esi, ebx
lea rax, vtable.DL::TSimpleDownloadDataEvent.0
mov qword [rbp + 0x58], rax
lea rax, vtable.RC::ISimpleDownloadDataEvent.0
mov qword [rbp + 0x58], rax
cmp qword [rbp + 0xd8], 8
jb 0x18006ec9d
mov rcx, qword [rbp + 0xc0]
call fcn.180139b7c
mov qword [rbp + 0xd8], 7
mov qword [rbp + 0xd0], rbx
mov word [rbp + 0xc0], bx
jmp 0x18006ecba
mov esi, ebx
test r13, r13
je 0x18006ecf7
lock dec dword [r13 + 8]
jne 0x18006ece2
mov rbx, qword [rbp + 0x30]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x18006ece2
mov rcx, qword [rbp + 0x30]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [rbp + 0x20]
jmp 0x18006ecf7
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [r15 + 0x100], eax
jmp 0x18006ecfa
xor r13d, r13d
test rdi, rdi
je 0x18006ed11
mov rcx, qword [rdi]
test rcx, rcx
je 0x18006ed0d
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov qword [rbp + 0x20], r13
lea rcx, [rbp - 0x78]
call fcn.18006d010
nop
mov rbx, qword [rbp - 0x68]
test rbx, rbx
je 0x18006ed42
lock dec dword [rbx + 8]
jne 0x18006ed42
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x18006ed42
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax + 8]
nop
mov rcx, qword [rbp + 0x50]
test rcx, rcx
je 0x18006ed6e
lock dec dword [rcx + 8]
jne 0x18006ed6e
mov rbx, qword [rbp + 0x50]
mov rax, qword [rbx]
mov rcx, rbx
call qword [rax]
lock dec dword [rbx + 0xc]
jne 0x18006ed6e
mov rcx, qword [rbp + 0x50]
mov rdx, qword [rcx]
call qword [rdx + 8]
nop
mov rcx, qword [rbp - 8]
test rcx, rcx
je 0x18006ed80
call fcn.18004f5b0
mov qword [rbp - 8], r13
mov eax, esi
mov rcx, qword [rbp + 0x110]
xor rcx, rsp
call fcn.180139310
mov rbx, qword [rsp + 0x270]
add rsp, 0x220
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret