Function at 0x140082894
Capabilities:
Get file size
Read file on windows

Disassembly:
mov rax, rsp
push rbp
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x60]
sub rsp, 0x160
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x14017a140]
xor rax, rsp
mov qword [rbp + 0x58], rax
mov r14, rcx
xor esi, esi
mov byte [rsp + 0x30], sil
mov dword [rsp + 0x28], esi
mov dword [rsp + 0x20], 0x3b4
lea r9, [0x140133750]
lea r8, [0x140184408]
mov rdx, qword [0x140184400]
lea rcx, [rbp - 0x50]
call fcn.140003374
nop
mov dword [rsp + 0x40], esi
lea rcx, [rsp + 0x50]
call fcn.140003b6c
nop
mov ecx, dword [r14 + 0x100]
test ecx, ecx
je 0x140082947
sub ecx, 1
je 0x14008293e
sub ecx, 1
je 0x140082935
cmp ecx, 1
jne 0x140082d09
lea r11, [r14 + 0x158]
jmp 0x14008294e
lea r11, [r14 + 0x148]
jmp 0x14008294e
lea r11, [r14 + 0x138]
jmp 0x14008294e
lea r11, [r14 + 0x128]
test r11, r11
je 0x140082d09
lea r15, [r14 + 0x108]
mov rax, qword [r11]
mov rdi, qword [rax + 8]
mov rbx, qword [r11]
jmp 0x140082986
lea rdx, [rdi + 0x20]
mov r8, r15
call fcn.14000a9c4
test al, al
je 0x140082980
mov rdi, qword [rdi + 0x10]
jmp 0x140082986
mov rbx, rdi
mov rdi, qword [rdi]
cmp byte [rdi + 0x19], sil
je 0x14008296a
mov rax, qword [r11]
cmp rbx, rax
je 0x1400829a4
lea r8, [rbx + 0x20]
mov rdx, r15
call fcn.14000a9c4
test al, al
je 0x1400829a7
mov rbx, qword [r11]
mov rax, qword [r11]
cmp rbx, rax
je 0x140082a55
mov rax, qword [rbx + 0x40]
mov r8, qword [rax]
add r8, 0x10
lea rdx, [r14 + 0x2a0]
lea rcx, [rsp + 0x70]
call fcn.140013b2c
mov rdi, rax
lea rax, [rsp + 0x50]
mov r15d, 1
cmp rax, rdi
je 0x140082a00
xor r8d, r8d
mov dl, r15b
lea rcx, [rsp + 0x50]
call fcn.140003bb4
mov rdx, rdi
lea rcx, [rsp + 0x50]
call fcn.14000c4dc
nop
lea rcx, [rsp + 0x70]
call fcn.140003b4c
nop
mov rax, qword [rbx + 0x48]
cmp rax, r15
jbe 0x140082abb
mov rax, qword [rbx + 0x40]
mov rdi, qword [rax]
mov rdx, qword [rdi + 8]
mov rax, qword [rdi]
mov qword [rdx], rax
mov rdx, qword [rdi]
mov rax, qword [rdi + 8]
mov qword [rdx + 8], rax
dec qword [rbx + 0x48]
lea rcx, [rdi + 0x10]
call fcn.140003b4c
mov r8d, gethostbyname
mov rdx, r15
mov rcx, rdi
call fcn.140002e78
nop
jmp 0x140082abb
mov rdx, r15
lea rcx, [rbp - 0x70]
call fcn.140013ff0
nop
lea rdx, [r14 + 0x2a0]
mov r8, rax
lea rcx, [rsp + 0x70]
call fcn.140013b2c
mov rbx, rax
lea rax, [rsp + 0x50]
mov r15d, 1
cmp rax, rbx
je 0x140082aa7
xor r8d, r8d
mov dl, r15b
lea rcx, [rsp + 0x50]
call fcn.140003bb4
mov rdx, rbx
lea rcx, [rsp + 0x50]
call fcn.14000c4dc
nop
lea rcx, [rsp + 0x70]
call fcn.140003b4c
nop
lea rcx, [rbp - 0x70]
call fcn.140003b4c
lea rax, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rax, qword [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, str.Attempting_to_open_file_:__s
mov edx, 0x200
mov r8d, 0x3d9
lea rcx, [rbp - 0x50]
call fcn.1400037a4
lea rcx, [rsp + 0x50]
cmp qword [rsp + 0x68], 8
cmovae rcx, qword [rsp + 0x50]
mov qword [rsp + 0x30], rsi
mov r12d, 0x80
mov dword [rsp + 0x28], r12d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, r15d
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
xor edx, edx
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp rdi, 0xffffffffffffffff
je 0x140082ce4
test eax, eax
je 0x140082ce4
mov rcx, qword [r14 + 0x208]
test rcx, rcx
je 0x140082b61
mov rdx, r15
call fcn.1400b9b24
mov qword [r14 + 0x208], rsi
mov r12b, sil
mov eax, dword [str.HTTP_]
mov dword [rbp + 0x50], eax
movzx eax, word [0x140128628]
mov word [rbp + 0x54], ax
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, 5
lea rdx, [rbp + 0x50]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ReadFile]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp dword [rsp + 0x40], 5
jne 0x140082bcd
mov r8d, 5
lea rdx, str.HTTP_
lea rcx, [rbp + 0x50]
call fcn.1400d3d90
movzx r12d, sil
test eax, eax
cmove r12d, r15d
cmp byte [r14 + 0x224], sil
jne 0x140082c79
test r12b, r12b
jne 0x140082c79
mov edx, ebx
mov rcx, r14
call fcn.140082d50
mov rcx, qword [r14 + 0x1f8]
add ecx, ebx
mov dword [r14 + 0x210], ecx
mov dword [rsp + 0x20], ecx
lea r9, str.m_ulResponseSize___d
mov edx, 0x200
mov r8d, 0x3f5
lea rcx, [rbp - 0x50]
call fcn.1400037a4
mov ecx, dword [r14 + 0x210]
call fcn.1400b9fe0
mov qword [r14 + 0x208], rax
test rax, rax
je 0x140082c6b
mov r8, qword [r14 + 0x1f8]
lea rdx, [r14 + 0x1e8]
cmp qword [rdx + 0x18], 0x10
jb 0x140082c4c
mov rdx, qword [rdx]
mov rcx, qword [r14 + 0x208]
call fcn.1400bb850
mov rdx, qword [r14 + 0x1f8]
mov rcx, qword [r14 + 0x208]
add rdx, rcx
jmp 0x140082cb8
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140082d09
mov rcx, rbx
call fcn.1400b9fe0
mov qword [r14 + 0x208], rax
mov dword [r14 + 0x210], ebx
mov dword [rsp + 0x20], ebx
lea r9, str.m_ulResponseSize___d
mov edx, 0x200
mov r8d, 0x409
lea rcx, [rbp - 0x50]
call fcn.1400037a4
mov rcx, qword [r14 + 0x208]
mov rdx, rcx
test rcx, rcx
mov rcx, rdi
je 0x140082c6e
mov qword [rsp + 0x20], rsi
lea r9, [rsp + 0x40]
mov r8d, ebx
call qword [sym.imp.KERNEL32.dll_ReadFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [rsp + 0x40], ebx
jne 0x140082d0f
jmp 0x140082d0c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [rsp + 0x20], eax
lea r9, str.Error_loading_file__GetLastError____0x_x
mov r8d, 0x41d
mov edx, r12d
lea rcx, [rbp - 0x50]
call fcn.1400037a4
jmp 0x140082d0f
mov r15b, sil
mov sil, r15b
lea rcx, [rsp + 0x50]
call fcn.140003b4c
nop
lea rcx, [rbp - 0x50]
call fcn.1400034bc
mov al, sil
mov rcx, qword [rbp + 0x58]
xor rcx, rsp
call fcn.1400b9f80
lea r11, [rsp + 0x160]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rbp
ret