Function at 0x472850
Capabilities:
Get file size

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x128
mov rdi, qword [rcx + 0x80]
mov r12, qword [rcx + 0x88]
mov qword [rsp + 0x170], rcx
lea r13, [rdx + 0x20]
mov r14, rdx
cmp rdi, r12
mov qword [rsp + 0x180], r8
mov dword [rsp + 0x5c], r9d
je 0x472a51
lea rax, [rsp + 0x100]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x30], rax
jmp 0x4728bf
add rdi, 0x70
cmp r12, rdi
je 0x472a51
mov r8, qword [rdi + 8]
xor edx, edx
mov r9, rdi
mov rcx, r13
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::compare_unsigned_long_long__unsigned_long_long__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__const
test eax, eax
jne 0x4728b2
mov rdx, qword [rdi + 8]
mov r9, qword [r14 + 0x28]
cmp rdx, r9
ja 0x47311c
mov rax, qword [rsp + 0x30]
mov rsi, qword [rsp + 0x48]
mov qword [rsp + 0x100], rax
mov rax, qword [r14 + 0x20]
mov rcx, rsi
lea r8, [rax + r9]
add rdx, rax
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char_const__char_const__char_const__std::forward_iterator_tag___clone_.constprop.3682_
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], 1
lea r9, [0x00512f0d]
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_replace_unsigned_long_long__unsigned_long_long__char_const__unsigned_long_long_
lea rbp, [rsp + 0x60]
lea rdx, [rbp + 0x10]
mov qword [rsp + 0x60], rdx
mov rcx, qword [rax]
lea rdx, [rax + 0x10]
cmp rcx, rdx
je 0x472b42
mov qword [rsp + 0x60], rcx
mov rcx, qword [rax + 0x10]
mov qword [rsp + 0x70], rcx
mov rcx, qword [rax + 8]
mov byte [rax + 0x10], 0
mov qword [rsp + 0x68], rcx
mov qword [rax], rdx
mov qword [rax + 8], 0
mov rcx, qword [rsp + 0x100]
cmp rcx, qword [rsp + 0x30]
je 0x47297f
call sym.operator_delete_void_
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x4729b3
mov rdx, qword [rsp + 0x60]
xor esi, esi
cmp byte [rdx], 0x2f
je 0x4729aa
jmp 0x472a70
cmp byte [rdx + rsi], 0x2f
jne 0x472a70
add rsi, 1
cmp rax, rsi
jne 0x4729a0
lea rbx, [rsp + 0x80]
lea rax, [rbx + 0x10]
mov rcx, rbx
mov qword [rsp + 0x80], rax
mov rdx, qword [rdi + 0x20]
mov r8, qword [rdi + 0x28]
add r8, rdx
call method.void_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___._M_construct_char__char__char__std::forward_iterator_tag___clone_.constprop.3684_
mov r8, qword [rsp + 0x68]
mov rcx, rbx
mov rdx, qword [rsp + 0x60]
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::_M_append_char_const__unsigned_long_long_
mov rcx, qword [rsp + 0x80]
mov rax, qword [rsp + 0x88]
cmp byte [rcx + rax - 1], 0x2f
je 0x472b60
xor edx, edx
call qword [sym._stub]
test eax, eax
je 0x472b7c
mov rcx, qword [rsp + 0x80]
add rbx, 0x10
cmp rcx, rbx
je 0x472a2d
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x4728b2
call sym.operator_delete_void_
add rdi, 0x70
cmp r12, rdi
jne 0x4728bf
xor eax, eax
add rsp, 0x128
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
cmp rax, rsi
jbe 0x4729b3
mov qword [rsp + 0x50], 0
mov rcx, rdx
mov rbx, rsi
nop dword [rax + rax]
movzx r8d, byte [rdx + rbx]
cmp r8b, 0x2f
je 0x472aaf
cmp r8b, 0x5c
je 0x472a32
test r8b, r8b
je 0x472a32
add rbx, 1
cmp rbx, rax
jb 0x472a90
mov r15, rbx
mov rdx, rsi
mov rcx, rbp
lea r9, [0x005130a5]
sub r15, rsi
mov r8, r15
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::compare_unsigned_long_long__unsigned_long_long__char_const__const
test eax, eax
jne 0x472b15
mov rax, qword [rsp + 0x68]
cmp rbx, rax
jae 0x4729b3
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + rbx], 0x2f
je 0x472af6
jmp 0x472b0d
cmp byte [rdx + rbx], 0x2f
jne 0x472b04
add rbx, 1
cmp rbx, rax
jne 0x472af0
jmp 0x4729b3
cmp rbx, rax
jae 0x4729b3
mov rsi, rbx
jmp 0x472a82
lea r9, [0x00517eec]
mov r8, r15
mov rdx, rsi
mov rcx, rbp
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::compare_unsigned_long_long__unsigned_long_long__char_const__const
test eax, eax
jne 0x472b51
cmp qword [rsp + 0x50], 0
je 0x472a2d
sub qword [rsp + 0x50], 1
jmp 0x472ace
movdqu xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm1
jmp 0x472953
add qword [rsp + 0x50], 1
jmp 0x472ace
lea rdx, str.index.html
mov rcx, rbx
call sym.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___::append_char_const_
mov rcx, qword [rsp + 0x80]
jmp 0x472a07
mov rsi, qword [rdi + 0x58]
add rdi, 0x48
cmp rdi, rsi
je 0x472bb5
nop dword [rax]
mov rcx, qword [rsp + 0x180]
lea rdx, [rsi + 0x20]
lea r8, [rsi + 0x40]
call method.httplib::Response.set_header_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov rcx, rsi
call sym.std::_Rb_tree_increment_std::_Rb_tree_node_base_const_
cmp rdi, rax
mov rsi, rax
jne 0x472b90
mov ecx, 0x30
mov rdi, qword [rsp + 0x80]
call sym.operator_new_unsigned_long_long_
lea rsi, fcn.004a6ca0
pxor xmm0, xmm0
mov qword [rsp + 0x50], rax
xor ecx, ecx
mov qword [rax], rsi
movabs rsi, 0x100000001
mov qword [rax + 8], rsi
movups xmmword [rax + 0x10], xmm0
mov qword [rax + 0x20], 0
mov qword [rax + 0x28], 0
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rax, qword [rsp + 0x50]
xor edx, edx
xor r13d, r13d
mov qword [rsp + 0x108], 0
mov word [rsp + 0x110], dx
mov qword [rax + 0x10], 0xffffffffffffffff
mov qword [rax + 0x20], 0
mov rax, qword [rsp + 0x48]
lea r10, [rax + 0x10]
mov qword [rsp + 0x100], r10
mov r15, r10
mov qword [rsp + 0x30], r10
jmp 0x472c68
xor eax, eax
mov word [r15 + rsi*2 - 2], r12w
mov r13, rsi
mov qword [rsp + 0x108], rsi
mov word [r15 + rsi*2], ax
mov rcx, rdi
call sym.strlen
cmp r13, rax
jae 0x472cc0
cmp r15, qword [rsp + 0x30]
lea rsi, [r13 + 1]
movsx r12w, byte [rdi + r13]
je 0x472cb9
mov rax, qword [rsp + 0x110]
cmp rsi, rax
jbe 0x472c50
mov rcx, qword [rsp + 0x48]
xor r9d, r9d
xor r8d, r8d
mov rdx, r13
mov qword [rsp + 0x20], 1
call sym.std::__cxx11::basic_string_wchar_t__std::char_traits_wchar_t___std::allocator_wchar_t___::_M_mutate_unsigned_long_long__unsigned_long_long__wchar_t_const__unsigned_long_long_
mov r15, qword [rsp + 0x100]
jmp 0x472c50
mov eax, 7
jmp 0x472c8e
mov r9d, 3
mov r8d, 1
mov edx, 0x80000000
mov qword [rsp + 0x20], 0
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_CreateFile2]
mov rsi, qword [rsp + 0x50]
cmp rax, 0xffffffffffffffff
mov qword [rsi + 0x10], rax
je 0x472d17
mov qword [rsp + 0xe0], 0
lea rdx, [rsp + 0xe0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x472fe6
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x100]
add rax, 0x10
cmp rcx, rax
je 0x472d32
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x50]
lea rdx, sym.imp.libstdc_6.dll_vtable_for___cxxabiv1::__function_type_info
mov rax, qword [rcx]
call qword [rax + 0x20]
cmp qword [rax + 0x18], 0
mov rdi, rax
je 0x473115
mov rsi, qword [rsp + 0x50]
mov qword [rsp + 0xf0], 0
lock add dword [rsi + 8], 1
mov ecx, 0x10
mov qword [rsp + 0xd0], 0
call sym.operator_new_unsigned_long_long_
mov qword [rax + 8], rsi
lea rsi, [sym._ZNSt14_Function_base13_Base_managerIZN7httplib6Server19handle_file_requestERKNS1_7RequestERNS1_8ResponseEbEUlyyRNS1_8DataSink]
mov rdx, rbx
mov qword [rax], rdi
movq xmm0, rsi
mov qword [rsp + 0xc0], rax
lea rax, [sym._ZNSt17_Function_handlerIFbyyRN7httplib8DataSinkEEZNS0_6Server19handle_file_requestERKNS0_7RequestERNS0_8ResponseEbEUlyyS2_E_E]
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x170]
lea rsi, [rsp + 0xa0]
movhps xmm0, qword [rsp + 0x30]
mov rcx, rsi
movaps xmmword [rsp + 0xd0], xmm0
lea r9, [rax + 0xc8]
lea r8, [rax + 0x98]
call sym._ZN7httplib6detail17find_content_typeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt3mapIS6_S6_St4lessIS6_ESaISt4p
mov r15, qword [rsp + 0x48]
lea rdx, str.Content_Type
mov rdi, qword [rdi + 0x10]
mov rcx, r15
call method.std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char___.basic_string_char_const__std::allocator_char__const___clone_.isra.1540_
mov rcx, qword [rsp + 0x180]
mov r8, rsi
mov rdx, r15
call method.httplib::Response.set_header_std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const__std::__cxx11::basic_string_char__std::char_traits_char___std::allocator_char____const_
mov rcx, qword [rsp + 0x100]
mov rax, r15
add rax, 0x10
cmp rcx, rax
je 0x472e1f
call sym.operator_delete_void_
mov rax, qword [rsp + 0x180]
test rdi, rdi
mov qword [rax + 0xb8], rdi
jne 0x473050
mov rax, qword [rsp + 0x118]
mov r9, qword [rsp + 0xe0]
mov r10, qword [rsp + 0xe8]
mov rdx, qword [rsp + 0xf8]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0x180]
mov rcx, qword [rsp + 0xf0]
mov qword [rsp + 0xf0], 0
mov rdi, qword [rsp + 0x180]
movdqa xmm2, xmmword [rsp + 0x100]
movdqu xmm3, xmmword [rax + 0xe0]
mov qword [rax + 0xe0], r9
mov qword [rax + 0xe8], r10
mov rax, qword [rax + 0xf0]
mov qword [rdi + 0xf0], rcx
mov rcx, qword [rdi + 0xf8]
movaps xmmword [rsp + 0xe0], xmm2
movaps xmmword [rsp + 0x30], xmm3
test rax, rax
movaps xmmword [rsp + 0x100], xmm3
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], rcx
mov qword [rdi + 0xf8], rdx
je 0x472ef8
mov rcx, qword [rsp + 0x48]
mov r8d, 3
mov rdx, rcx
call rax
mov rcx, qword [rsp + 0xa0]
add rsi, 0x10
mov rax, qword [rsp + 0x180]
cmp rcx, rsi
mov byte [rax + 0x100], 0
je 0x472f1d
call sym.operator_delete_void_
mov rax, qword [rsp + 0xd0]
test rax, rax
je 0x472f3d
lea rcx, [rsp + 0xc0]
mov r8d, 3
mov rdx, rcx
call rax
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x472f5d
lea rcx, [rsp + 0xe0]
mov r8d, 3
mov rdx, rcx
call rax
cmp byte [rsp + 0x5c], 0
jne 0x472f8e
mov rax, qword [rsp + 0x170]
cmp qword [rax + 0xf8], 0
je 0x472f8e
lea rcx, [rax + 0xe8]
mov r8, qword [rsp + 0x180]
mov rdx, r14
call qword [rax + 0x100]
mov eax, 1
mov rcx, qword [rsp + 0x50]
mov byte [rsp + 0x30], al
add rbx, 0x10
call method.std._Sp_counted_base____gnu_cxx::_Lock_policy_2_::_M_release__
mov rcx, qword [rsp + 0x80]
movzx eax, byte [rsp + 0x30]
cmp rcx, rbx
je 0x472fc1
call sym.operator_delete_void_
movzx eax, byte [rsp + 0x30]
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x472a53
mov byte [rsp + 0x30], al
call sym.operator_delete_void_
movzx eax, byte [rsp + 0x30]
jmp 0x472a53
mov r9, qword [rsp + 0xe0]
mov r8d, 2
xor edx, edx
mov rcx, qword [rsi + 0x10]
mov qword [rsi + 0x20], r9
mov qword [rsp + 0x20], 0
call qword [sym.imp.KERNEL32.dll_CreateFileMappingFromApp]
mov rcx, rsi
add rsi, 0x10
test rax, rax
mov qword [rcx + 0x18], rax
je 0x473043
xor r9d, r9d
xor r8d, r8d
mov edx, 4
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_MapViewOfFileFromApp]
mov rcx, qword [rsp + 0x50]
test rax, rax
mov qword [rcx + 0x28], rax
jne 0x472d17
mov rcx, rsi
call method.httplib::detail::mmap.close__
jmp 0x472d17
mov rdi, rax
mov rax, qword [rsp + 0x118]
mov r9, qword [rsp + 0xc0]
mov r10, qword [rsp + 0xc8]
mov rdx, qword [rsp + 0xd8]
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x180]
mov rcx, qword [rsp + 0xd0]
mov qword [rsp + 0xd0], 0
movdqa xmm5, xmmword [rsp + 0x100]
movaps xmmword [rsp + 0xc0], xmm5
movdqu xmm5, xmmword [rax + 0xc0]
mov qword [rax + 0xc0], r9
mov qword [rax + 0xc8], r10
mov rax, qword [rax + 0xd0]
mov qword [rdi + 0xd0], rcx
mov rcx, qword [rdi + 0xd8]
movaps xmmword [rsp + 0x30], xmm5
movaps xmmword [rsp + 0x100], xmm5
test rax, rax
mov qword [rsp + 0x110], rax
mov qword [rsp + 0x118], rcx
mov qword [rdi + 0xd8], rdx
je 0x472e37
mov rcx, qword [rsp + 0x48]
mov r8d, 3
mov rdx, rcx
call rax
jmp 0x472e37
xor eax, eax
jmp 0x472f93
lea rcx, [0x00513060]
mov r8, rdx
lea rdx, [0x00513048]
call sym.std::__throw_out_of_range_fmt_char_const__::_
mov rsi, rax
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x473148
call sym.operator_delete_void_
mov rcx, rsi
call sym._Unwind_Resume
mov rsi, rax
mov rcx, qword [rsp + 0x80]
add rbx, 0x10
cmp rcx, rbx
je 0x473135
call sym.operator_delete_void_
jmp 0x473135