Function at 0x471380
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 0x471581
lea rax, [rsp + 0x100]
mov qword [rsp + 0x48], rax
lea rax, [rsp + 0x110]
mov qword [rsp + 0x30], rax
jmp 0x4713ef
add rdi, 0x70
cmp r12, rdi
je 0x471581
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 0x4713e2
mov rdx, qword [rdi + 8]
mov r9, qword [r14 + 0x28]
cmp rdx, r9
ja 0x471c4c
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.3711_
xor r8d, r8d
xor edx, edx
mov rcx, rsi
mov qword [rsp + 0x20], 1
lea r9, [0x00515d85]
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 0x471672
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 0x4714af
call sym.operator_delete_void_
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x4714e3
mov rdx, qword [rsp + 0x60]
xor esi, esi
cmp byte [rdx], 0x2f
je 0x4714da
jmp 0x4715a0
cmp byte [rdx + rsi], 0x2f
jne 0x4715a0
add rsi, 1
cmp rax, rsi
jne 0x4714d0
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.3713_
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 0x471690
xor edx, edx
call qword [sym._stub]
test eax, eax
je 0x4716ac
mov rcx, qword [rsp + 0x80]
add rbx, 0x10
cmp rcx, rbx
je 0x47155d
call sym.operator_delete_void_
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x4713e2
call sym.operator_delete_void_
add rdi, 0x70
cmp r12, rdi
jne 0x4713ef
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 0x4714e3
mov qword [rsp + 0x50], 0
mov rcx, rdx
mov rbx, rsi
nop dword [rax + rax]
movzx r8d, byte [rdx + rbx]
cmp r8b, 0x2f
je 0x4715df
cmp r8b, 0x5c
je 0x471562
test r8b, r8b
je 0x471562
add rbx, 1
cmp rbx, rax
jb 0x4715c0
mov r15, rbx
mov rdx, rsi
mov rcx, rbp
lea r9, [0x00516035]
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 0x471645
mov rax, qword [rsp + 0x68]
cmp rbx, rax
jae 0x4714e3
mov rdx, qword [rsp + 0x60]
cmp byte [rdx + rbx], 0x2f
je 0x471626
jmp 0x47163d
cmp byte [rdx + rbx], 0x2f
jne 0x471634
add rbx, 1
cmp rbx, rax
jne 0x471620
jmp 0x4714e3
cmp rbx, rax
jae 0x4714e3
mov rsi, rbx
jmp 0x4715b2
lea r9, [0x0051b35b]
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 0x471681
cmp qword [rsp + 0x50], 0
je 0x47155d
sub qword [rsp + 0x50], 1
jmp 0x4715fe
movdqu xmm1, xmmword [rax + 0x10]
movaps xmmword [rsp + 0x70], xmm1
jmp 0x471483
add qword [rsp + 0x50], 1
jmp 0x4715fe
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 0x471537
mov rsi, qword [rdi + 0x58]
add rdi, 0x48
cmp rdi, rsi
je 0x4716e5
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 0x4716c0
mov ecx, 0x30
mov rdi, qword [rsp + 0x80]
call sym.operator_new_unsigned_long_long_
lea rsi, fcn.004a6d90
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 0x471798
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 0x4717f0
cmp r15, qword [rsp + 0x30]
lea rsi, [r13 + 1]
movsx r12w, byte [rdi + r13]
je 0x4717e9
mov rax, qword [rsp + 0x110]
cmp rsi, rax
jbe 0x471780
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 0x471780
mov eax, 7
jmp 0x4717be
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 0x471847
mov qword [rsp + 0xe0], 0
lea rdx, [rsp + 0xe0]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x471b16
mov rax, qword [rsp + 0x48]
mov rcx, qword [rsp + 0x100]
add rax, 0x10
cmp rcx, rax
je 0x471862
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 0x471c45
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.1253_
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 0x47194f
call sym.operator_delete_void_
mov rax, qword [rsp + 0x180]
test rdi, rdi
mov qword [rax + 0xb8], rdi
jne 0x471b80
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 0x471a28
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 0x471a4d
call sym.operator_delete_void_
mov rax, qword [rsp + 0xd0]
test rax, rax
je 0x471a6d
lea rcx, [rsp + 0xc0]
mov r8d, 3
mov rdx, rcx
call rax
mov rax, qword [rsp + 0xf0]
test rax, rax
je 0x471a8d
lea rcx, [rsp + 0xe0]
mov r8d, 3
mov rdx, rcx
call rax
cmp byte [rsp + 0x5c], 0
jne 0x471abe
mov rax, qword [rsp + 0x170]
cmp qword [rax + 0xf8], 0
je 0x471abe
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 0x471af1
call sym.operator_delete_void_
movzx eax, byte [rsp + 0x30]
mov rcx, qword [rsp + 0x60]
add rbp, 0x10
cmp rcx, rbp
je 0x471583
mov byte [rsp + 0x30], al
call sym.operator_delete_void_
movzx eax, byte [rsp + 0x30]
jmp 0x471583
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 0x471b73
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 0x471847
mov rcx, rsi
call method.httplib::detail::mmap.close__
jmp 0x471847
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 0x471967
mov rcx, qword [rsp + 0x48]
mov r8d, 3
mov rdx, rcx
call rax
jmp 0x471967
xor eax, eax
jmp 0x471ac3
lea rcx, [0x00515ff0]
mov r8, rdx
lea rdx, [0x00515fd4]
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 0x471c78
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 0x471c65
call sym.operator_delete_void_
jmp 0x471c65